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
0962b454
Commit
0962b454
authored
Apr 24, 2023
by
xianyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
质押金账户优化,移出
parent
ac4b41d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
crud.py
app/api/account/crud.py
+10
-5
No files found.
app/api/account/crud.py
View file @
0962b454
...
@@ -338,7 +338,7 @@ def out_income_combine(data):
...
@@ -338,7 +338,7 @@ def out_income_combine(data):
def
query_account_data
():
def
query_account_data
():
account_sql
=
f
"select name,unique_tag,uuid from fi_account where unique_tag not "
\
account_sql
=
f
"select name,unique_tag,uuid from fi_account where unique_tag not "
\
f
"in('guild_account', 'anchor_account', 'user_account', 'knapsack_account')"
f
"in('guild_account', 'anchor_account', 'user_account', 'knapsack_account'
,'pledgeDeduction'
)"
account
=
LinkMysql
(
env
.
DB_3YV2
)
.
query_mysql
(
account_sql
)
account
=
LinkMysql
(
env
.
DB_3YV2
)
.
query_mysql
(
account_sql
)
return
account
return
account
...
@@ -430,8 +430,8 @@ class AccountStatistics(object):
...
@@ -430,8 +430,8 @@ class AccountStatistics(object):
data
,
total
=
self
.
guild_calculation
()
data
,
total
=
self
.
guild_calculation
()
return
data
,
total
,
0
return
data
,
total
,
0
if
self
.
unique
==
"pledgeDeduction"
:
if
self
.
unique
==
"pledgeDeduction"
:
data
,
total
=
self
.
guild_calculation_pledge
()
data
,
total
,
money
=
self
.
guild_calculation_pledge
()
return
data
,
total
,
0
return
data
,
total
,
money
if
self
.
unique
==
"user_account"
:
if
self
.
unique
==
"user_account"
:
if
self
.
user_id
:
if
self
.
user_id
:
user_sql
=
f
"select uuid from v2_user where user_id={self.user_id}"
user_sql
=
f
"select uuid from v2_user where user_id={self.user_id}"
...
@@ -501,7 +501,7 @@ class AccountStatistics(object):
...
@@ -501,7 +501,7 @@ class AccountStatistics(object):
guild_sql
=
f
"select ice_uuid from guild where id={self.user_id}"
guild_sql
=
f
"select ice_uuid from guild where id={self.user_id}"
res_data
=
LinkMysql
(
env
.
DB_3YV2
)
.
query_mysql
(
guild_sql
)
res_data
=
LinkMysql
(
env
.
DB_3YV2
)
.
query_mysql
(
guild_sql
)
if
not
res_data
:
if
not
res_data
:
return
[],
0
return
[],
0
,
0
cp_cond
.
append
(
f
" uuid='{res_data[0]['ice_uuid']}'"
)
cp_cond
.
append
(
f
" uuid='{res_data[0]['ice_uuid']}'"
)
result_list
=
[]
result_list
=
[]
for
i
in
month_tuple
:
for
i
in
month_tuple
:
...
@@ -514,7 +514,10 @@ class AccountStatistics(object):
...
@@ -514,7 +514,10 @@ class AccountStatistics(object):
except
Exception
as
e
:
except
Exception
as
e
:
Logger
(
40
)
.
logger
.
error
(
f
"公会质押金处理-没有此表{table},或者检查sql:{cp_sql},是否正确!失败原因{str(e)}"
)
Logger
(
40
)
.
logger
.
error
(
f
"公会质押金处理-没有此表{table},或者检查sql:{cp_sql},是否正确!失败原因{str(e)}"
)
continue
continue
return
result_list
[
int
(
self
.
page
-
1
)
*
self
.
size
:
self
.
page
*
self
.
size
],
len
(
result_list
)
money
=
0
for
i
in
result_list
:
money
=
money
+
i
[
'income'
]
+
i
[
'outcome'
]
return
result_list
[
int
(
self
.
page
-
1
)
*
self
.
size
:
self
.
page
*
self
.
size
],
len
(
result_list
),
money
def
delete_specify_field
(
data
):
def
delete_specify_field
(
data
):
...
@@ -625,6 +628,8 @@ class HomePageDisplay(object):
...
@@ -625,6 +628,8 @@ class HomePageDisplay(object):
assets_cond
.
append
(
f
" uuid not in{tuple(guild + account)} and amount_type in('consumable','withdrawable')"
)
assets_cond
.
append
(
f
" uuid not in{tuple(guild + account)} and amount_type in('consumable','withdrawable')"
)
elif
self
.
unique_tag
==
'knapsack_account'
:
elif
self
.
unique_tag
==
'knapsack_account'
:
assets_cond
.
append
(
f
" amount_type='backpack'"
)
assets_cond
.
append
(
f
" amount_type='backpack'"
)
elif
self
.
unique_tag
==
'pledgeDeduction'
:
assets_cond
.
append
(
f
" reference_type in('marginRecharge','pledgeDeduction')"
)
else
:
else
:
acc_uuid
=
[
i
[
'uuid'
]
for
i
in
acc_data
if
i
[
'unique_tag'
]
==
self
.
unique_tag
]
acc_uuid
=
[
i
[
'uuid'
]
for
i
in
acc_data
if
i
[
'unique_tag'
]
==
self
.
unique_tag
]
if
not
acc_uuid
:
if
not
acc_uuid
:
...
...
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