|
|
@@ -27,6 +27,17 @@ class CustomController extends BaseController
|
|
|
//修改客户地址 ssh 20230929
|
|
|
public function actionModifyAddress()
|
|
|
{
|
|
|
+ $post = Yii::$app->request->post();
|
|
|
+ $id = $post['id'] ?? 0;
|
|
|
+ unset($post['id']);
|
|
|
+ $custom = CustomClass::getById($id, true);
|
|
|
+ if ($custom->ownMainId != $this->mainId) {
|
|
|
+ util::fail('没有权限修改');
|
|
|
+ }
|
|
|
+ $shopId = $custom->shopId ?? 0;
|
|
|
+ $where = ['shopId' => $shopId];
|
|
|
+ ShopClass::updateById($shopId, $post);
|
|
|
+ CustomClass::updateByCondition($where, $post);
|
|
|
util::complete('修改成功');
|
|
|
}
|
|
|
|