更新获取申请协议
This commit is contained in:
parent
c7b3cffd19
commit
4cd44c12ae
@ -103,25 +103,14 @@ class MerchantIntention extends BaseController
|
|||||||
return app('json')->success('提交成功');
|
return app('json')->success('提交成功');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function agreeApply()
|
public function settlementApply()
|
||||||
{
|
{
|
||||||
$typeId = $this->request->get('mer_type_id', 0);
|
$status = $this->request->post('status', 0);
|
||||||
$typeCode = Db::name('merchant_type')->where('mer_type_id', $typeId)->value('type_code', '');
|
if ($this->userInfo) $data['uid'] = $this->userInfo->uid;
|
||||||
$repository = app()->make(CacheRepository::class);
|
if ($status == 1) {
|
||||||
$agree = $repository->getResult('consign_product_agree');
|
Db::name('merchant')->where('uid', $this->userInfo->uid)->update(['mer_settlement_agree_status'=>1]);
|
||||||
$agree['content'] = $agree['consign_product_agree'];
|
|
||||||
$agreeData[] = $agree;
|
|
||||||
if ($typeCode == Merchant::TypeCode['TypeStore']){
|
|
||||||
$agree = $repository->getResult('mer_services_agree');
|
|
||||||
$agree['content'] = $agree['mer_services_agree'];
|
|
||||||
$agreeData[] = $agree;
|
|
||||||
}
|
}
|
||||||
if ($typeCode == Merchant::TypeCode['TypeSupplyChain'] || $typeCode == Merchant::TypeCode['TypeTownSupplyChain']){
|
return app('json')->success('操作成功');
|
||||||
$agree = $repository->getResult('mer_supply_agree');
|
|
||||||
$agree['content'] = $agree['mer_services_agree'];
|
|
||||||
$agreeData[] = $agree;
|
|
||||||
}
|
|
||||||
return app('json')->success($agreeData);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function businessApply()
|
public function businessApply()
|
||||||
|
@ -256,7 +256,7 @@ Route::group('api/', function () {
|
|||||||
//交易申请商户
|
//交易申请商户
|
||||||
Route::post('intention/business', 'api.store.merchant.MerchantIntention/businessApply');
|
Route::post('intention/business', 'api.store.merchant.MerchantIntention/businessApply');
|
||||||
//申请商户协议
|
//申请商户协议
|
||||||
Route::get('intention/agree', 'api.store.merchant.MerchantIntention/agreeApply');
|
Route::post('intention/settlement', 'api.store.merchant.MerchantIntention/settlementApply');
|
||||||
Route::get('intention/detail/:id', 'api.store.merchant.MerchantIntention/detail');
|
Route::get('intention/detail/:id', 'api.store.merchant.MerchantIntention/detail');
|
||||||
Route::post('intention/update/:id', 'api.store.merchant.MerchantIntention/update');
|
Route::post('intention/update/:id', 'api.store.merchant.MerchantIntention/update');
|
||||||
Route::post('store/product/group/cancel', 'api.store.product.StoreProductGroup/cancel');
|
Route::post('store/product/group/cancel', 'api.store.product.StoreProductGroup/cancel');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user