修改理车宝接口手机号脱敏和h5提交补贴信息短信通知
This commit is contained in:
@@ -86,7 +86,7 @@ class Customers extends Wxapp
|
||||
'id' => $row['id'],
|
||||
'cid' => $row['cid'],
|
||||
'name' => $row['name'],
|
||||
'mobile' => $this->get_mobile(['mobile' => $row['mobile'], 'rid' => $row['rid']]),
|
||||
'mobile' => $this->get_mobile(['mobile' => $row['mobile'], 'rid' => $row['rid'], 'un_lock' => $row['un_lock']]),
|
||||
'complete_mobile' => $row['mobile'],
|
||||
'tip' => $tip,
|
||||
'is_top' => $row['is_top'],
|
||||
@@ -129,7 +129,7 @@ class Customers extends Wxapp
|
||||
$row['cf_pid'] && $paic_user = $this->app_paic_users_model->get(['id' => $row['cf_pid']]);
|
||||
$data['baseinfo'] = [
|
||||
'name' => ['value' => $row['name'], 'cn' => '客户姓名'],
|
||||
'mobile' => ['value' => $this->get_mobile(['mobile' => $row['mobile'], 'rid' => $row['rid']]), 'cn' => '客户电话'],
|
||||
'mobile' => ['value' => $this->get_mobile(['mobile' => $row['mobile'], 'rid' => $row['rid']]), 'cn' => '客户电话', 'un_lock' => $row['un_lock']],
|
||||
// 'c_brand' => $row['c_brand'],
|
||||
'of_id' => ['value' => $of_title, 'of_id' => intval($row['of_id']), 'of2_id' => intval($row['of2_id']), 'cn' => '客户来源', 'edit_status' => $edit_status],
|
||||
'buy_time' => ['value' => $row['buy_time'], 'cn' => '预计购车时间'],
|
||||
@@ -1015,7 +1015,7 @@ class Customers extends Wxapp
|
||||
}
|
||||
$tip = $status_name[$val['status']] ? $status_name[$val['status']] : '';
|
||||
$left_time = 0;
|
||||
$mobile = $this->get_mobile(['mobile' => $val['mobile'], 'rid' => $val['rid']]);
|
||||
$mobile = $this->get_mobile(['mobile' => $val['mobile'], 'rid' => $val['rid'], 'un_lock' => $val['un_lock']]);
|
||||
if ($param['biz_type'] == Biz_model::BIZ_TYPE_4s) {
|
||||
!$param['un_lock'] && $mobile = mobile_asterisk($mobile);
|
||||
$rec_time = strtotime($val['rec_time']);
|
||||
@@ -1355,7 +1355,7 @@ class Customers extends Wxapp
|
||||
$lists[] = [
|
||||
'id' => $val['id'],
|
||||
'name' => $val['name'],
|
||||
'mobile' => $this->get_mobile(['mobile' => $val['mobile'], 'rid' => $val['rid']]),
|
||||
'mobile' => $this->get_mobile(['mobile' => $val['mobile'], 'rid' => $val['rid'], 'un_lock' => $val['un_lock']]),
|
||||
'reason' => $reason,
|
||||
];
|
||||
}
|
||||
@@ -1448,11 +1448,20 @@ class Customers extends Wxapp
|
||||
private function get_mobile($params)
|
||||
{
|
||||
$mobile = $params['mobile'];
|
||||
return $mobile;
|
||||
if (!$mobile) {
|
||||
return '';
|
||||
} elseif ($params['rid']) {
|
||||
return mobile_asterisk($mobile);
|
||||
$biz_type = $this->get_biz('type');
|
||||
if ($biz_type != Biz_model::BIZ_TYPE_4s) { //非4s店都脱敏
|
||||
return mobile_asterisk($mobile);
|
||||
} else {
|
||||
$clues = $this->clues_model->get(array('id' => $params['rid']));
|
||||
if ($clues['app_id'] == Receiver_clues_model::APP_ID_ACTIVITY && $params['un_lock'] == 1) { //来源活动报名且解锁
|
||||
return $mobile;
|
||||
} else {
|
||||
return mobile_asterisk($mobile);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return $mobile;
|
||||
}
|
||||
|
||||
@@ -166,6 +166,10 @@ class AutoUserCouponEntity
|
||||
//跟新客户为订单客户
|
||||
$this->ci->receiver_customers_model->update(['status' => 2], ['id' => $customersRow['id']]);
|
||||
$this->ci->db->trans_commit();
|
||||
//发送短信给店长
|
||||
$this->ci->load->model('app/licheb/app_licheb_users_model');
|
||||
$this->ci->app_licheb_users_model->set_db('ssdb');
|
||||
$this->ci->app_licheb_users_model->sendSmsToManager($bizId, "门店新增了一个订单,请及时到小程序“理车宝-订单”进行处理。");
|
||||
return new MyRESPONSE(EXIT_SUCCESS, '核销成功');
|
||||
} catch (Exception $e) {
|
||||
$this->ci->db->trans_rollback();
|
||||
|
||||
@@ -43,4 +43,22 @@ class App_licheb_users_model extends HD_Model
|
||||
{
|
||||
return $this->group_arr;
|
||||
}
|
||||
|
||||
/**
|
||||
* 给店长发短信
|
||||
* @param $bizId
|
||||
* @param $content
|
||||
* @return true
|
||||
*/
|
||||
public function sendSmsToManager($bizId, $content)
|
||||
{
|
||||
$where = array('biz_id' => $bizId, 'status' => 1, 'group_id' => 2);
|
||||
$res_u = $this->select($where);
|
||||
if ($res_u) {
|
||||
foreach ($res_u as $v) {
|
||||
ems_sms($v['mobile'], $content);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user