Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
PyFund
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
陈涛
PyFund
Commits
800eadd2
Commit
800eadd2
authored
Mar 27, 2023
by
confusion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改删除接口
parent
2ebcf40a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
bill.py
api/bill.py
+3
-2
bill.py
model/bill.py
+3
-2
No files found.
api/bill.py
View file @
800eadd2
...
@@ -311,17 +311,18 @@ async def query_bill(
...
@@ -311,17 +311,18 @@ async def query_bill(
return
response
return
response
@
router
.
delete
(
'/{
fund
_id}/'
,
@
router
.
delete
(
'/{
bill
_id}/'
,
tags
=
[
"删除"
],
tags
=
[
"删除"
],
response_model
=
Response
,
response_model
=
Response
,
summary
=
'删除账单记录'
,
summary
=
'删除账单记录'
,
description
=
'删除账单记录'
)
description
=
'删除账单记录'
)
async
def
query_bill
(
async
def
query_bill
(
fund_id
:
str
,
fund_id
:
str
,
bill_id
:
str
,
bill_type
:
BillType
,
bill_type
:
BillType
,
bill_collect
:
AgnosticCollection
=
Depends
(
get_bill_collect
),
bill_collect
:
AgnosticCollection
=
Depends
(
get_bill_collect
),
user
:
User
=
Depends
(
get_current_user
)
user
:
User
=
Depends
(
get_current_user
)
):
):
query
=
{
"fund_id"
:
fund_id
,
"user_id"
:
user
.
id
,
"bill_type"
:
bill_type
}
query
=
{
"fund_id"
:
fund_id
,
"user_id"
:
user
.
id
,
"bill_type"
:
bill_type
,
"id"
:
bill_id
}
await
bill_collect
.
delete_one
(
query
)
await
bill_collect
.
delete_one
(
query
)
return
Response
()
return
Response
()
model/bill.py
View file @
800eadd2
...
@@ -73,11 +73,12 @@ class CreateStakingBill(BaseModel):
...
@@ -73,11 +73,12 @@ class CreateStakingBill(BaseModel):
fund_id
:
str
=
Field
(
None
,
description
=
'基金id'
)
fund_id
:
str
=
Field
(
None
,
description
=
'基金id'
)
currency
:
str
=
Field
(
default
=
"ETH"
,
description
=
'币种'
)
currency
:
str
=
Field
(
default
=
"ETH"
,
description
=
'币种'
)
volume
:
float
=
Field
(
default
=
32
,
description
=
'数量'
)
volume
:
float
=
Field
(
default
=
32
,
description
=
'数量'
)
record_time
:
str
=
Field
(
default_factory
=
lambda
:
str
(
datetime
.
datetime
.
utcnow
()
.
date
()),
description
=
'记录时间'
)
pub_key
:
str
=
Field
(
...
,
description
=
'节点key'
)
# record_time: str = Field(default_factory=lambda: str(datetime.datetime.utcnow().date()), description='记录时间')
remark
:
str
=
Field
(
default
=
""
,
description
=
"备注"
)
remark
:
str
=
Field
(
default
=
""
,
description
=
"备注"
)
class
StakingBill
(
BaseCreateModel
):
class
StakingBill
(
CreateStakingBill
,
BaseCreateModel
):
"""质押账目"""
"""质押账目"""
user_id
:
str
user_id
:
str
bill_type
:
BillType
=
Field
(
default
=
BillType
.
staking
,
description
=
'账目类型'
)
bill_type
:
BillType
=
Field
(
default
=
BillType
.
staking
,
description
=
'账目类型'
)
...
...
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