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
354bc04d
Commit
354bc04d
authored
Apr 18, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app客户跟进查缓存
parent
467b2661
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
11 deletions
+25
-11
HomePageLog.php
application/api_broker/controller/HomePageLog.php
+24
-10
RedisCacheService.php
application/api_broker/service/RedisCacheService.php
+1
-1
No files found.
application/api_broker/controller/HomePageLog.php
View file @
354bc04d
...
...
@@ -130,17 +130,31 @@ class HomePageLog extends Basic
}
$clientService
=
new
ClientService
();
$m_label
=
new
ULabels
();
$label_data
=
$m_label
->
getColumn
(
'id,name'
,
[
'type'
=>
1
]);
//获取标签
// $m_label = new ULabels();
$redis_service
=
new
RedisCacheService
();
// $label_data = $m_label->getColumn('id,name', ['type' => 1]); //获取标签
$label_data
=
$redis_service
->
userCallLabelCache
();
foreach
(
$result
as
$key
=>
$value
)
{
$agent_params
=
[];
$agent_params
[
"a.id"
]
=
$value
[
'agent_id'
];
$agent_field
=
"a.name,a.img,b.store_name"
;
$model
=
new
AAgents
();
$res_a
=
$model
->
getAgentsInfo
(
$agent_field
,
$agent_params
);
$result
[
$key
][
'name'
]
=
$res_a
[
0
][
'name'
];
$result
[
$key
][
'img'
]
=
$res_a
[
0
][
'img'
];
$result
[
$key
][
'store_name'
]
=
$res_a
[
0
][
'store_name'
];
// $agent_params = [];
// $agent_params["a.id"] = $value['agent_id'];
// $agent_field = "a.name,a.img,b.store_name";
// $model = new AAgents();
// $res_a = $model->getAgentsInfo($agent_field, $agent_params);
// $result[$key]['name'] = $res_a[0]['name'];
// $result[$key]['img'] = $res_a[0]['img'];
// $result[$key]['store_name'] = $res_a[0]['store_name'];
if
(
$value
[
'agent_id'
])
{
$res_a
=
$redis_service
->
getRedisCache
(
2
,
$value
[
'agent_id'
]);
$result
[
$key
][
'name'
]
=
$res_a
[
'name'
];
$result
[
$key
][
'img'
]
=
$res_a
[
'img'
];
$result
[
$key
][
'store_name'
]
=
$res_a
[
'store_name'
];
}
else
{
$result
[
$key
][
'name'
]
=
''
;
$result
[
$key
][
'img'
]
=
''
;
$result
[
$key
][
'store_name'
]
=
''
;
}
if
(
$if_search
)
$result
[
$key
][
'create_time'
]
=
date
(
"Y-m-d H:i:s"
,
$value
[
"create_time"
]
/
1000
);
...
...
application/api_broker/service/RedisCacheService.php
View file @
354bc04d
...
...
@@ -37,7 +37,7 @@ class RedisCacheService
public
function
__construct
()
{
$this
->
redis_ext
=
RedisExt
::
getRedis
();
$this
->
time
=
1800
;
//30分钟
$this
->
time
=
86400
;
//24小时
$this
->
max_time
=
2592000
;
//30天
}
...
...
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