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
4a323edb
Commit
4a323edb
authored
Oct 22, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
跟进区分城市
parent
4c532c49
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
47 deletions
+8
-47
Basic.php
application/api_broker/extend/Basic.php
+8
-5
BatchProcessing.php
application/index/controller/BatchProcessing.php
+0
-42
No files found.
application/api_broker/extend/Basic.php
View file @
4a323edb
...
@@ -29,6 +29,7 @@ class Basic extends Controller
...
@@ -29,6 +29,7 @@ class Basic extends Controller
public
$request
;
public
$request
;
public
$params
;
public
$params
;
public
$city
;
public
$city
;
public
$siteId
;
protected
$authToken
;
protected
$authToken
;
/**
/**
...
@@ -121,13 +122,15 @@ class Basic extends Controller
...
@@ -121,13 +122,15 @@ class Basic extends Controller
try
{
try
{
$redis_
=
RedisExt
::
getRedis
();
$redis_
=
RedisExt
::
getRedis
();
if
(
$redis_
)
{
if
(
$redis_
)
{
$city
=
$redis_
->
get
(
"agent_city_"
.
$agentId
);
$this
->
city
=
$redis_
->
get
(
"agent_city_"
.
$agentId
);
$this
->
city
=
empty
(
$city
)
?
"上海市"
:
$city
;
$this
->
siteId
=
$redis_
->
get
(
"agent_site_id_"
.
$agentId
);
}
else
{
}
$this
->
city
=
"上海市"
;
if
(
empty
(
$this
->
city
)
||
empty
(
$this
->
siteId
)){
//取数据库
}
}
}
catch
(
Exception
$exception
)
{
}
catch
(
Exception
$exception
)
{
$this
->
city
=
"上海市"
;
echo
json_encode
(
array
(
"code"
=>
"300"
,
"msg"
=>
$exception
,
"data"
=>
[],
"type"
=>
"json"
));
exit
;
}
}
...
...
application/index/controller/BatchProcessing.php
View file @
4a323edb
...
@@ -2,10 +2,8 @@
...
@@ -2,10 +2,8 @@
namespace
app\index\controller
;
namespace
app\index\controller
;
use
app\extra\RedisExt
;
use
app\index\extend\Basic
;
use
app\index\extend\Basic
;
use
app\model\GBusinessDistrict
;
use
app\model\GBusinessDistrict
;
use
app\model\UPhoneFollowPp
;
use
think\Log
;
use
think\Log
;
/**
/**
...
@@ -92,45 +90,5 @@ class BatchProcessing extends Basic
...
@@ -92,45 +90,5 @@ class BatchProcessing extends Basic
}
}
/**
* 设置电话跟进保护期
*/
public
function
updatePhoneFollowUpIsShow
(){
$success_num_
=
0
;
$success_num
=
0
;
$model
=
new
UPhoneFollowPp
();
$redis
=
RedisExt
::
getRedis
();
//$redis->set('set_user_save_time_1', 1, 24 * 3600);
$field
=
'id,user_id'
;
$params
=
''
;
$result
=
$model
->
getPhoneFollow
(
$field
,
$params
);
//dump($result);
foreach
(
$result
as
$k
=>
$v
)
{
$success_num_
++
;
//$is_show = 1 ;
//todo 查询redis 是否过保护期
$redis_res
=
$redis
->
get
(
'set_user_save_time_'
.
$v
[
"id"
]);
//找到返回'1' 找不到返回'false'
if
(
$redis_res
){
$success_num
++
;
$is_show
=
0
;
//todo 更新记录
$insert
=
[];
$insert
[
"id"
]
=
$v
[
"id"
];
$insert
[
"is_show"
]
=
$is_show
;
$res
=
$model
->
updatePhoneFollow
(
$insert
);
//int(1)
}
}
return
$this
->
response
(
"200"
,
"处理完成"
,[
'处理数'
=>
$success_num_
,
'修改数'
=>
$success_num
]);
}
}
}
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