|
|
@@ -37,7 +37,7 @@ class ShopExtController extends BaseController
|
|
|
if (!empty($map)) {
|
|
|
foreach ($map as $v) {
|
|
|
foreach ($v as $v1) {
|
|
|
- if(!is_numeric($v1)){
|
|
|
+ if (!is_numeric($v1)) {
|
|
|
util::fail('请填写完整');
|
|
|
}
|
|
|
}
|
|
|
@@ -45,20 +45,26 @@ class ShopExtController extends BaseController
|
|
|
$arr['hcMap'] = json_encode($map);
|
|
|
}
|
|
|
}
|
|
|
- if(isset($post['hsFreeKm'])){
|
|
|
+ if (isset($post['hsFreeKm'])) {
|
|
|
$arr['hsFreeKm'] = $post['hsFreeKm'];
|
|
|
}
|
|
|
- if(isset($post['hsAddFee'])){
|
|
|
+ if (isset($post['hsAddFee'])) {
|
|
|
$arr['hsAddFee'] = $post['hsAddFee'];
|
|
|
}
|
|
|
- if(isset($post['hcFreeKm'])){
|
|
|
+ if (isset($post['hcFreeKm'])) {
|
|
|
$arr['hcFreeKm'] = $post['hcFreeKm'];
|
|
|
}
|
|
|
if (empty($arr)) {
|
|
|
util::fail('没有需要修改');
|
|
|
}
|
|
|
$shopId = $this->shopId;
|
|
|
- \bizHd\shop\classes\ShopExtClass::updateByCondition(['shopId' => $shopId], $arr);
|
|
|
+ ShopExtClass::updateByCondition(['shopId' => $shopId], $arr);
|
|
|
+ //有批发店的也要同步修改
|
|
|
+ $shop = $this->shop;
|
|
|
+ $pfShopId = $shop->pfShopId;
|
|
|
+ if (!empty($pfShopId)) {
|
|
|
+ ShopExtClass::updateByCondition(['shopId' => $pfShopId], $arr);
|
|
|
+ }
|
|
|
util::complete('修改成功');
|
|
|
}
|
|
|
|