Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
b3c4803b
Commit
b3c4803b
authored
Oct 22, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
语法错误
parent
dd92db88
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
Remark.php
application/index/controller/Remark.php
+15
-14
No files found.
application/index/controller/Remark.php
View file @
b3c4803b
...
@@ -48,19 +48,19 @@ class Remark extends Basic
...
@@ -48,19 +48,19 @@ class Remark extends Basic
$u_phone_follow
=
new
UPhoneFollowPp
();
$u_phone_follow
=
new
UPhoneFollowPp
();
if
(
!
empty
(
$this
->
params
[
'start_date'
])
&&
empty
(
$this
->
params
[
'end_date'
]))
{
if
(
!
empty
(
$this
->
params
[
'start_date'
])
&&
empty
(
$this
->
params
[
'end_date'
]))
{
$where
[
'create_time'
]
=
[
'> time'
,
$this
->
params
[
'start_date'
]
.
' 00:00:00'
];
$where
[
'create_time'
]
=
[
'> time'
,
$this
->
params
[
'start_date'
]
.
' 00:00:00'
];
}
}
if
(
!
empty
(
$this
->
params
[
'end_date'
])
&&
empty
(
$this
->
params
[
'start_date'
]))
{
if
(
!
empty
(
$this
->
params
[
'end_date'
])
&&
empty
(
$this
->
params
[
'start_date'
]))
{
$where
[
'create_time'
]
=
[
'< time'
,
$this
->
params
[
'end_date'
]
.
' 23:59:59'
];;
$where
[
'create_time'
]
=
[
'< time'
,
$this
->
params
[
'end_date'
]
.
' 23:59:59'
];;
}
}
if
(
!
empty
(
$this
->
params
[
'end_date'
])
&&
!
empty
(
$this
->
params
[
'start_date'
]))
{
if
(
!
empty
(
$this
->
params
[
'end_date'
])
&&
!
empty
(
$this
->
params
[
'start_date'
]))
{
$where
[
'create_time'
]
=
[
'between'
,
[
$this
->
params
[
'start_date'
]
.
' 00:00:00'
,
$this
->
params
[
'end_date'
]
.
' 23:59:59'
]
];
$where
[
'create_time'
]
=
[
'between'
,
[
$this
->
params
[
'start_date'
]
.
' 00:00:00'
,
$this
->
params
[
'end_date'
]
.
' 23:59:59'
]
];
}
}
if
(
!
empty
(
$this
->
params
[
'content'
]))
{
if
(
!
empty
(
$this
->
params
[
'content'
]))
{
$where
[
'content'
]
=
[
'LIKE'
,
"%
{
$this
->
params
[
'content'
]
}
%"
];
$where
[
'content'
]
=
[
'LIKE'
,
"%
{
$this
->
params
[
'content'
]
}
%"
];
}
}
//跟进人名字
//跟进人名字
...
@@ -68,7 +68,7 @@ class Remark extends Basic
...
@@ -68,7 +68,7 @@ class Remark extends Basic
if
(
mb_strlen
(
$this
->
params
[
'remark_name'
])
<
2
)
{
if
(
mb_strlen
(
$this
->
params
[
'remark_name'
])
<
2
)
{
return
$this
->
response
(
101
,
'名字长度不足2位'
);
return
$this
->
response
(
101
,
'名字长度不足2位'
);
}
}
$agent_where
[
'name'
]
=
[
'LIKE'
,
'%'
.
$this
->
params
[
'remark_name'
]
.
'%'
];
$agent_where
[
'name'
]
=
[
'LIKE'
,
'%'
.
$this
->
params
[
'remark_name'
]
.
'%'
];
}
}
//跟进人手机号
//跟进人手机号
...
@@ -114,7 +114,7 @@ class Remark extends Basic
...
@@ -114,7 +114,7 @@ class Remark extends Basic
foreach
(
$agent_id_arr
as
$K
=>
$v
)
{
foreach
(
$agent_id_arr
as
$K
=>
$v
)
{
$agent_id
[]
=
$v
[
'id'
];
$agent_id
[]
=
$v
[
'id'
];
}
}
$where
[
'agent_id'
]
=
[
'in'
,
$agent_id
];
$where
[
'agent_id'
]
=
[
'in'
,
$agent_id
];
}
}
}
}
$field
=
'id,user_id,create_time,content,user_status,labels_id,agent_id as f_agent_id'
;
$field
=
'id,user_id,create_time,content,user_status,labels_id,agent_id as f_agent_id'
;
...
@@ -137,7 +137,7 @@ class Remark extends Basic
...
@@ -137,7 +137,7 @@ class Remark extends Basic
$is_outpace_call_num
=
1
;
$is_outpace_call_num
=
1
;
}
}
$model
=
new
AAgents
();
$model
=
new
AAgents
();
$result
=
$model
->
searchAgentsByKeyword
(
"id,name,phone"
,
[
"id"
=>
$this
->
params
[
"agent_id"
]]);
$result
=
$model
->
searchAgentsByKeyword
(
"id,name,phone"
,
[
"id"
=>
$this
->
params
[
"agent_id"
]]);
//$call = new CallPhoneService();
//$call = new CallPhoneService();
//$result = $call->getBindNum($v['user_phone'],$result[0]['phone']);
//$result = $call->getBindNum($v['user_phone'],$result[0]['phone']);
//if($result != 0){
//if($result != 0){
...
@@ -145,32 +145,32 @@ class Remark extends Basic
...
@@ -145,32 +145,32 @@ class Remark extends Basic
//}
//}
if
(
$is_outpace_call_num
==
1
)
{
if
(
$is_outpace_call_num
==
1
)
{
$is_privacy
=
$redis
->
get
(
's_is_privacy'
);
//判断是否当前经纪人跟当前客户是否有电话绑定 从redis查询
$is_privacy
=
$redis
->
get
(
's_is_privacy'
);
//判断是否当前经纪人跟当前客户是否有电话绑定 从redis查询
if
(
empty
(
$result
[
0
][
'phone'
]))
{
if
(
empty
(
$result
[
0
][
'phone'
]))
{
$m_agent_phone
=
new
AAgentsPhone
();
$m_agent_phone
=
new
AAgentsPhone
();
$agent_phone
=
$m_agent_phone
->
getList
(
1
,
1
,
''
,
'phone'
,
[
'agent_id'
=>
$this
->
userId
]);
$agent_phone
=
$m_agent_phone
->
getList
(
1
,
1
,
''
,
'phone'
,
[
'agent_id'
=>
$this
->
userId
]);
$phone
=
$agent_phone
[
0
][
'phone'
];
$phone
=
$agent_phone
[
0
][
'phone'
];
}
else
{
}
else
{
$phone
=
$result
[
0
][
'phone'
];
$phone
=
$result
[
0
][
'phone'
];
}
}
$call_key
=
'call_'
.
$this
->
userId
.
'_'
.
$phone
.
'_'
.
$v
[
'user_phone'
]
.
'_'
.
$is_privacy
;
$call_key
=
'call_'
.
$this
->
userId
.
'_'
.
$phone
.
'_'
.
$v
[
'user_phone'
]
.
'_'
.
$is_privacy
;
$redis_res
=
$redis
->
get
(
$call_key
);
$redis_res
=
$redis
->
get
(
$call_key
);
if
(
$is_outpace_call_num
==
1
)
{
if
(
$is_outpace_call_num
==
1
)
{
$is_privacy
=
$redis
->
get
(
's_is_privacy'
);
//判断是否当前经纪人跟当前客户是否有电话绑定 从redis查询
$is_privacy
=
$redis
->
get
(
's_is_privacy'
);
//判断是否当前经纪人跟当前客户是否有电话绑定 从redis查询
if
(
empty
(
$result
[
0
][
'phone'
]))
{
if
(
empty
(
$result
[
0
][
'phone'
]))
{
$m_agent_phone
=
new
AAgentsPhone
();
$m_agent_phone
=
new
AAgentsPhone
();
$agent_phone
=
$m_agent_phone
->
getList
(
1
,
1
,
''
,
'phone'
,
[
'agent_id'
=>
$this
->
userId
]);
$agent_phone
=
$m_agent_phone
->
getList
(
1
,
1
,
''
,
'phone'
,
[
'agent_id'
=>
$this
->
userId
]);
$phone
=
$agent_phone
[
0
][
'phone'
];
$phone
=
$agent_phone
[
0
][
'phone'
];
}
else
{
}
else
{
$phone
=
$result
[
0
][
'phone'
];
$phone
=
$result
[
0
][
'phone'
];
}
}
$call_key
=
'call_'
.
$this
->
userId
.
'_'
.
$phone
.
'_'
.
$v
[
'user_phone'
]
.
'_'
.
$is_privacy
;
$call_key
=
'call_'
.
$this
->
userId
.
'_'
.
$phone
.
'_'
.
$v
[
'user_phone'
]
.
'_'
.
$is_privacy
;
$redis_res
=
$redis
->
get
(
$call_key
);
$redis_res
=
$redis
->
get
(
$call_key
);
if
(
empty
(
$redis_res
))
{
if
(
empty
(
$redis_res
))
{
$is_outpace_call_num
=
0
;
$is_outpace_call_num
=
0
;
}
}
}
}
...
@@ -184,6 +184,7 @@ class Remark extends Basic
...
@@ -184,6 +184,7 @@ class Remark extends Basic
$data
[
'data'
][
'total'
]
=
40000
;
$data
[
'data'
][
'total'
]
=
40000
;
return
$this
->
response
(
200
,
'成功'
,
$data
);
return
$this
->
response
(
200
,
'成功'
,
$data
);
}
}
}
/**
/**
* @return \think\Response
* @return \think\Response
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment