Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
financial-system
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
xianyang
financial-system
Commits
153461ec
Commit
153461ec
authored
Sep 21, 2023
by
xianyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化业务类型汇总查询
parent
19946f78
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
crud.py
app/api/account/crud.py
+6
-2
No files found.
app/api/account/crud.py
View file @
153461ec
...
...
@@ -412,7 +412,11 @@ class AccountStatistics(object):
def
special_handle
(
self
,
old_data
,
special_data
):
"""处理可消费,可提现数据"""
bk
=
pd
.
DataFrame
(
special_data
)
for
old
in
old_data
:
if
not
old
.
get
(
'guild_id'
):
Logger
()
.
logger
.
info
(
"错误的公会数据:"
,
old
)
continue
df
=
bk
[(
bk
[
"guild_id"
]
==
old
[
'guild_id'
])
&
(
bk
[
"create_time"
]
==
old
[
'create_time'
])
&
(
bk
[
"amount_type"
]
==
2
)]
# 可消费
serializer_info
=
df
.
to_dict
(
orient
=
'records'
)
if
serializer_info
:
...
...
@@ -553,7 +557,7 @@ class AccountStatistics(object):
guild_cond_list
=
[]
start_time
=
time_str_to_timestamp
(
self
.
start_time
+
' 00:00:00'
)
end_time
=
time_str_to_timestamp
(
self
.
end_time
+
' 23:59:59'
)
guild_cond_list
.
append
(
f
" (income>0 or outcome>0 or initial_money>0) "
)
#
guild_cond_list.append(f" (income>0 or outcome>0 or initial_money>0) ")
guild_cond_list
.
append
(
f
" create_time >={start_time} and create_time<= {end_time}"
)
if
self
.
user_id
:
guild_cond_list
.
append
(
f
" guild_id={self.user_id}"
)
...
...
@@ -747,7 +751,7 @@ class HomePageDisplay(object):
guild_data
=
future2
.
result
()
account
=
[
i
[
'uuid'
]
for
i
in
acc_data
]
guild
=
[
i
[
'uuid'
]
for
i
in
guild_data
]
assets_cond
=
[]
assets_cond
=
[
'type in(0,1)'
]
if
self
.
unique_tag
==
'guild_account'
:
assets_cond
.
append
(
f
" uuid in{tuple(guild)}"
)
elif
self
.
unique_tag
==
'user_account'
:
...
...
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