Commit 09b4fc6f authored by zw's avatar zw

跟进区分城市

parent 3ff59a53
......@@ -134,8 +134,6 @@ class Basic extends Controller
echo json_encode(array( "code" => "300", "msg" => $exception, "data" => [], "type" => "json" ));
exit;
}
}
/**
......
......@@ -307,7 +307,7 @@ class Member extends Basic{
a.user_name,a.status,a.first_login_time,a.last_login_time,a.agent_id,a.vip,a.price_demand,a.industry_type,a.area_demand,a.user_status,a.source';
try {
$data_list = $this->user->getUserAgent($pageNo, $pageSize, 'a.id DESC', $fields, $where, $type);
$data_list = $this->user->getUserAgent($pageNo, $pageSize, 'a.id DESC', $fields, $where, $type,$this->siteId);
$clientService = new ClientService();
$list = [];
foreach ($data_list as $k=>$v) {
......
......@@ -38,6 +38,7 @@ class Basic extends Controller
public $lastLoginTime;
public $city;
public $siteId;
protected $filterVerify = array(
'index/login',
......@@ -289,7 +290,6 @@ class Basic extends Controller
$result = $records->record($agents_id, $type, $remark, '',$user_id);
return $result;
}
/**
* 默认城市选择
* @param $agentId
......@@ -299,15 +299,17 @@ class Basic extends Controller
try {
$redis_ = RedisExt::getRedis();
if ($redis_) {
$city = $redis_->get("agent_city_" . $agentId);
$this->city = empty($city) ? "上海市" : $city;
} else {
$this->city = $redis_->get("agent_city_" . $agentId);
$this->siteId = $redis_->get("agent_site_id_" . $agentId);
}
if(empty($this->city) || empty($this->siteId)){
//取数据库
$this->city = "上海市";
$this->siteId = "10001";
}
} catch (Exception $exception) {
$this->city = "上海市";
echo json_encode(array( "code" => "300", "msg" => $exception, "data" => [], "type" => "json" ));
exit;
}
}
}
\ No newline at end of file
......@@ -112,7 +112,7 @@ class Users extends Model
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getUserAgent($pageNo = 1, $pageSize = 15, $order_ = 'a.id desc', $fields = '*', $params = '', $type = 0)
public function getUserAgent($pageNo = 1, $pageSize = 15, $order_ = 'a.id desc', $fields = '*', $params = '', $type = 0,$site_id)
{
$data = [];
......@@ -162,7 +162,7 @@ class Users extends Model
->select();
}
//echo Db::table($this->table)->getLastSql();
$user_follow = new UPhoneFollowPp();
$user_follow = new UPhoneFollowPp($site_id);
foreach ($result as $k => $v) {
$data[$k] = $v->getData();
......
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