pull/5/head
wanghousheng 6 months ago
parent b22e088f10
commit b158f9f99c
  1. 2
      app/api/controller/Wholesaler.php
  2. 2
      app/api/controller/dealer/Apply.php
  3. 1
      app/api/model/dealer/Apply.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('操作成功');
}

@ -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('更新成功');

@ -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;

Loading…
Cancel
Save