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
0b535d24
Commit
0b535d24
authored
Jan 09, 2025
by
ml
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
e4a5d77f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
23 deletions
+20
-23
task.market.maker.statis.service.ts
cron/service/task.market.maker.statis.service.ts
+10
-21
mUserManage.service.ts
src/functional/mvc/service/mUserManage.service.ts
+10
-2
No files found.
cron/service/task.market.maker.statis.service.ts
View file @
0b535d24
// 每日定时统计项目方 指定交易对做市信息, 并根据成交量信息进行费率分档优惠;
// 每日定时统计项目方 指定交易对做市信息,
// 并根据成交量信息判断是否满足承诺交易量
// 不满足则将费率降为基础费率;
import
{
import
{
ormDB
,
commonUserFeeSetting
,
feeRateSpotLog
,
userInfoSon
,
spotPairs
,
contractPairs
,
userInfo
,
ormDB
,
commonUserFeeSetting
,
feeRateSpotLog
,
userInfoSon
,
spotPairs
,
contractPairs
,
userInfo
,
dwdExFill
,
dwdMadOrmDB
dwdExFill
,
dwdMadOrmDB
...
@@ -16,29 +18,15 @@ const logger = require('@madex/ex-js-public').logger;
...
@@ -16,29 +18,15 @@ const logger = require('@madex/ex-js-public').logger;
let
feeRateCheckStatus
=
FEE_RATE_LOG_STATUS
;
let
feeRateCheckStatus
=
FEE_RATE_LOG_STATUS
;
//价格缓存时间 2分钟
const
CACHE_TIMEOUT
=
2
*
60
*
1000
;
const
DAY
=
24
*
3600
*
1000
;
const
DAY
=
24
*
3600
*
1000
;
const
FEE_MODEL
=
{
const
FEE_MODEL
=
{
"fixedingain"
:
"fixedingain"
"fixedingain"
:
"fixedingain"
}
}
const
BTC_AMOUNT
=
{
const
Market_Maker_FEE
=
{
"BTC30"
:
30
,
init_taker
:
0.002
,
"BTC5"
:
5
,
init_maker
:
0.001
,
"BTC0"
:
0
,
}
},
FEE_RATE
=
{
"Wan1"
:
0.0001
,
"Wan2"
:
0.0002
,
"Default"
:
0.001
,
"maker_default"
:
0.0008
,
"Free"
:
0
,
},
Market_Maker_FEE
=
{
init_taker
:
0.002
,
init_maker
:
0.001
,
}
async
function
delayPromise
(
time
:
any
)
{
async
function
delayPromise
(
time
:
any
)
{
return
new
Promise
((
resolve
)
=>
setTimeout
(
resolve
,
time
));
return
new
Promise
((
resolve
)
=>
setTimeout
(
resolve
,
time
));
...
@@ -101,8 +89,9 @@ async function projectMaker() {
...
@@ -101,8 +89,9 @@ async function projectMaker() {
try
{
try
{
res
=
await
commonUserFeeSetting
.
prototype
.
findAll
({
res
=
await
commonUserFeeSetting
.
prototype
.
findAll
({
where
:
{
where
:
{
user_channel
:
2
,
user_channel
:
2
,
//项目方
type
:
1
,
type
:
1
,
//现货
status
:
2
,
//已生效
},
},
order
:
[[
'id'
,
'asc'
]],
order
:
[[
'id'
,
'asc'
]],
raw
:
raw
:
...
...
src/functional/mvc/service/mUserManage.service.ts
View file @
0b535d24
...
@@ -133,9 +133,17 @@ export async function oneUserDetail(m_user_id: number) {
...
@@ -133,9 +133,17 @@ export async function oneUserDetail(m_user_id: number) {
}
}
let
oneRealName
=
await
getRealNameByUserId
(
m_user_id
);
let
oneRealName
=
await
getRealNameByUserId
(
m_user_id
);
let
isLoginLock
=
await
getLoginLimit
(
m_user_id
);
let
isLoginLock
=
await
getLoginLimit
(
m_user_id
);
let
is_withdraw
:
any
;
//24小时提现限制
//24小时提现限制
let
dead_line
=
datetimeUtils
.
add
(
oneUser
.
secure_modifiedAt
,
datetimeUtils
.
DAY
);
if
(
oneUser
.
secure_modifiedAt
)
{
let
is_withdraw
=
datetimeUtils
.
between
(
new
Date
(),
dead_line
);
let
dead_line
=
datetimeUtils
.
add
(
oneUser
.
secure_modifiedAt
,
datetimeUtils
.
DAY
);
is_withdraw
=
datetimeUtils
.
between
(
new
Date
(),
dead_line
);
}
else
{
//没修改过安全信息 不需要限制
is_withdraw
=
1
;
}
let
res
=
{
let
res
=
{
user_id
:
oneUser
.
user_id
,
user_id
:
oneUser
.
user_id
,
real_name
:
oneUser
.
real_name
,
real_name
:
oneUser
.
real_name
,
...
...
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