cusorderv2 c_address update by idcard info

This commit is contained in:
qianhy
2023-02-23 17:27:15 +08:00
committed by lccsw
parent 8521f28014
commit e53ead0bbf
@@ -214,6 +214,7 @@ class Cusorderdata extends Wxapp{
$mut_wx_img = $this->input_param('mut_wx_img');
$destory_img = $this->input_param('destory_img');
$update = [];
$update_order = [];
if($cardida){
$full_cardida = build_qiniu_image_url($cardida);
$result = $this->tcorc->IdentityCard($full_cardida);
@@ -246,6 +247,12 @@ class Cusorderdata extends Wxapp{
return $res_data;
}
$update['cardida'] = $cardida;
# 20230222 地址的值用身份证上面的地址
if ($address = $userinfo['Address']){
$info_json['c_address'] = $address;
$update_order['info_json'] = json_encode($info_json, JSON_UNESCAPED_UNICODE);
}
}elseif ($business_licence){
$full_business_licence = build_qiniu_image_url($business_licence);
$result = $this->tcorc->BizLicense($full_business_licence);
@@ -306,6 +313,11 @@ class Cusorderdata extends Wxapp{
}
$res = $this->receiver_order_datas_model->update($update,['o_id'=>$id]);
if($res){
# 20230222 地址的值用身份证上面的地址
if ($cardida && $update_order){
$this->orders_model->update($update_order, ['id' => $id]);
}
if($insurance_img || $business_img || $accident_img){ //保单识别图片保存数据
$res = $this->order_datas_entity->orc_ins_img_2($id);
if(!$res && !$accident_img){//意外险不需要识别成功