新增商户模块相关接口

This commit is contained in:
weiz 2023-11-11 11:00:06 +08:00
parent 88f841567d
commit a9eeab3456
1 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,53 @@
<?php
namespace app\adminapi\controller\company;
use app\adminapi\controller\BaseAdminController;
use think\response\Json;
class MerchantController extends BaseAdminController
{
protected array $reqHeader = [];
public function initialize()
{
parent::initialize();
$this->reqHeader = [
"appid:".env('app.app_id'),
"timestamp:".time(),
"sign:".makeSign(['appid'=>env('app.app_id'),'timestamp'=>time()],env('app.app_secret'))
];
}
//商户档案列表
public function merchantRecordLists(): Json
{
$params = $this->request->get(['page_no','page_size','merchant_name','master_name','master_phone']);
$result = curl_post(env('project.worker_domain').'/middleapi/merchant/merchantRecordLists',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
//商户认证列表
public function merchantAuthLists(): Json
{
$params = $this->request->get(['page_no','page_size','merchant_name','organization_code','master_name']);
$result = curl_post(env('project.worker_domain').'/middleapi/merchant/merchantAuthLists',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
//商户申请列表
public function merchantApplyLists(): Json
{
$params = $this->request->get(['page_no','page_size','check_status','type']);
$result = curl_post(env('project.worker_domain').'/middleapi/merchant/merchantApplyLists',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
}