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
f3900e18
Commit
f3900e18
authored
Jul 24, 2024
by
houyadong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
成员交易逻辑修改-bug
parent
b0735e6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
UserModel.class.php
app/Lib/Model/UserModel.class.php
+11
-7
No files found.
app/Lib/Model/UserModel.class.php
View file @
f3900e18
...
@@ -183,12 +183,17 @@ class UserModel extends Model
...
@@ -183,12 +183,17 @@ class UserModel extends Model
*/
*/
public
function
getGroupEntrustList
(
$gInfo
,
$top
=
0
,
$p
=
1
,
$pageSize
=
5
)
public
function
getGroupEntrustList
(
$gInfo
,
$top
=
0
,
$p
=
1
,
$pageSize
=
5
)
{
{
$is_xlq
=
$gInfo
[
'category'
]
==
1
?
1
:
0
;
$gId
=
$gInfo
[
'group_id'
];
$gId
=
$gInfo
[
'group_id'
];
#是否归档
$is_xlq
=
$gInfo
[
'category'
]
==
1
?
1
:
0
;
$group
=
D
(
'Group'
)
->
getGroup
(
$gId
);
$getModel
=
function
(
$is_xlq
,
$gInfo
){
if
(
$is_xlq
==
1
){
return
M
()
->
db
(
1
,
C
(
'DB_CONFIG_SYN'
));
}
else
{
return
M
()
->
db
(
2
,
getModel
(
$gInfo
[
'web_id'
]));
}
};
$model
=
$getModel
(
$is_xlq
,
$gInfo
);
if
(
$is_xlq
==
1
){
if
(
$is_xlq
==
1
){
$model
=
M
()
->
db
(
1
,
C
(
'DB_CONFIG_SYN'
));
$uinfo_table_name
=
'syn_userinfo'
;
$uinfo_table_name
=
'syn_userinfo'
;
$table_name
=
'syn_entrust'
;
$table_name
=
'syn_entrust'
;
$his_table_name
=
'syn_hisentrust'
;
$his_table_name
=
'syn_hisentrust'
;
...
@@ -202,13 +207,12 @@ class UserModel extends Model
...
@@ -202,13 +207,12 @@ class UserModel extends Model
];
];
}
else
{
}
else
{
$suffix
=
D
(
'Userinfo'
)
->
getTable
(
$gId
);
$suffix
=
D
(
'Userinfo'
)
->
getTable
(
$gId
);
$model
=
M
()
->
db
(
2
,
getModel
(
$group
[
'web_id'
]));
$uinfo_table_name
=
$suffix
?
'mncg_archive.userinfo'
.
$suffix
:
'mncg.userinfo'
;
$uinfo_table_name
=
$suffix
?
'mncg_archive.userinfo'
.
$suffix
:
'mncg.userinfo'
;
$table_name
=
'entrust'
;
$table_name
=
'entrust'
;
$his_table_name
=
$suffix
?
'mncg_archive.hisentrust'
.
$suffix
:
'hisentrust'
;
$his_table_name
=
$suffix
?
'mncg_archive.hisentrust'
.
$suffix
:
'hisentrust'
;
$uinfo_where
=
[
$uinfo_where
=
[
'zt'
=>
1
,
'sex'
=>
$g
roup
[
'teamid'
]
'zt'
=>
1
,
'sex'
=>
$g
Info
[
'teamid'
]
];
];
$entrust_where
=
[
$entrust_where
=
[
'bz'
=>
$gId
,
'bz'
=>
$gId
,
...
@@ -241,7 +245,7 @@ class UserModel extends Model
...
@@ -241,7 +245,7 @@ class UserModel extends Model
$top3_data
=
$model
->
table
(
$his_table_name
)
$top3_data
=
$model
->
table
(
$his_table_name
)
->
field
(
'*,cj_time sort_time'
)
->
field
(
'*,cj_time sort_time'
)
->
where
(
$entrust_where
)
->
where
(
$entrust_where
)
->
where
([
'userid'
=>
[
'in'
,
array_keys
(
$top3_uids
)],
'cj_time'
=>
[
'gt'
,
strtotime
(
'today'
)]])
->
where
([
'userid'
=>
[
'in'
,
array_keys
(
$top3_uids
)],
'cj_time'
=>
[
'gt'
,
date
(
'Y-m-d H:i:s'
,
strtotime
(
'today'
)
)]])
->
group
(
'userid'
)
->
group
(
'userid'
)
->
order
(
'FIELD(userid,"'
.
implode
(
'","'
,
array_keys
(
$top3_uids
))
.
'") asc,cj_time desc'
)
->
order
(
'FIELD(userid,"'
.
implode
(
'","'
,
array_keys
(
$top3_uids
))
.
'") asc,cj_time desc'
)
->
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