Commit d21d2569 authored by hujun's avatar hujun

邀请手机号码隐藏4位

parent 18adac84
......@@ -7,13 +7,17 @@ use Endroid\QrCode\QrCode;
* @author fuju
*/
class GenerateCodeUntils {
/**
* 生成二维码
*
* @param type $param
*
* @param $param
* @param $file_name
* @return string
* @throws \Endroid\QrCode\Exception\InvalidWriterException
*/
public function getCode($param, $file_name) {
$path = 'static'.DS.'qrcode'.DS.date(Ymd);
$path = 'static'.DS.'qrcode'.DS.date('Ymd');
if (!file_exists($path)) {
mkdir($path, 0777);
......
......@@ -359,7 +359,8 @@ class Client extends Basic
$data['data'] = $this->user->getUserByWhere($where, $fields);
foreach ($data['data'] as $k=>$v) {
$data['data'][$k]['user_pic'] = HEADERIMGURL.$v['user_pic'];
$data['data'][$k]['user_pic'] = HEADERIMGURL.$v['user_pic'];
$data['data'][$k]['user_phone'] = hide_customer_phone($v['user_phone']);
}
$data['status'] = 200;
......
......@@ -315,10 +315,48 @@ class OrderLogService
$oRefundModel = new ORefundModel();
$oBargainModel = new OBargainModel();
$uPhoneFollowModel = new UPhoneFollowPp();
//电话跟进
$userParams["user_id"] = $user_id;
$userParams["type"] = 1; //电话跟进
$field_user_follow = "a.id,a.content,a.user_id,a.agent_id,a.type,a.create_time,a.user_status,b.name,b.phone,b.img,c.store_name";
$bargainData = $uPhoneFollowModel->getFollowUpListByUserId($field_user_follow, $userParams);
if (count($bargainData) > 0) {
foreach ($bargainData as $k => $v) {
$type = "无效";
if($v["user_status"] == 0){
$type = "求租";
}elseif($v["user_status"] == 1){
$type = "已租";
}
$v["step_name"] = "phone_follow_up";
$v["step"] = "电话跟进:".$v['content']."【". $type ."】";
$result[$sort++] = $v;
}
}
//跟进
$userParams["type"] = 2; //普通跟进
$bargainData = $uPhoneFollowModel->getFollowUpListByUserId($field_user_follow, $userParams);
if (count($bargainData) > 0) {
foreach ($bargainData as $k => $v) {
$type = "无效";
if($v["user_status"] == 0){
$type = "求租";
}elseif($v["user_status"] == 1){
$type = "已租";
}
$v["step_name"] = "follow_up";
$v["step"] = "跟进:".$v['content']."【". $type ."】";
$result[$sort++] = $v;
}
}
$field_report = "a.id,a.create_time,b.id as order_id,b.house_title,c.id as agent_id,c.name,c.img,d.store_name";
$reportData = $oReportModel->selectReportByUserId($field_report, [ "user_id" => $user_id ]);
if (count($reportData) <= 0) {
if (count($result) <= 0 && count($reportData) <= 0) {
return [];
}
......@@ -401,43 +439,7 @@ class OrderLogService
}
}
$uPhoneFollowModel = new UPhoneFollowPp();
//电话跟进
$userParams["user_id"] = $user_id;
$userParams["type"] = 0; //电话跟进
$field_user_follow = "a.id,a.content,a.user_id,a.agent_id,a.type,a.create_time,a.user_status,b.name,b.phone,b.img,c.store_name";
$bargainData = $uPhoneFollowModel->getFollowUpListByUserId($field_user_follow, $userParams);
if (count($bargainData) > 0) {
foreach ($bargainData as $k => $v) {
$type = "无效";
if($v["user_status"] == 0){
$type = "求租";
}elseif($v["user_status"] == 1){
$type = "已租";
}
$v["step_name"] = "phone_follow_up";
$v["step"] = "电话跟进:".$v['content']."【". $type ."】";
$result[$sort++] = $v;
}
}
//跟进
$userParams["type"] = 1; //普通跟进
$bargainData = $uPhoneFollowModel->getFollowUpListByUserId($field_user_follow, $userParams);
if (count($bargainData) > 0) {
foreach ($bargainData as $k => $v) {
$type = "无效";
if($v["user_status"] == 0){
$type = "求租";
}elseif($v["user_status"] == 1){
$type = "已租";
}
$v["step_name"] = "follow_up";
$v["step"] = "跟进:".$v['content']."【". $type ."】";
$result[$sort++] = $v;
}
}
return $this->sortByTime($result);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment