Commit 7e7e9f61 authored by clone's avatar clone

Merge branch 'test' into test-0806-bug

# Conflicts: # application/api_broker/controller/Shop.php # application/api_broker/service/BrokerService.php # application/index/controller/CellPhone.php # application/index/controller/Login.php
parents 0c1c652b a9def140
......@@ -130,6 +130,7 @@ class HomePageLog extends Basic
$where_["a.phone|a.name"] = array( "like", "%" . trim($params["name_or_phone"]) . "%" );
}
$where_["c.city"] = "上海市";
$join = [
[ 'a_agents a', 'a.id=f.agent_id', 'left' ],
[ 'a_store b', 'b.id=a.store_id', 'left' ],
......
......@@ -85,7 +85,7 @@ class Shop extends Basic
} else {
$field = "id,internal_title as title,internal_address as address,city,disc,business_district_id,status,industry_type
,shop_area_start,shop_area_end,shop_type,residue_num,shop_sign,is_carefully_chosen,rent_type,rent_price";
$conditions["city"] = "上海市";
$conditions["city"] = trim($this->city);
}
......
......@@ -50,11 +50,16 @@ class BrokerService
}
$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 ]);
}
//todo 1.判断ip是否相同$device_id字段,2.ip不同则判断push_id是否相同,相同更新ip,3.ip相同则判断push_id是否相同,
if ($model == $item["model"] && !empty($push_id) &&
(($device_id != $item["device_id"] && $push_id == $item["push_id"]) ||
($device_id == $item["device_id"] && $push_id != $item["push_id"]))
) {
$this->aBD->updateDevice([ "id" => $item["id"], "push_id" => $push_id, "device_id" => $device_id ]);
return true;
}
if (($is_pc == 0 && $device_id == $item["device_id"])
|| ($is_pc == 1 && $push_id == $item["push_id"] && $device_id == $item["device_id"])) {
if ($item["is_forbidden"] == 0) {
return true;
} elseif ($item["is_forbidden"] == 1) { //已存在申请关系
......@@ -62,6 +67,8 @@ class BrokerService
}
}
}
if (!$is_exits && $type == 0)
//新增申请绑定关系,需要后台同意登陆
......
......@@ -1149,7 +1149,7 @@ class OrderLogService
return $cent_commissions;
} else {
$item = $params[0];
$agent_id = $params[0]["agent_id"];
$role = !empty($params[0]["role"]) ? $params[0]["role"] : $params[0]["roles"];
$cent_commission["id"] = $item["id"];
$cent_commission["agent_id"] = $item["agent_id"];
......@@ -1164,7 +1164,7 @@ class OrderLogService
$length = count($params);
for ($j = 0; $j < $length; $j++) {
$value = $params[$j];
if ($value["agent_id"] == $agent_id) {
if ($value["role"] == $role || $value["roles"] == $role) {
$arr["real_fee"] = $value["real_fee"];
$arr["create_time"] = $value["create_time"];
$arr["confirm_date"] = $value["confirm_date"];
......
......@@ -268,6 +268,7 @@ class Houses extends Basic
$where['a.shop_area_start'] = ['>', 0];
}
}
$where['a.city'] = '上海市';
$data['data']['list'] = $this->house->getHouseListDish($pageNo, $pageSize, 'a.id DESC', $fields, $where, $this->userId);
$data['data']['total'] = $this->house->getHouseListDishTotal($where);
......
......@@ -80,12 +80,14 @@ class Login extends Basic
}
$last_login_ip = ip2long($this->request->ip());
/* if ($user_data['id'] != 1) {
if ($user_data['id'] != 1) {
//判断设备id是否存在
$is_login = $this->brokerService->judgeBand($last_login_ip, $user_data['id'], $model, 0,$only_id , 1);
if (!$is_login) {
return $this->response("102", "该账号没有绑定该设备的浏览器,请致电财务徐伟洋进行绑定。");
}
}
}*/
$where_rule['status'] = 0;
......
......@@ -98,7 +98,7 @@ class Notice extends Basic
$service_push = new PushMessageService();
$url = 'app/dist/index.html#/announcementDetails?id='.$this->m_push->id;
$this->m_push->editData(['link'=> CURRENT_URL . $url], $this->m_push->id);
$service_push->pushAll($data['title'], mb_substr($data['content'],0,10).'...' , $url);
$service_push->pushAll($data['title'], '点击查看公告内容', $url);
return $this->response(200, '新增成功!');
}
......
<script src='/resource/lib/js/require.min.js' data-main='/resource/js/main?version=123' charset='utf-8'></script>
\ No newline at end of file
<script src='/resource/lib/js/require.min.js' data-main='/resource/js/main?version=121231' charset='utf-8'></script>
\ No newline at end of file
......@@ -28,7 +28,7 @@ class SecretReport extends BaseModel
$data = $this->field($field)->alias('a')
->join('a_agents b','a.agents_id=b.id','left')
->join('u_users c','a.users_id=c.id','left')
->join('u_phone_follow_up d','d.user_id=c.id','left')
->where($params)
->order($order_)
->limit($pageSize)
......@@ -54,10 +54,13 @@ class SecretReport extends BaseModel
$user_data = Db::table('u_users')->field('user_name,user_phone')->where('id',$v->users_id)->find();
$user_data['user_name'] = empty($user_data['user_name']) ? '?.?' : $user_data['user_name'];
$result[$k]['user_name'] = $user_data['user_name'] .'-'. hide_customer_phone($user_data['user_phone']);
// $result[$k]['follow_up'] = Db::table('u_phone_follow_up')->where('user_id',$v->users_id)->order('id DESC')->value('content');
$where_follow['user_id'] = $v->users_id;
$where_follow['type'] = 0;
$where_follow['agent_id'] = $v['agents_id'];
$result[$k]['content'] = Db::table('u_phone_follow_up')->where($where_follow)->order('id DESC')->value('content');
} else {
$result[$k]['user_nick'] = "";
$result[$k]['follow_up'] = "";
$result[$k]['content'] = "";
}
if ($v->voice_file) {
......@@ -102,7 +105,6 @@ class SecretReport extends BaseModel
return $this->alias('a')
->join('a_agents b','a.agents_id=b.id','left')
->join('u_users c','a.users_id=c.id','left')
->join('u_phone_follow_up d','d.user_id=c.id','left')
->where($params)
->count();
}
......
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