作者 周海龙

合并分支 'zhl' 到 'master'

u



查看合并请求 !279
... ... @@ -392,6 +392,7 @@ class SyncProject extends Command
'level_id' => 6,
'level_day' => $data['exclusive_aicc_day'] ?: 1,
'from_order_id' => $data['from_order_id'],
'nickname' => $data['username_sales'] ?? $data['principal_mobile'],
];
//sign
... ... @@ -423,6 +424,7 @@ class SyncProject extends Command
'planday' => $data['exclusive_hagro_day'] ?: 1,
'from_order_id' => $data['from_order_id'],
'agent_phone' => Channel::where('source_id', $data['company_id'])->value('contact_mobile') ?: '',
'nickname' => $data['username_sales'] ?? $data['principal_mobile'],
];
$common = new Common();
$token = $common->encrypt($param);
... ...
... ... @@ -268,6 +268,7 @@ class ComController extends BaseController
'phone' => $this->user['mobile'],
'from_order_id' => $this->user['from_order_id'] ?? '5a179274si3j8z', // 提单系统 同步到个项目的唯一凭证(数字或者字符串)
'timestamp' => time(), // 接收到字符串解密出来以后需要 验证时间不超过30秒 超过时间视为无效授权
'nickname' => $this->user['name'], // 名称
];
$common = new Common();
$str = $common->encrypt($data);
... ...
... ... @@ -719,7 +719,8 @@ class ProjectLogic extends BaseLogic
'principal_mobile'=>$projectInfo['mobile'],
'remark'=>'',
'exclusive_aicc_day'=>$this->param['exclusive_aicc_day'] ?: 1,
'from_order_id'=>$projectInfo['from_order_id']
'from_order_id'=>$projectInfo['from_order_id'],
'nickname' => $projectInfo['lead_name'] ?? $projectInfo['mobile'],
];
$this->toAicc($data);
}
... ... @@ -730,7 +731,8 @@ class ProjectLogic extends BaseLogic
'principal_mobile'=>$projectInfo['mobile'],
'exclusive_hagro_day'=>$this->param['exclusive_hagro_day'] ?: 1,
'from_order_id'=>$projectInfo['from_order_id'],
'company_id'=>$projectInfo['channel']['channel_id']
'company_id'=>$projectInfo['channel']['channel_id'],
'nickname' => $projectInfo['lead_name'] ?? $projectInfo['mobile'],
];
$this->toHagro($data);
}
... ... @@ -756,8 +758,7 @@ class ProjectLogic extends BaseLogic
/**
* 同步到AICC
* @param $data
* @author zbj
* @date 2023/9/1
* @return bool
*/
protected function toAicc($data){
$url = 'https://biz.ai.cc/api/sync_company_for_order';
... ... @@ -770,6 +771,7 @@ class ProjectLogic extends BaseLogic
'level_id' => 6,
'level_day' => $data['exclusive_aicc_day'] ?: 1,
'from_order_id' => $data['from_order_id'],
'nickname' => $data['nickname'],
];
//sign
ksort($param);
... ... @@ -790,8 +792,9 @@ class ProjectLogic extends BaseLogic
/**
* 同步到Hagro
* @param $data
* @author zbj
* @date 2023/9/1
* @return bool
* @throws AsideGlobalException
* @throws \App\Exceptions\BsideGlobalException
*/
protected function toHagro($data){
$url = 'https://admin.hagro.cn/globalso/create_project';
... ... @@ -801,6 +804,7 @@ class ProjectLogic extends BaseLogic
'planday' => $data['exclusive_hagro_day'] ?: 1,
'from_order_id' => $data['from_order_id'],
'agent_phone' => Channel::where('source_id', $data['company_id'])->value('contact_mobile') ?: '',
'nickname' => $data['nickname'],
];
$common = new Common();
$token = $common->encrypt($param);
... ...