Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
ts-api-demo
Project
Project
Details
Activity
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
wmvm
ts-api-demo
Commits
373aa973
Commit
373aa973
authored
Jan 03, 2025
by
ml
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资产管理后台-特殊费率修改
parent
b2a5f4da
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
task.fee.rate.log.model.ts
cron/model/task.fee.rate.log.model.ts
+4
-5
commonUserFeeSetting.control.ts
src/functional/mvc/control/commonUserFeeSetting.control.ts
+2
-2
No files found.
cron/model/task.fee.rate.log.model.ts
View file @
373aa973
...
@@ -120,10 +120,10 @@ export const changeUserSpotFee = async function (user_id, symbol, fee_model, mak
...
@@ -120,10 +120,10 @@ export const changeUserSpotFee = async function (user_id, symbol, fee_model, mak
await
checkFeeModel
(
fee_model
);
await
checkFeeModel
(
fee_model
);
let
product_type
=
pair
==
'all'
?
'spot'
:
'single'
;
let
product_type
=
pair
==
'all'
?
'spot'
:
'single'
;
//生效的费率 与要设置的费率 比对做校验 现在分不开 现货 合约 先不校验 之后分开了 再校验
//生效的费率 与要设置的费率 比对做校验 现在分不开 现货 合约 先不校验 之后分开了 再校验
/*
let feeExist = await cancelIfFeeExist(user_id, product_type, symbol, maker_fee, taker_fee);
let
feeExist
=
await
cancelIfFeeExist
(
user_id
,
product_type
,
symbol
,
maker_fee
,
taker_fee
);
if
(
feeExist
)
{
if
(
feeExist
)
{
return
is_success
;
return
is_success
;
}
*/
}
let
asset
=
await
mainUserAsset
.
prototype
.
findOne
({
let
asset
=
await
mainUserAsset
.
prototype
.
findOne
({
where
:
{
where
:
{
user_id
user_id
...
@@ -160,11 +160,10 @@ export const changeUserContractFee = async function (user_id, symbol, fee_model,
...
@@ -160,11 +160,10 @@ export const changeUserContractFee = async function (user_id, symbol, fee_model,
let
is_success
=
true
;
let
is_success
=
true
;
let
product_type
=
pair
==
'all'
?
'lpc'
:
'single'
;
let
product_type
=
pair
==
'all'
?
'lpc'
:
'single'
;
//生效的费率 与要设置的费率 比对做校验 现在分不开 现货 合约 先不校验 之后分开了 再校验
let
feeExist
=
await
cancelIfFeeExist
(
user_id
,
product_type
,
symbol
,
maker_fee
,
taker_fee
);
/*let feeExist = await cancelIfFeeExist(user_id, product_type, symbol, maker_fee, taker_fee);
if
(
feeExist
)
{
if
(
feeExist
)
{
return
is_success
;
return
is_success
;
}
*/
}
if
(
pair
)
{
if
(
pair
)
{
await
checkPair
(
symbol
,
2
);
await
checkPair
(
symbol
,
2
);
}
}
...
...
src/functional/mvc/control/commonUserFeeSetting.control.ts
View file @
373aa973
...
@@ -137,9 +137,9 @@ async function addParamValid(commonUserFeeVO: CommonUserFeeVO) {
...
@@ -137,9 +137,9 @@ async function addParamValid(commonUserFeeVO: CommonUserFeeVO) {
throw
ErrorCode
.
PARAM_MISS
;
throw
ErrorCode
.
PARAM_MISS
;
}
}
//撮合目前只支持 all 后续支持单个币对 可放开
//撮合目前只支持 all 后续支持单个币对 可放开
if
(
pair
!=
'all'
){
/*
if (pair != 'all'){
throw ErrorCode.PAIR_NOT_SUPPORT;
throw ErrorCode.PAIR_NOT_SUPPORT;
}
}
*/
//校验费率范围
//校验费率范围
if
(
type
==
FEE_TYPE
.
FEE_TYPE_SPOT
){
if
(
type
==
FEE_TYPE
.
FEE_TYPE_SPOT
){
if
(
Number
(
makerFee
)
<
0.0002
||
Number
(
takerFee
)
<
0.0005
){
if
(
Number
(
makerFee
)
<
0.0002
||
Number
(
takerFee
)
<
0.0005
){
...
...
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