diff --git a/app/controller/api/Auth.php b/app/controller/api/Auth.php index ec48c44d..acf2caf2 100644 --- a/app/controller/api/Auth.php +++ b/app/controller/api/Auth.php @@ -23,6 +23,7 @@ use app\common\repositories\user\UserSignRepository; use app\common\repositories\wechat\RoutineQrcodeRepository; use app\common\repositories\wechat\WechatUserRepository; use app\common\repositories\system\RelevanceRepository; +use app\common\repositories\system\merchant\MerchantIntentionRepository; use app\validate\api\ChangePasswordValidate; use app\validate\api\UserAuthValidate; use crmeb\basic\BaseController; @@ -1330,4 +1331,16 @@ class Auth extends BaseController return app('json')->success(compact('appInfo')); } + + //同步商户状态信息 + public function merchantStatus($id) + { + $repository = app()->make(MerchantIntentionRepository::class); + if (!$repository->getWhereCount(['mer_intention_id' => $id, 'is_del' => 0])) + return app('json')->fail('数据不存在'); + $data = $this->request->params(['status', 'fail_msg']); + $data['fail_msg'] = $data['status'] == 1 ? '自动审核通过' : '自动审核拒绝'; + $repository->updateStatus($id, $data); + return app('json')->success('修改成功'); + } }