提交
This commit is contained in:
parent
5586293955
commit
b54c53265c
@ -24,6 +24,7 @@ use think\facade\Request;
|
||||
use app\api\controller\JunziqianController;
|
||||
use app\api\logic\SmsLogic;
|
||||
use Cls\Log;
|
||||
use com\junziqian\sdk\util\RequestUtils;
|
||||
use think\App;
|
||||
use think\facade\Db;
|
||||
use think\facade\Log as FacadeLog;
|
||||
@ -193,24 +194,9 @@ class CompanyController extends BaseAdminController
|
||||
"identityCard" => $company['organization_code'], //TODO *
|
||||
"identityType" => 12, //TODO *
|
||||
);
|
||||
$res = app(JunziqianController::class)->SigningLink($data);
|
||||
$res = app(JunziqianController::class)->sms($data);
|
||||
if($res->success == true){
|
||||
Db::name('contract')->where('id', $company['contract_id'])->update(['url' => $res->data]);
|
||||
$url=explode('https://h5.sandbox.junziqian.com/',$res->data);
|
||||
//发送短信
|
||||
$sms=[
|
||||
'mobile'=>$company['master_phone'],
|
||||
'name'=>$company['company_name'],
|
||||
'type'=>'《'.$find['contract_type_two_name'].'》',
|
||||
'code'=>$url[1],
|
||||
'scene'=>'WQ'
|
||||
];
|
||||
$result = SmsLogic::contractUrl($sms);
|
||||
if (true === $result) {
|
||||
return $this->success('发送成功');
|
||||
}else{
|
||||
return $this->fail(SmsLogic::getError());
|
||||
}
|
||||
}else{
|
||||
return $this->fail($res->msg);
|
||||
}
|
||||
@ -219,7 +205,8 @@ class CompanyController extends BaseAdminController
|
||||
}
|
||||
|
||||
//企业认证
|
||||
public function authentication(){
|
||||
public function authentication()
|
||||
{
|
||||
$params = (new CompanyValidate())->goCheck('detail');
|
||||
$company = Db::name('company')->where('id', $params['id'])->find();
|
||||
$qualification = json_decode($company['qualification'], true);
|
||||
@ -241,7 +228,8 @@ class CompanyController extends BaseAdminController
|
||||
}
|
||||
}
|
||||
//重新认证
|
||||
public function organizationReapply(){
|
||||
public function organizationReapply()
|
||||
{
|
||||
$params = (new CompanyValidate())->goCheck('detail');
|
||||
$company = Db::name('company')->where('id', $params['id'])->find();
|
||||
$qualification = json_decode($company['qualification'], true);
|
||||
|
@ -170,4 +170,20 @@ class JunziqianController extends BaseApiController
|
||||
|
||||
// return $this->success('', (array)$response);
|
||||
}
|
||||
|
||||
public function sms($data)
|
||||
{
|
||||
$requestUtils = new RequestUtils($this->serviceUrl, $this->appkey, $this->appSecret);
|
||||
//初始化请求参数
|
||||
$request=array(
|
||||
"applyNo" => $data['applyNo'], //TODO +
|
||||
//"businessNo" => "0000XXXXXXXXX", //TODO +
|
||||
"fullName" => $data['fullName'], //TODO *
|
||||
"identityCard" => $data['identityCard'], //TODO *
|
||||
"identityType" => 12, //TODO *
|
||||
"signNotifyType" => 1 //默认为1
|
||||
);
|
||||
$response=$requestUtils->doPost("/v2/sign/notify",$request);
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user