Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cof_vip
Project
Project
Details
Activity
Releases
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
houdong
cof_vip
Commits
02440ae7
Commit
02440ae7
authored
Jul 23, 2024
by
houyadong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
成员交易逻辑修改-bug
parent
a6a70efe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
UserModel.class.php
app/Lib/Model/UserModel.class.php
+9
-4
No files found.
app/Lib/Model/UserModel.class.php
View file @
02440ae7
...
@@ -249,8 +249,8 @@ class UserModel extends Model
...
@@ -249,8 +249,8 @@ class UserModel extends Model
$entrust_where
[
'userid'
]
=
[
'in'
,
array_keys
(
$top_uid
)];
$entrust_where
[
'userid'
]
=
[
'in'
,
array_keys
(
$top_uid
)];
}
}
#取委托总条数和页数
#取委托总条数和页数
$today_count
=
$model
->
table
(
$table_name
)
->
where
(
$entrust_where
)
->
count
();
$today_count
=
$model
->
table
(
$table_name
)
->
where
(
$entrust_where
)
->
c
ache
(
true
,
3600
)
->
c
ount
();
$his_count
=
$today_count
+
$model
->
table
(
$his_table_name
)
->
where
(
$entrust_where
)
->
count
();
$his_count
=
$today_count
+
$model
->
table
(
$his_table_name
)
->
where
(
$entrust_where
)
->
c
ache
(
true
,
3600
)
->
c
ount
();
$today_max_page
=
ceil
(
$today_count
/
$pageSize
);
$today_max_page
=
ceil
(
$today_count
/
$pageSize
);
if
(
$p
<=
$today_max_page
){
if
(
$p
<=
$today_max_page
){
$today_list
=
$model
->
table
(
$table_name
)
$today_list
=
$model
->
table
(
$table_name
)
...
@@ -261,14 +261,19 @@ class UserModel extends Model
...
@@ -261,14 +261,19 @@ class UserModel extends Model
->
select
();
->
select
();
}
}
#计算偏移量,根据页码去当日数据表取或归档数据表取数据
#计算偏移量,根据页码去当日数据表取或归档数据表取数据
if
(
$his_count
>=
$pageSize
*
20
){
$his_max_page
=
20
;
$his_count
=
20
*
$pageSize
;
}
else
{
$his_max_page
=
ceil
(
$his_count
/
$pageSize
);
}
if
(
$p
>=
$today_max_page
){
if
(
$p
>=
$today_max_page
){
$his_max_page
=
$his_count
>=
$pageSize
*
20
?
20
:
ceil
(
$his_count
/
$pageSize
);
$p
=
$p
>
(
$today_max_page
+
$his_max_page
)
?
(
$today_max_page
+
$his_max_page
)
:
$p
;
$p
=
$p
>
(
$today_max_page
+
$his_max_page
)
?
(
$today_max_page
+
$his_max_page
)
:
$p
;
if
(
$his_count
>
0
){
if
(
$his_count
>
0
){
$his_list
=
$model
->
table
(
$his_table_name
)
$his_list
=
$model
->
table
(
$his_table_name
)
->
where
(
$entrust_where
)
->
where
(
$entrust_where
)
->
order
(
'cj_time desc'
)
->
order
(
'cj_time desc'
)
->
page
((
$p
-
$
his_max_page
<
0
?
1
:
$p
-
$his
_max_page
),
$pageSize
)
->
page
((
$p
-
$
today_max_page
<
0
?
1
:
$p
-
$today
_max_page
),
$pageSize
)
->
select
();
->
select
();
}
}
}
}
...
...
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