edit-order-send_sms
This commit is contained in:
@@ -908,17 +908,28 @@ class CusorderV2 extends Wxapp{
|
||||
$content = [];
|
||||
if($owner_name!=$row['owner_name']){
|
||||
$content[] = "车姓名由 {$row['owner_name']} 变更为 {$owner_name}";
|
||||
$owner_a = $row['owner_name'];
|
||||
$owner_b = $owner_name;
|
||||
}
|
||||
if($owner_mobile!=$row['owner_mobile']){
|
||||
$content[] = "车手机号由 {$row['owner_mobile']} 变更为 {$owner_mobile}";
|
||||
$owner_a = $row['owner_mobile'];
|
||||
$owner_b = $owner_mobile;
|
||||
}
|
||||
if($owner_cardid!=$info_json['c_owner_cardid']){
|
||||
$content[] = "车主身份证由 {$info_json['c_owner_cardid']} 变更为 {$owner_cardid}";
|
||||
$owner_a = $info_json['c_owner_cardid'];
|
||||
$owner_b = $owner_cardid;
|
||||
}
|
||||
if($content){
|
||||
$log_content = implode("<br>",$content);
|
||||
$this->orders_entity->add_log($row['id'],$this->session['uid'],$this->session['uname'],$log_content);
|
||||
$this->orders_v2_entity->send_msg($row['sid'],$content[0]);
|
||||
$params = [
|
||||
'sid' => $row['sid'],
|
||||
'owner_a' => '',
|
||||
'owner_b' => '',
|
||||
];
|
||||
$this->orders_v2_entity->send_msg('SMS_241360549',$params);
|
||||
}
|
||||
}
|
||||
throw new Exception('修改成功', API_CODE_SUCCESS);
|
||||
|
||||
@@ -492,7 +492,12 @@ class Orders_v2_entity{
|
||||
$this->ci->load->library('receiver/orders_entity');
|
||||
$this->ci->orders_entity->add_log($row['id'],$user_info['uid'],$user_info['uname'],$content);
|
||||
//短信通知
|
||||
$this->send_msg($row['sid'],$content);
|
||||
$params = [
|
||||
'sid' => $row['s_id'],
|
||||
'car_a' => $old_title,
|
||||
'car_b' => $new_title,
|
||||
];
|
||||
$this->send_msg('SMS_241355543',$params);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -720,16 +725,18 @@ class Orders_v2_entity{
|
||||
* @param $info
|
||||
* @return void
|
||||
*/
|
||||
public function send_msg($sid,$info){
|
||||
if(!$sid || !$info){
|
||||
public function send_msg($template,$params){
|
||||
/**
|
||||
* 模板内容 SMS_241360549
|
||||
* 叮~小爱同学,订单 ${sid} 信息发生变化。车主信息由 ${owner_a} 变更为 ${owner_b},请知悉~
|
||||
* 模板内容 SMS_241355543
|
||||
* 叮~小爱同学,订单 ${sid} 信息发生变化。客户订购车型由 ${car_a} 变更为 ${car_b},请知悉~
|
||||
*/
|
||||
if(!template || !$params){
|
||||
return '';
|
||||
}
|
||||
$mobile = '18950000118';
|
||||
!is_product() && $mobile = '18350451617'; //测试
|
||||
/**
|
||||
* 模板内容
|
||||
* 叮~ 小爱同学,订单 ${sid} 信息发生变化:${info}变
|
||||
*/
|
||||
send_alisms(array('mobile' => $mobile, 'template' => 'SMS_241077742', 'param' => ['sid' => $sid,'info'=>$info]));
|
||||
send_alisms(array('mobile' => $mobile, 'template' => $template, 'param' => $params));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user