diff --git a/app/admin/logic/supplier/SupplierLogic.php b/app/admin/logic/supplier/SupplierLogic.php index 6177b5a..6f43e5c 100644 --- a/app/admin/logic/supplier/SupplierLogic.php +++ b/app/admin/logic/supplier/SupplierLogic.php @@ -92,8 +92,8 @@ class SupplierLogic extends BaseLogic */ public static function status(array $params): bool { - $apply_info = Db::name('user_auth_shop')->where('id', $params['apply_id'])->find(); - if(!$apply_info){ + $auth_shop = Db::name('user_auth_shop')->where('id', $params['apply_id'])->find(); + if(!$auth_shop){ self::setError('商户中间数据不存在'); return false; } @@ -144,7 +144,7 @@ class SupplierLogic extends BaseLogic ]; Supplier::where('id', $params['id'])->update(['status' => 1, 'uid' => $res1['id']]); - Db::name('user_auth_shop')->where('id', $params['apply_id'])->update($data); + Db::name('user_auth_shop')->where('id', $auth_shop['id'])->update($data); } if ($params['status'] == 0) { $data = [ @@ -154,11 +154,11 @@ class SupplierLogic extends BaseLogic Supplier::where('id', $params['id'])->update([ 'status' => 0, ]); - Db::name('user_auth_shop')->where('id', $apply_info['id'])->update($data); + Db::name('user_auth_shop')->where('id', $auth_shop['id'])->update($data); } - if (!empty($apply_info['jg_register_id'])) { - (new JgPushService())->sendMsg($apply_info['jg_register_id'], '您的供应入驻请求审核' . ($params['status'] == 1 ? '通过' : '被拒绝'), '/pages/bindSupplier/index'); + if (!empty($auth_shop['jg_register_id'])) { + (new JgPushService())->sendMsg($auth_shop['jg_register_id'], '您的供应入驻请求审核' . ($params['status'] == 1 ? '通过' : '被拒绝'), '/pages/bindSupplier/index'); } Db::commit(); return true;