Merge pull request '新增商户模块相关接口' (#27) from zhangwei into dev
Reviewed-on: #27
This commit is contained in:
commit
583d65c339
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue