作者 zhl

u

@@ -392,6 +392,7 @@ class SyncProject extends Command @@ -392,6 +392,7 @@ class SyncProject extends Command
392 'level_id' => 6, 392 'level_id' => 6,
393 'level_day' => $data['exclusive_aicc_day'] ?: 1, 393 'level_day' => $data['exclusive_aicc_day'] ?: 1,
394 'from_order_id' => $data['from_order_id'], 394 'from_order_id' => $data['from_order_id'],
  395 + 'nickname' => $data['username_sales'] ?? $data['principal_mobile'],
395 ]; 396 ];
396 397
397 //sign 398 //sign
@@ -423,6 +424,7 @@ class SyncProject extends Command @@ -423,6 +424,7 @@ class SyncProject extends Command
423 'planday' => $data['exclusive_hagro_day'] ?: 1, 424 'planday' => $data['exclusive_hagro_day'] ?: 1,
424 'from_order_id' => $data['from_order_id'], 425 'from_order_id' => $data['from_order_id'],
425 'agent_phone' => Channel::where('source_id', $data['company_id'])->value('contact_mobile') ?: '', 426 'agent_phone' => Channel::where('source_id', $data['company_id'])->value('contact_mobile') ?: '',
  427 + 'nickname' => $data['username_sales'] ?? $data['principal_mobile'],
426 ]; 428 ];
427 $common = new Common(); 429 $common = new Common();
428 $token = $common->encrypt($param); 430 $token = $common->encrypt($param);
@@ -268,6 +268,7 @@ class ComController extends BaseController @@ -268,6 +268,7 @@ class ComController extends BaseController
268 'phone' => $this->user['mobile'], 268 'phone' => $this->user['mobile'],
269 'from_order_id' => $this->user['from_order_id'] ?? '5a179274si3j8z', // 提单系统 同步到个项目的唯一凭证(数字或者字符串) 269 'from_order_id' => $this->user['from_order_id'] ?? '5a179274si3j8z', // 提单系统 同步到个项目的唯一凭证(数字或者字符串)
270 'timestamp' => time(), // 接收到字符串解密出来以后需要 验证时间不超过30秒 超过时间视为无效授权 270 'timestamp' => time(), // 接收到字符串解密出来以后需要 验证时间不超过30秒 超过时间视为无效授权
  271 + 'nickname' => $this->user['name'], // 名称
271 ]; 272 ];
272 $common = new Common(); 273 $common = new Common();
273 $str = $common->encrypt($data); 274 $str = $common->encrypt($data);
@@ -719,7 +719,8 @@ class ProjectLogic extends BaseLogic @@ -719,7 +719,8 @@ class ProjectLogic extends BaseLogic
719 'principal_mobile'=>$projectInfo['mobile'], 719 'principal_mobile'=>$projectInfo['mobile'],
720 'remark'=>'', 720 'remark'=>'',
721 'exclusive_aicc_day'=>$this->param['exclusive_aicc_day'] ?: 1, 721 'exclusive_aicc_day'=>$this->param['exclusive_aicc_day'] ?: 1,
722 - 'from_order_id'=>$projectInfo['from_order_id'] 722 + 'from_order_id'=>$projectInfo['from_order_id'],
  723 + 'nickname' => $projectInfo['lead_name'] ?? $projectInfo['mobile'],
723 ]; 724 ];
724 $this->toAicc($data); 725 $this->toAicc($data);
725 } 726 }
@@ -730,7 +731,8 @@ class ProjectLogic extends BaseLogic @@ -730,7 +731,8 @@ class ProjectLogic extends BaseLogic
730 'principal_mobile'=>$projectInfo['mobile'], 731 'principal_mobile'=>$projectInfo['mobile'],
731 'exclusive_hagro_day'=>$this->param['exclusive_hagro_day'] ?: 1, 732 'exclusive_hagro_day'=>$this->param['exclusive_hagro_day'] ?: 1,
732 'from_order_id'=>$projectInfo['from_order_id'], 733 'from_order_id'=>$projectInfo['from_order_id'],
733 - 'company_id'=>$projectInfo['channel']['channel_id'] 734 + 'company_id'=>$projectInfo['channel']['channel_id'],
  735 + 'nickname' => $projectInfo['lead_name'] ?? $projectInfo['mobile'],
734 ]; 736 ];
735 $this->toHagro($data); 737 $this->toHagro($data);
736 } 738 }
@@ -756,8 +758,7 @@ class ProjectLogic extends BaseLogic @@ -756,8 +758,7 @@ class ProjectLogic extends BaseLogic
756 /** 758 /**
757 * 同步到AICC 759 * 同步到AICC
758 * @param $data 760 * @param $data
759 - * @author zbj  
760 - * @date 2023/9/1 761 + * @return bool
761 */ 762 */
762 protected function toAicc($data){ 763 protected function toAicc($data){
763 $url = 'https://biz.ai.cc/api/sync_company_for_order'; 764 $url = 'https://biz.ai.cc/api/sync_company_for_order';
@@ -770,6 +771,7 @@ class ProjectLogic extends BaseLogic @@ -770,6 +771,7 @@ class ProjectLogic extends BaseLogic
770 'level_id' => 6, 771 'level_id' => 6,
771 'level_day' => $data['exclusive_aicc_day'] ?: 1, 772 'level_day' => $data['exclusive_aicc_day'] ?: 1,
772 'from_order_id' => $data['from_order_id'], 773 'from_order_id' => $data['from_order_id'],
  774 + 'nickname' => $data['nickname'],
773 ]; 775 ];
774 //sign 776 //sign
775 ksort($param); 777 ksort($param);
@@ -790,8 +792,9 @@ class ProjectLogic extends BaseLogic @@ -790,8 +792,9 @@ class ProjectLogic extends BaseLogic
790 /** 792 /**
791 * 同步到Hagro 793 * 同步到Hagro
792 * @param $data 794 * @param $data
793 - * @author zbj  
794 - * @date 2023/9/1 795 + * @return bool
  796 + * @throws AsideGlobalException
  797 + * @throws \App\Exceptions\BsideGlobalException
795 */ 798 */
796 protected function toHagro($data){ 799 protected function toHagro($data){
797 $url = 'https://admin.hagro.cn/globalso/create_project'; 800 $url = 'https://admin.hagro.cn/globalso/create_project';
@@ -801,6 +804,7 @@ class ProjectLogic extends BaseLogic @@ -801,6 +804,7 @@ class ProjectLogic extends BaseLogic
801 'planday' => $data['exclusive_hagro_day'] ?: 1, 804 'planday' => $data['exclusive_hagro_day'] ?: 1,
802 'from_order_id' => $data['from_order_id'], 805 'from_order_id' => $data['from_order_id'],
803 'agent_phone' => Channel::where('source_id', $data['company_id'])->value('contact_mobile') ?: '', 806 'agent_phone' => Channel::where('source_id', $data['company_id'])->value('contact_mobile') ?: '',
  807 + 'nickname' => $data['nickname'],
804 ]; 808 ];
805 $common = new Common(); 809 $common = new Common();
806 $token = $common->encrypt($param); 810 $token = $common->encrypt($param);