diff --git a/app/controller/api/Auth.php b/app/controller/api/Auth.php index c0e7dbce..ffdbacb5 100644 --- a/app/controller/api/Auth.php +++ b/app/controller/api/Auth.php @@ -1372,8 +1372,9 @@ class Auth extends BaseController $repository->updateStatus($id, $data); } else { //商户交易申请 - Db::name('merchant_integntion')->where('mer_intention_id', $intentionId)->where('type', 2)->update(['status' => ($status == 1 ? 1 : 2)]); - Db::name('merchant')->where('mer_intention_id', $id)->where('status', 1)->update(['business_status' => ($status == 1 ? 2 : 3)]); + Db::name('merchant_integntion')->where('mer_intention_id', $id)->where('type', 2)->update(['status' => ($status == 1 ? 1 : 2)]); + $merId = Db::name('merchant_integntion')->where('mer_intention_id', $id)->where('type', 2)->value('mer_id', 0); + Db::name('merchant')->where('mer_id', $merId)->where('status', 1)->update(['business_status' => ($status == 1 ? 2 : 3)]); } return app('json')->success('同步成功');