diff --git a/app/api/controller/Wholesaler.php b/app/api/controller/Wholesaler.php index d62c0062..498b124a 100644 --- a/app/api/controller/Wholesaler.php +++ b/app/api/controller/Wholesaler.php @@ -4,6 +4,7 @@ namespace app\api\controller; use app\api\model\wholesaler\Apply; use app\api\model\wholesaler\Set; +use app\common\enum\WholesalerEnum; use cores\exception\BaseException; use Exception; use think\db\exception\DataNotFoundException; @@ -249,6 +250,7 @@ class Wholesaler extends Controller } $data = compact('company_name', 'credit_code', 'city_id', 'province_id', 'door_img_id', 'business', 'card_no', 'avatar_id'); $data = array_merge($data, compact('username', 'mobile', 'card_back_img_id', 'card_front_img_id', 'license_img_id')); + $data['status'] = WholesalerEnum::AUDITING; if ((new Apply())->where()->edit($data)) { return $this->renderSuccess('操作成功'); } diff --git a/app/api/controller/dealer/Apply.php b/app/api/controller/dealer/Apply.php index 251d6e91..73516549 100644 --- a/app/api/controller/dealer/Apply.php +++ b/app/api/controller/dealer/Apply.php @@ -16,6 +16,7 @@ use app\api\controller\Controller; use app\api\model\dealer\Apply as DealerApplyModel; use app\api\model\dealer\User as DealerUserModel; use app\api\service\User as UserService; +use app\common\enum\dealer\apply\ApplyStatus as ApplyStatusEnum; use cores\exception\BaseException; use think\db\exception\DataNotFoundException; use think\db\exception\DbException; @@ -134,6 +135,7 @@ class Apply extends Controller return $this->renderError('所在城市不能为空'); } $data = compact('business', 'city', 'real_name', 'mobile', 'shop_type', 'shop_name', 'business', 'city'); + $data['apply_status'] = ApplyStatusEnum::WAIT; $model = new DealerApplyModel; if ($model->editApplyServiceProviders($data)) { return $this->renderSuccess('更新成功'); diff --git a/app/api/model/dealer/Apply.php b/app/api/model/dealer/Apply.php index 231a49ff..36262fcf 100644 --- a/app/api/model/dealer/Apply.php +++ b/app/api/model/dealer/Apply.php @@ -151,6 +151,7 @@ class Apply extends ApplyModel 'shop_name' => $data['shop_name'], 'business' => $data['business'], 'city' => $data['city'], + 'apply_status' => !empty($data['apply_status']) ? $data['apply_status'] : ApplyStatusEnum::WAIT, ]; if ($this->update($data, ['user_id' => $userId])) { return true;