更新获取申请协议
This commit is contained in:
parent
adca4faabf
commit
1a20217b51
@ -210,7 +210,7 @@ class Auth extends BaseController
|
|||||||
$store_service = Db::name('store_service')->where('uid', $data['uid'])->find();
|
$store_service = Db::name('store_service')->where('uid', $data['uid'])->find();
|
||||||
|
|
||||||
if ($store_service) {
|
if ($store_service) {
|
||||||
$mer_arr = Db::name('merchant')->where('mer_id', $store_service['mer_id'])->where('is_del', 0)->field('type_id,mer_avatar,mer_banner,business_status,mer_info,category_id,service_phone,mer_address,uid,mer_name,create_time,update_time,mer_services_agree_status,mer_supply_agree_status,consign_product_agree_status,mer_settlement_agree_status')->find();
|
$mer_arr = Db::name('merchant')->where('mer_id', $store_service['mer_id'])->where('is_del', 0)->field('type_id,mer_avatar,mer_banner,business_status,mer_info,category_id,service_phone,mer_address,uid,mer_name,create_time,update_time,mer_settlement_agree_status')->find();
|
||||||
if ($mer_arr && $mer_arr['mer_avatar'] != '' && $mer_arr['mer_banner'] != '' && $mer_arr['mer_info'] && $mer_arr['service_phone'] != '' && $mer_arr['mer_address'] != '') {
|
if ($mer_arr && $mer_arr['mer_avatar'] != '' && $mer_arr['mer_banner'] != '' && $mer_arr['mer_info'] && $mer_arr['service_phone'] != '' && $mer_arr['mer_address'] != '') {
|
||||||
$data['is_wsxx'] = 1;
|
$data['is_wsxx'] = 1;
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@ use app\common\repositories\system\merchant\MerchantAdminRepository;
|
|||||||
use app\common\repositories\system\merchant\MerchantCategoryRepository;
|
use app\common\repositories\system\merchant\MerchantCategoryRepository;
|
||||||
use app\common\repositories\system\merchant\MerchantRepository;
|
use app\common\repositories\system\merchant\MerchantRepository;
|
||||||
use app\common\repositories\system\merchant\MerchantTypeRepository;
|
use app\common\repositories\system\merchant\MerchantTypeRepository;
|
||||||
|
use app\common\repositories\system\CacheRepository;
|
||||||
use app\validate\api\MerchantIntentionValidate;
|
use app\validate\api\MerchantIntentionValidate;
|
||||||
use crmeb\services\SmsService;
|
use crmeb\services\SmsService;
|
||||||
use crmeb\services\SwooleTaskService;
|
use crmeb\services\SwooleTaskService;
|
||||||
@ -101,6 +102,21 @@ class MerchantIntention extends BaseController
|
|||||||
return app('json')->success('提交成功');
|
return app('json')->success('提交成功');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function agreeApply()
|
||||||
|
{
|
||||||
|
$typeId = $this->request->params('mer_type_id');
|
||||||
|
$typeCode = Db::name('merchant_type')->where('mer_type_id', $typeId)->value('type_code', '');
|
||||||
|
$repository = app()->make(CacheRepository::class);
|
||||||
|
$agreeData[] = $repository->getResult('consign_product_agree');
|
||||||
|
if ($typeCode == Merchant::TypeCode['TypeStore']){
|
||||||
|
$agreeData[] = $repository->getResult('mer_services_agree');
|
||||||
|
}
|
||||||
|
if ($typeCode == Merchant::TypeCode['TypeSupplyChain'] || $typeCode == Merchant::TypeCode['TypeTownSupplyChain']){
|
||||||
|
$agreeData[] = $repository->getResult('mer_supply_agree');
|
||||||
|
}
|
||||||
|
return app('json')->success($agreeData);
|
||||||
|
}
|
||||||
|
|
||||||
public function businessApply()
|
public function businessApply()
|
||||||
{
|
{
|
||||||
if (!systemConfig('mer_intention_open')) {
|
if (!systemConfig('mer_intention_open')) {
|
||||||
|
@ -255,6 +255,8 @@ Route::group('api/', function () {
|
|||||||
Route::get('intention/lst', 'api.store.merchant.MerchantIntention/lst');
|
Route::get('intention/lst', 'api.store.merchant.MerchantIntention/lst');
|
||||||
//交易申请商户
|
//交易申请商户
|
||||||
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::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