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