Commit 42dac23f authored by hujun's avatar hujun

登录处理单个账号

parent 8591ec67
......@@ -189,6 +189,19 @@ class Broker extends Basic
$redis_->set("agent_city_" . $agents_data['id'], $site_city[0]['city']);
$redis_->set("agent_site_id_" . $agents_data['id'], $agents_data['site_id']);
/*处理多个手机登录*/
$m_bind = new ABindingDevice();
$bind_where['push_id'] = $params["push_id"];
$bind_where['device_id'] = $params["device_id"];
$bind_where['agent_id'] = ['<>', $agents_data_list['id']];
$del_bind_id = $m_bind->getDeviceByAgentId($bind_where, 'id,device_id,push_id');
if (count($del_bind_id) > 0) {
foreach ($del_bind_id as $v) {
$m_bind->updateDevice(['id'=>$v['id'],'is_forbidden'=>1]);
}
}
/*处理多个手机登录*/
return $this->response(200, $data['msg'], $data['data']);
}
......
......@@ -80,7 +80,9 @@ class ABindingDevice extends BaseModel
if (isset($params["is_pc"])) {
$where_["is_pc"] = $params["is_pc"];
}
if (isset($params["push_id"])) {
$where_["push_id"] = $params["push_id"];
}
try {
$data = $this
->field($field)
......
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