Commit e5654588 authored by hujun's avatar hujun

Merge remote-tracking branch 'origin/0702-v.2.2.0' into 0702-v.2.2.0

parents f22e9e08 179ac91c
......@@ -21,7 +21,6 @@ use app\model\NoteLog;
use app\model\UPhoneFollowPp;
use app\model\Users;
use think\Exception;
use Think\Log;
use think\Request;
class Broker extends Basic
......@@ -200,7 +199,6 @@ class Broker extends Basic
*/
private function judgeBand(string $device_id, int $agent_id, string $model, int $type, string $push_id): bool
{
Log::record("push_id -----------------------".$push_id);
$params["agent_id"] = $agent_id;
$result = $this->aBD->getDeviceByAgentId($params);
......@@ -217,16 +215,16 @@ class Broker extends Basic
$is_exits = false;
foreach ($result as $item) {
if ($device_id == $item["device_id"]) {
//当个推返回的id改变时则更新记录
if (!empty($push_id) && $push_id != $item["push_id"]){
$this->aBD->updateDevice([ "id" => $item["id"], "push_id" => $push_id ]);
}
if ($item["is_forbidden"] == 0) {
return true;
} elseif ($item["is_forbidden"] == 1) { //已存在申请关系
$is_exits = true;
}
//当个推返回的id改变时则更新记录
if (!empty($push_id) && $push_id != $item["push_id"]){
Log::record("push_id ----*************-------------------".$push_id);
$this->aBD->updateDevice([ "id" => $item["id"], "push_id" => $push_id ]);
}
}
}
if (!$is_exits && $type == 0)
......
......@@ -497,7 +497,7 @@ class Users extends Model
//->where('create_time','< time',$Two_days_ago)//小于两天前,即排除48小时内受保护的客户
->limit($pagesize)
->page($pagenum)
->field('id as user_id,sex,user_name,user_phone,user_status,agent_id,create_time')
->field('id as user_id,sex,user_name,user_phone,user_status,agent_id,create_time,industry_type,price_demand,area_demand')
->select();
}
......@@ -577,12 +577,14 @@ class Users extends Model
}
public function getAgentByReferrer($field, $params)
{
return Db::name($this->table)
$result = Db::name($this->table)
->field($field)
->alias("a")
->join("a_agents b", "a.referrer_id=b.id", "left")
->where($params)
->select();
// echo $this->getLastSql();
return $result;
}
/**
......
......@@ -23,4 +23,4 @@
if(!doc.addEventListener) return;
win.addEventListener(resizeEvt, recalc, false);
doc.addEventListener('DOMContentLoaded', recalc, false);
})(document, window);</script><script type=text/javascript src=./vconsole.min.js></script><script type=text/javascript>if(~location.origin.indexOf('api.tonglianjituan.com')){console.log('正式服')}else{var vConsole=new VConsole()};</script><link href=./static/css/app.2c71066ef70dbce04427e0ec71aee085.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.94d51f6620cb57f6116c.js></script><script type=text/javascript src=./static/js/app.db402c74b35141cf046c.js></script></body></html>
\ No newline at end of file
})(document, window);</script><script type=text/javascript src=./vconsole.min.js></script><script type=text/javascript>if(~location.origin.indexOf('api.tonglianjituan.com')){console.log('正式服')}else{var vConsole=new VConsole()};</script><link href=./static/css/app.2f68450ee9131bc7966b2a9be394fa22.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.94d51f6620cb57f6116c.js></script><script type=text/javascript src=./static/js/app.d7d3f9bca7c902a57aa7.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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