|
|
@@ -37,16 +37,17 @@ class CustomController extends BaseController
|
|
|
$id = $post['id'] ?? 0;
|
|
|
unset($post['id']);
|
|
|
$custom = CustomClass::getById($id, true);
|
|
|
-
|
|
|
+ if (empty($custom)) {
|
|
|
+ util::fail('没有找到客户信息');
|
|
|
+ }
|
|
|
+ $userId = $custom->userId ?? 0;
|
|
|
$city = $post['city'] ?? '';
|
|
|
$dist = $post['dist'] ?? '';
|
|
|
$address = $post['address'] ?? '';
|
|
|
$floor = $post['floor'] ?? '';
|
|
|
$post['fullAddress'] = $city . $dist . $address . $floor;
|
|
|
- $shopId = $custom->shopId ?? 0;
|
|
|
- $where = ['shopId' => $shopId];
|
|
|
-// ShopClass::updateById($shopId, $post);
|
|
|
-// CustomClass::updateByCondition($where, $post);
|
|
|
+ UserClass::updateByCondition(['id' => $userId], $post);
|
|
|
+ CustomClass::updateByCondition(['id' => $id], $post);
|
|
|
util::complete('修改成功');
|
|
|
}
|
|
|
|