商户 批发商户或批发零售商户提交申请

This commit is contained in:
liu 2024-03-15 15:10:36 +08:00
parent 10f2dbc871
commit 865762e767
2 changed files with 29 additions and 0 deletions

View File

@ -308,6 +308,33 @@ class MerchantIntention extends BaseController
return app('json')->success($data);
}
public function changeIdentity()
{
$data = $this->request->params([
'phone',
'mer_name',
'mer_type_id',
'merchant_category_id',
'type',
'name'
]);
if(empty($data['phone'])||empty($data['mer_name'])||empty($data['mer_type_id'])||empty($data['merchant_category_id'])||empty($data['type'])||empty($data['name'])){
return app('json')->fail('参数缺失请检查');
}
if ($this->userInfo) $data['uid'] = $this->userInfo->uid;
$data['status'] = 0;
$intention = $this->repository->create($data);
if ($intention) {
return app('json')->success('申请更改商户身份成功');
} else {
return app('json')->fail('申请更改商户身份失败');
}
}
protected function checkParams()
{
$data = $this->request->params([

View File

@ -558,6 +558,8 @@ Route::group('api/', function () {
Route::post('intention/create', 'api.store.merchant.MerchantIntention/create');
Route::get('intention/cate', 'api.store.merchant.MerchantIntention/cateLst');
Route::get('intention/type', 'api.store.merchant.MerchantIntention/typeLst');
Route::post('intention/change', 'api.store.merchant.MerchantIntention/changeIdentity');//更新身份
//浏览
Route::post('common/visit', 'api.Common/visit');
Route::get('store/product/assist/count', 'api.store.product.StoreProductAssist/userCount');