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
57f04cd9
Commit
57f04cd9
authored
Apr 11, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商铺跟进和客户跟进 经纪人信息取缓存
parent
dbd3a9eb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
19 deletions
+43
-19
HomePageLog.php
application/api_broker/controller/HomePageLog.php
+43
-19
No files found.
application/api_broker/controller/HomePageLog.php
View file @
57f04cd9
...
...
@@ -4,6 +4,7 @@ namespace app\api_broker\controller;
use
app\api_broker\extend\Basic
;
use
app\api_broker\service\ClientService
;
use
app\api_broker\service\RedisCacheService
;
use
app\api_broker\service\UserExpiredTimeService
;
use
app\api_broker\service\VerifyRepetitionService
;
use
app\extra\RedisExt
;
...
...
@@ -125,17 +126,30 @@ class HomePageLog extends Basic
$result
=
$this
->
uPhoneFollowUpModel
->
getFollowList
(
$pageNo
,
$pageSize
,
''
,
$field
,
$where
);
}
$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'
])
{
$agent_data
=
$redis_service
->
getRedisCache
(
2
,
$value
[
'agent_id'
]);
$result
[
$key
][
'name'
]
=
$agent_data
[
'name'
];
$result
[
$key
][
'img'
]
=
$agent_data
[
'img'
];
$result
[
$key
][
'store_name'
]
=
$agent_data
[
'store_name'
];
}
else
{
$result
[
$key
][
'name'
]
=
[];
$result
[
$key
][
'img'
]
=
[];
$result
[
$key
][
'store_name'
]
=
[];
}
//判断客户是否超过24小时保护期间 0:保护器内 1:超过保护期
$ser
=
new
UserExpiredTimeService
();
...
...
@@ -260,18 +274,28 @@ class HomePageLog extends Basic
return
$this
->
response
(
"200"
,
"request null"
);
}
}
$redis_service
=
new
RedisCacheService
();
$order
=
"f.id desc"
;
$result
=
$this
->
gHouseFollowUpModel
->
getSearch
(
$pageNo
,
$pageSize
,
$order
,
$field
,
$where_
,
""
);
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'
])
{
$agent_data
=
$redis_service
->
getRedisCache
(
2
,
$value
[
'agent_id'
]);
$result
[
$key
][
'name'
]
=
$agent_data
[
'name'
];
$result
[
$key
][
'img'
]
=
$agent_data
[
'img'
];
$result
[
$key
][
'store_name'
]
=
$agent_data
[
'store_name'
];
}
else
{
$result
[
$key
][
'name'
]
=
[];
$result
[
$key
][
'img'
]
=
[];
$result
[
$key
][
'store_name'
]
=
[];
}
$house_params
=
[];
$house_params
[
"id"
]
=
$value
[
'house_id'
];
...
...
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