data_center/app/adminapi/controller/contract/ShopContractController.php

104 lines
3.0 KiB
PHP
Raw Normal View History

2023-11-14 10:12:16 +08:00
<?php
namespace app\adminapi\controller\contract;
use app\adminapi\controller\BaseAdminController;
use think\response\Json;
class ShopContractController extends BaseAdminController
{
//商户合同列表
public function lists(): Json
{
$params = $this->request->get(['page_no','page_size','contract_no','party_a','party_b','status']);
$result = curl_post(env('project.worker_domain').'/middleapi/ShopContract/lists',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
2023-11-14 11:32:09 +08:00
//商户合同详情
public function detail(): Json
{
$params = $this->request->get(['id']);
if(empty($params['id'])){
return $this->fail('缺少必要参数');
}
$result = curl_post(env('project.worker_domain').'/middleapi/ShopContract/detail',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
//商户合同审核
public function check(): Json
{
$params = $this->request->post(['id','file']);
if(empty($params['id']) || empty($params['file'])){
return $this->fail('缺少必要参数');
}
$result = curl_post(env('project.worker_domain').'/middleapi/ShopContract/check',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
//商户合同备注
public function note(): Json
{
$params = $this->request->post(['id','notes']);
if(empty($params['id']) || empty($params['notes'])){
return $this->fail('缺少必要参数');
}
$result = curl_post(env('project.worker_domain').'/middleapi/ShopContract/note',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
//发送商户合同
public function draftContract(): Json
{
$params = $this->request->post(['id']);
if(empty($params['id'])){
return $this->fail('缺少必要参数');
}
$result = curl_post(env('project.worker_domain').'/middleapi/ShopContract/draftContract',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
//发送短信
public function sendSms(): Json
{
$params = $this->request->post(['id']);
if(empty($params['id'])){
return $this->fail('缺少必要参数');
}
$result = curl_post(env('project.worker_domain').'/middleapi/ShopContract/sendSms',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
//下载证据包
public function evidence(): Json
{
$params = $this->request->get(['id']);
if(empty($params['id'])){
return $this->fail('缺少必要参数');
}
$result = curl_post(env('project.worker_domain').'/middleapi/ShopContract/evidence',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
2023-11-14 10:12:16 +08:00
}