diff --git a/app/controller/api/Auth.php b/app/controller/api/Auth.php index 64a5a6e6..a4afb6ae 100644 --- a/app/controller/api/Auth.php +++ b/app/controller/api/Auth.php @@ -1370,15 +1370,20 @@ class Auth extends BaseController $data['status'] = $status; $data['create_mer'] = -1; $data['fail_msg'] = $status == 1 ? '自动审核通过' : '自动审核拒绝'; - $repository->updateStatus($id, $data); - } else { - //商户交易申请 - //fail_msg $updData = [ 'status' => ($status == 1 ? 1 : 2), 'fail_msg' => $remark ]; - + if ($status != 1) { + Db::name('merchant_intention')->where('mer_intention_id', $id)->where('type', 2)->update($updData); + } + $repository->updateStatus($id, $data); + } else { + //商户交易申请 + $updData = [ + 'status' => ($status == 1 ? 1 : 2), + 'fail_msg' => $remark + ]; Db::name('merchant_intention')->where('mer_intention_id', $id)->where('type', 2)->update($updData); $merId = Db::name('merchant_intention')->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)]);