Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
78b11454
authored
Apr 04, 2024
by
CaIon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 钱包兼容非货币形式显示额度
parent
809684da
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
controller/topup.go
+2
-2
No files found.
controller/topup.go
View file @
78b11454
...
@@ -205,13 +205,13 @@ func EpayNotify(c *gin.Context) {
...
@@ -205,13 +205,13 @@ func EpayNotify(c *gin.Context) {
}
}
//user, _ := model.GetUserById(topUp.UserId, false)
//user, _ := model.GetUserById(topUp.UserId, false)
//user.Quota += topUp.Amount * 500000
//user.Quota += topUp.Amount * 500000
err
=
model
.
IncreaseUserQuota
(
topUp
.
UserId
,
topUp
.
Amount
*
500000
)
err
=
model
.
IncreaseUserQuota
(
topUp
.
UserId
,
topUp
.
Amount
*
int
(
common
.
QuotaPerUnit
)
)
if
err
!=
nil
{
if
err
!=
nil
{
log
.
Printf
(
"易支付回调更新用户失败: %v"
,
topUp
)
log
.
Printf
(
"易支付回调更新用户失败: %v"
,
topUp
)
return
return
}
}
log
.
Printf
(
"易支付回调更新用户成功 %v"
,
topUp
)
log
.
Printf
(
"易支付回调更新用户成功 %v"
,
topUp
)
model
.
RecordLog
(
topUp
.
UserId
,
model
.
LogTypeTopup
,
fmt
.
Sprintf
(
"使用在线充值成功,充值金额: %v,支付金额:%f"
,
common
.
LogQuota
(
topUp
.
Amount
*
500000
),
topUp
.
Money
))
model
.
RecordLog
(
topUp
.
UserId
,
model
.
LogTypeTopup
,
fmt
.
Sprintf
(
"使用在线充值成功,充值金额: %v,支付金额:%f"
,
common
.
LogQuota
(
topUp
.
Amount
*
int
(
common
.
QuotaPerUnit
)
),
topUp
.
Money
))
}
}
}
else
{
}
else
{
log
.
Printf
(
"易支付异常回调: %v"
,
verifyInfo
)
log
.
Printf
(
"易支付异常回调: %v"
,
verifyInfo
)
...
...
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