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
027bcd29
Commit
027bcd29
authored
Mar 15, 2023
by
xianyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化代码,自测bug
parent
bbd41b8f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
20 deletions
+11
-20
crud.py
app/api/account/crud.py
+4
-4
crud.py
app/api/export/crud.py
+1
-1
crud.py
app/api/statement/crud.py
+3
-3
guild.py
app/api/statement/guild.py
+1
-10
schemas.py
app/api/statement/schemas.py
+2
-2
No files found.
app/api/account/crud.py
View file @
027bcd29
...
...
@@ -82,10 +82,10 @@ def create_account(db: Session, param: schemas.AccountCreate):
def
update_account_info
(
db
:
Session
,
old_data
):
"""修改"""
db
.
query
(
models
.
Account
)
.
filter
(
models
.
Account
.
id
==
old_data
.
id
)
.
update
(
{
models
.
Account
.
name
:
old_data
.
name
}
,
{
models
.
Account
.
remark
:
old_data
.
remark
}
,
{
models
.
Account
.
income
:
','
.
join
(
map
(
str
,
old_data
.
income
))}
,
{
models
.
Account
.
output
:
','
.
join
(
map
(
str
,
old_data
.
output
))})
{
models
.
Account
.
name
:
old_data
.
name
,
models
.
Account
.
remark
:
old_data
.
remark
,
models
.
Account
.
income
:
','
.
join
(
map
(
str
,
old_data
.
income
))
,
models
.
Account
.
output
:
','
.
join
(
map
(
str
,
old_data
.
output
))})
db
.
commit
()
...
...
app/api/export/crud.py
View file @
027bcd29
...
...
@@ -19,7 +19,7 @@ def get_export_list(db: Session, param):
if
param
.
get
(
"start_time"
):
export_filters
.
append
(
ExportFile
.
create_time
>=
param
.
get
(
"start_time"
))
if
param
.
get
(
"end_time"
):
export_filters
.
append
(
ExportFile
.
create_time
>
=
param
.
get
(
"end_time"
))
export_filters
.
append
(
ExportFile
.
create_time
<
=
param
.
get
(
"end_time"
))
querydata
,
count
=
QueryAllData
(
db
,
ExportFile
,
param
,
export_filters
)
.
query_data
()
data
=
[
QueryAllData
.
serialization
(
item
)
for
item
in
querydata
]
return
data
,
count
...
...
app/api/statement/crud.py
View file @
027bcd29
...
...
@@ -75,7 +75,7 @@ class RechargeStatement(object):
not_null_filters
.
append
(
Recharge
.
user_id
==
param
.
user_id
)
if
param
.
sid
:
not_null_filters
.
append
(
Recharge
.
sid
.
like
(
param
.
sid
))
if
param
.
paychannel
:
if
param
.
pay
_
channel
:
not_null_filters
.
append
(
Recharge
.
pay_channel
.
like
(
param
.
pay_channel
))
if
param
.
start_time
:
not_null_filters
.
append
(
Recharge
.
current
>=
param
.
start_time
)
...
...
@@ -137,8 +137,8 @@ class WithdrawStatement(object):
def
get_user_withdraw_cash
(
self
,
db
:
Session
,
param
):
"""用户提现"""
is_filters
=
[]
if
param
.
user_id
:
is_filters
.
append
(
UserWC
.
user_id
==
param
.
user_id
)
if
param
.
name
:
is_filters
.
append
(
UserWC
.
nick_name
.
like
(
f
'
%
{param.name}
%
'
)
)
if
param
.
status
or
param
.
status
==
0
:
is_filters
.
append
(
UserWC
.
status
==
param
.
status
)
if
param
.
start_time
:
...
...
app/api/statement/guild.py
View file @
027bcd29
...
...
@@ -108,20 +108,11 @@ def outon_account_data(db: Session, dbname, params):
def
accout_list_data
(
db
:
Session
,
dbname
,
params
):
accout_filters
=
[]
if
params
.
get
(
"id"
):
accout_filters
.
append
(
dbname
.
guild_id
==
params
.
get
(
"guild_id"
))
if
params
.
get
(
"transfer_id"
):
accout_filters
.
append
(
dbname
.
transfer_id
==
params
.
get
(
"transfer_id"
))
if
params
.
get
(
"dst_id"
):
accout_filters
.
append
(
dbname
.
dst_id
==
params
.
get
(
"dst_id"
))
if
params
.
get
(
"cont"
):
accout_filters
.
append
(
dbname
.
cont
==
params
.
get
(
"cont"
))
if
params
.
get
(
"money"
):
accout_filters
.
append
(
dbname
.
money
==
params
.
get
(
"money"
))
if
params
.
get
(
"url"
):
accout_filters
.
append
(
dbname
.
url
==
params
.
get
(
"url"
))
if
params
.
get
(
"uuid"
):
accout_filters
.
append
(
dbname
.
uuid
==
params
.
get
(
"uuid"
))
if
params
.
get
(
"start_time"
):
accout_filters
.
append
(
dbname
.
create_time
>=
params
.
get
(
"start_time"
)
+
" 00:00:00"
)
if
params
.
get
(
"end_time"
):
...
...
app/api/statement/schemas.py
View file @
027bcd29
...
...
@@ -23,7 +23,7 @@ class StatementList(BaseModel):
order_number
:
Optional
[
str
]
=
""
user_id
:
Optional
[
str
]
=
""
sid
:
Optional
[
str
]
=
""
paychannel
:
Optional
[
str
]
=
""
pay
_
channel
:
Optional
[
str
]
=
""
class
Statement
(
StatementBase
):
...
...
@@ -39,7 +39,7 @@ class UserWithdrawalList(BaseModel):
start_time
:
Optional
[
str
]
=
""
end_time
:
Optional
[
str
]
=
""
status
:
Optional
[
int
]
=
None
user_id
:
Optional
[
int
]
=
None
name
:
Optional
[
str
]
=
""
class
GuildWithdrawalList
(
BaseModel
):
...
...
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