Commit cea6e51b authored by clone's avatar clone

Merge branch 'test'

parents 9c1a8c43 586991fd
......@@ -50,19 +50,26 @@ 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($device_id == $item["device_id"] && $push_id == $item["push_id"]){
if ($item["is_forbidden"] == 0) {
return true;
} elseif ($item["is_forbidden"] == 1) { //已存在申请关系
$is_exits = true;
}
}
}
if (!$is_exits && $type == 0)
//新增申请绑定关系,需要后台同意登陆
$this->aBD->addDevice([ "device_id" => $device_id,
......
......@@ -696,7 +696,7 @@ class OrderLogService
}
}
$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";
$field_report = "a.id,a.create_time,a.predict_see_time,a.intro,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($result) <= 0 && count($reportData) <= 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"];
......
......@@ -222,12 +222,14 @@ class PushMessageService
/**
* @param $id
* @param $device_id
* @param $title
* @param $content
* @param null $type
* @param null $user_id
* @return bool
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function pushAgentAllDeviceId($id, $title, $content, $type = null, $user_id = null)
{
......@@ -236,7 +238,7 @@ class PushMessageService
}
$m_agent_device = new ABindingDevice();
$device_id_array = $m_agent_device->getDeviceByAgentId([ 'agent_id' => $id ], 'id,push_id');
$device_id_array = $m_agent_device->getDeviceByAgentId([ 'agent_id' => $id, 'is_forbidden'=>0], 'id,push_id');
if (!empty($device_id_array)) {
foreach ($device_id_array as $k => $v) {
......
......@@ -98,7 +98,7 @@ class PlsDemo
$request->setPhoneNoX($phoneNoX);
//可选:期望分配X号码归属的地市(省去地市后缀后的城市名称)
$request->setExpectCity("北京");
$request->setExpectCity("");
//必填:绑定关系对应的失效时间-不能早于当前系统时间
$request->setExpiration($time);
......
......@@ -157,8 +157,8 @@
</div>
<script type="text/javascript" src="/app/js/jquery-1122-min.js"></script>
<script src="/app/js/common.js?new41" charset="utf-8"></script>
<script src="/app/js/customerinfo_details_new.js?new48"></script>
<script src="/app/js/common.js?new42" charset="utf-8"></script>
<script src="/app/js/customerinfo_details_new.js?new49"></script>
</body>
......
......@@ -39,7 +39,7 @@ class CellPhone extends Basic
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
$report = new SecretReport();
$field = 'agents_id,users_id,call_type,call_time,time,voice_file,user_status,a.id,a.create_time,type,secret_no';
$field = 'agents_id,users_id,call_type,call_time,time,voice_file,c.user_status,a.id,a.create_time,a.type,secret_no,d.content';
$where = [];
if (!empty($this->params['start_date'])) {
......
......@@ -80,13 +80,13 @@ 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($only_id, $user_data['id'], $model, 0, $user_data['phone'], 1);
$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;
if ($user_data['id'] == 1) {
......
......@@ -191,7 +191,7 @@ class Basic extends Controller
$time = time();
//登录有效期为2小时
if (($time - $this->lastLoginTime) > 7200) {
if (($time - $this->lastLoginTime) > 36000) {
$this->redirect('/index/login');
} else {
//更新时间
......
......@@ -58,14 +58,17 @@ class ABindingDevice extends BaseModel
}
}
/**
* 根据经纪人id获取绑定过的设备id
*
* @param array $params
* @param string $field
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getDeviceByAgentId(array $params, string $field = "id,agent_id,device_id,is_forbidden,push_id,is_pc")
public function getDeviceByAgentId(array $params, string $field = "id,agent_id,device_id,is_forbidden,model,push_id,is_pc")
{
$where_ = [];
if (isset($params["agent_id"])) {
......
......@@ -113,6 +113,13 @@ class GHouses extends BaseModel
$data['landlord_phone'] = empty($data['landlord_phone']) ? "" : $data['landlord_phone'];
$data['internal_item_advantage'] = empty($data['internal_item_advantage']) ? "" : $data['internal_item_advantage'];
$data['fee_rule'] = empty($data['fee_rule']) ? "" : $data['fee_rule'];
$data['opening_date'] = empty($data['opening_date']) ? '' : $data['opening_date'];
$data['operation_id'] = empty($data['operation_id']) ? '' : $data['operation_id'];
$data['payment_month'] = empty($data['payment_month']) ? '' : $data['payment_month'];
$data['city_code'] = empty($data['city_code']) ? "" : $data['city_code'];
$data['disc_code'] = empty($data['disc_code']) ? "" : $data['disc_code'];
$data['deposit_month'] = empty($data['deposit_month']) ? '' : $data['deposit_month'];
if ($app == 0) {
foreach ($img_data as $k => $v) {
switch ($v->img_type) {
......
......@@ -28,6 +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)
......@@ -53,7 +54,7 @@ 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');
// $result[$k]['follow_up'] = Db::table('u_phone_follow_up')->where('user_id',$v->users_id)->order('id DESC')->value('content');
} else {
$result[$k]['user_nick'] = "";
$result[$k]['follow_up'] = "";
......@@ -101,6 +102,7 @@ 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();
}
......
......@@ -181,6 +181,11 @@ header .icon-link{
height: 100%;
}
/*约带看部分颜色不同*/
.sp-yuedaikan-beizhu-span{
color: #999;
}
/*基本信息部分*/
.sec-info{
font-size: .3rem;
......
......@@ -58,8 +58,7 @@ function loadMain(){
//获取客户基本信息
$.ajax({
type: 'POST',
url: ServerHostTempC + '/broker/useraction_search',
//url: '/broker/useraction_search',
url: '/broker/useraction_search',
data: {
'AuthToken': _token,
'user_id': Number(_customerId),//客户id
......@@ -144,6 +143,13 @@ function loadMain(){
'7': obj['explain_img']?'<ol class="li-img-list"><li><a href="/app_broker/imagebody?fullUrl='+obj['img_path']+obj['explain_img']+'"><img src="'+obj['img_path']+obj['explain_img']+'" /></a></li></ol>':''
});
};
//约带看时的特殊处理
function dealSpYdk(obj){
return '<p>到场时间:{0}</p><p class="sp-yuedaikan-beizhu-span">备注:{1}</p>'.stringFormatObj({
'0': obj['predict_see_time'],
'1': obj['intro']
});
};
var _htmlTemp = '';
if(data['data']['user_date'] && data['data']['user_date'].length > 0){
$.each(data['data']['user_date'], function(i, item) {
......@@ -153,7 +159,7 @@ function loadMain(){
'2': item['step_name']=='phone_fllow_up'?'电话跟进:':(item['step_name']=='fllow_up'?'跟进:':''),
'3': (item['create_time']==null?null:item['create_time']),
'5': item['step'],
'6': item['step_name']=='follow_up_log'?dealSp(item):'',
'6': item['step_name']=='follow_up_log'?dealSp(item):(item['step_name']=='report'?dealSpYdk(item):''),
'7': (item['step_name']=='report' || item['step_name']=='march_in')?'li-sp-active':''
});
});
......
......@@ -99,7 +99,8 @@ $(function() {
only_id = result;
//result即为获取到的浏览器指纹值
var browser_version = NV.shell + '/' + NV.version;
// var browser_version = NV.shell + '/' + NV.version;获取浏览器的类型 及 浏览器版本
var browser_version = NV.shell;//获取浏览器的类型
console.log(browser_version);
$.ajax({
type: 'POST',
......
......@@ -30,8 +30,8 @@
<td>[%= it[item]['time'] %]</td>
<!--<td>[%= it[item]['price'] %] </td>-->
<td>
[% if(it[item]['follow_up'] != null) { %]
[%= it[item]['follow_up'] %]
[% if(it[item]['content'] != null) { %]
[%= it[item]['content'] %]
[% } %]
[% if(it[item]['user_status'] == 0) { %]
......
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