add:商户认证反馈
This commit is contained in:
parent
12b27bd026
commit
a2e35c34c9
@ -20,8 +20,11 @@ use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\ShopContractLists;
|
||||
use app\adminapi\logic\ShopContractLogic;
|
||||
use app\adminapi\validate\ShopContractValidate;
|
||||
use app\api\controller\JunziqianController;
|
||||
use app\api\logic\SmsLogic;
|
||||
use app\common\logic\contract\ContractLogic;
|
||||
use app\common\model\Company;
|
||||
use app\common\model\contract\Contract;
|
||||
use app\common\model\ShopContract;
|
||||
use app\common\model\ShopMerchant;
|
||||
use app\Request;
|
||||
@ -166,4 +169,21 @@ class ShopContractController extends BaseAdminController
|
||||
}
|
||||
return $this->success('成功');
|
||||
}
|
||||
|
||||
public function evidence()
|
||||
{
|
||||
$id = $this->request->param('id');
|
||||
$detail=ShopContract::where('id',$id)->find();
|
||||
if(!empty($detail['evidence_url'])){
|
||||
return $this->success('获取成功', ['url' => env('url.url_prefix').$detail['evidence_url']]);
|
||||
}
|
||||
$company=ShopMerchant::where('id',$detail['party_a'])->find();
|
||||
$request = array(
|
||||
"applyNo" => $detail['contract_no'],
|
||||
"fullName" => $company['company_name'],
|
||||
"identityCard" => $company['organization_code'],
|
||||
"identityType" => 12,
|
||||
);
|
||||
return app(JunziqianController::class)->EvidenceDownload($request);
|
||||
}
|
||||
}
|
@ -397,6 +397,32 @@ class JunziqianController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保全后合同文件及证据包下载
|
||||
*/
|
||||
public function EvidenceShopDownload($param)
|
||||
{
|
||||
//初始化请求参数
|
||||
$requestUtils = new RequestUtils($this->serviceUrl, $this->appkey, $this->appSecret);
|
||||
|
||||
$request = array(
|
||||
"applyNo" => $param['applyNo'],
|
||||
"fullName" => $param['fullName'],
|
||||
"identityCard" => $param['identityCard'],
|
||||
"identityType" => 12,
|
||||
"dealType" => 1,
|
||||
);
|
||||
$response = $requestUtils->doPost("/v2/sign/presLinkFile", $request);
|
||||
if ($response->success == true) {
|
||||
$this->getDownload($response->data, root_path() . 'public/uploads/evidence/' . $param['applyNo'] . '.zip');
|
||||
Db::name('shop_contract')->where('contract_no', $param['applyNo'])->update(['evidence_url' => '/uploads/evidence/' . $param['applyNo'] . '.zip']);
|
||||
return $this->success('获取成功', ['url' => env('url.url_prefix') . '/uploads/evidence/' . $param['applyNo'] . '.zip']);
|
||||
} else {
|
||||
return $this->fail('获取失败');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function getDownload($url, $publicDir = '', $fileName = '', $type = 0)
|
||||
{
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user