Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
U
User
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
zhangjun
User
Commits
c3c8fa98
Commit
c3c8fa98
authored
Jul 14, 2022
by
yanghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收藏列表优化
parent
b7c96a10
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
esf_center_api.php
center/controllers/esf_center_api.php
+5
-2
user_model.php
esf_core/models/user_model.php
+4
-3
No files found.
center/controllers/esf_center_api.php
View file @
c3c8fa98
...
...
@@ -861,12 +861,15 @@ class Esf_center_api extends MY_Controller {
$pagesize
=
$pagesize
?
$pagesize
:
20
;
$offset
=
$pagesize
*
(
$page
-
1
);
$collect_array
=
$this
->
user_model
->
getcollect
(
$kind
,
$uid
,
$
pagesize
,
$offset
,
$city
);
$collect_array
=
$this
->
user_model
->
getcollect
(
$kind
,
$uid
,
$
offset
,
$pagesize
,
$city
);
if
(
!
empty
(
$collect_array
)
&&
is_array
(
$collect_array
))
{
foreach
(
$collect_array
as
$key
=>
$value
)
{
$arr
[
$key
][
'id'
]
=
$value
[
'collect_id'
];
$collect_value
=
unserialize
(
$value
[
'collect_value'
]);
$collect_value
[
'collect_time'
]
=
$value
[
'collect_time'
];
$arr
[
$key
][
'value'
]
=
serialize
(
$collect_value
);
}
}
else
...
...
@@ -903,7 +906,7 @@ class Esf_center_api extends MY_Controller {
$this
->
load
->
model
(
"userTest_model"
);
$collect_array
=
$this
->
user_model
->
getcollect2
(
$kind
,
$uid
,
$
pagesize
,
$offset
,
$city
);
$collect_array
=
$this
->
user_model
->
getcollect2
(
$kind
,
$uid
,
$
offset
,
$pagesize
,
$city
);
if
(
!
empty
(
$collect_array
)
&&
is_array
(
$collect_array
))
...
...
esf_core/models/user_model.php
View file @
c3c8fa98
...
...
@@ -1034,7 +1034,7 @@ class User_model extends MY_Model
*/
function
getcollect
(
$kind
,
$uid
,
$offset
=
0
,
$pagesize
=
0
,
$city
=
GB_CITY
)
{
$pagesize
=
$pagesize
?
$pagesize
:
20
;
$key
=
$this
->
memkey
.
'getcollect'
.
$uid
.
$kind
.
$offset
.
$pagesize
.
$city
;
$this
->
memcached_class
->
delete
(
$key
);
...
...
@@ -1048,7 +1048,7 @@ class User_model extends MY_Model
if
(
empty
(
$collect_array
)
)
{
$collect_array
=
$this
->
get_data
(
array
(
'form_name'
=>
'personal_collection'
,
'where'
=>
array
(
'uid'
=>
(
int
)
$uid
,
'kind'
=>
$kind
,
'city_name'
=>
$city
),
'limit'
=>
20
,
'offset'
=>
$offset
,
'order_by'
=>
'collect_time desc'
),
'esfbak'
);
$collect_array
=
$this
->
get_data
(
array
(
'form_name'
=>
'personal_collection'
,
'where'
=>
array
(
'uid'
=>
(
int
)
$uid
,
'kind'
=>
$kind
,
'city_name'
=>
$city
),
'limit'
=>
$pagesize
,
'offset'
=>
$offset
,
'order_by'
=>
'collect_time desc'
),
'esfbak'
);
//获取虚拟号码
foreach
(
$collect_array
as
&
$value
){
$collect_value
=
unserialize
(
$value
[
'collect_value'
]);
...
...
@@ -6095,6 +6095,7 @@ if($searcharr['infotype']==4){
*/
function
getcollect2
(
$kind
,
$uid
,
$offset
=
0
,
$pagesize
=
0
,
$city
=
GB_CITY
)
{
$pagesize
=
$pagesize
?
$pagesize
:
20
;
$key
=
$this
->
memkey
.
'getcollect'
.
$uid
.
$kind
.
$offset
.
$pagesize
.
$city
;
if
(
$this
->
input
->
get
(
'update'
)
==
1
)
{
...
...
@@ -6105,7 +6106,7 @@ if($searcharr['infotype']==4){
if
(
empty
(
$collect_array
)
)
{
$collect_array
=
$this
->
get_data
(
array
(
'form_name'
=>
'personal_collection'
,
'where'
=>
array
(
'uid'
=>
$uid
,
'kind'
=>
$kind
,
'city_name'
=>
$city
),
'limit'
=>
$
offset
,
'offset'
=>
$pagesize
,
'order_by'
=>
'collect_time desc'
),
'esfbak'
);
$collect_array
=
$this
->
get_data
(
array
(
'form_name'
=>
'personal_collection'
,
'where'
=>
array
(
'uid'
=>
$uid
,
'kind'
=>
$kind
,
'city_name'
=>
$city
),
'limit'
=>
$
pagesize
,
'offset'
=>
$offset
,
'order_by'
=>
'collect_time desc'
),
'esfbak'
);
$this
->
memcached_class
->
add
(
$key
,
$collect_array
,
1
);
}
...
...
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