Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hilo-common
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
hujiebin
hilo-common
Commits
87d5e7a2
Commit
87d5e7a2
authored
Aug 21, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accountId
parent
97d18758
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
race_day_award.go
script/race_day_award.go
+2
-2
diamond.go
txop/diamond_tx/diamond.go
+2
-2
No files found.
script/race_day_award.go
View file @
87d5e7a2
...
...
@@ -45,7 +45,7 @@ func ats33(a interface{}) string {
}
func
main
()
{
url
:=
"https://apiv2.faceline.live/v1/race/rank/award?lang=zh-cn&pageIndex=1&pageSize=50000&beginDate=2023-08-
18&endDate=2023-08-18
&userCode=&timezone=1"
url
:=
"https://apiv2.faceline.live/v1/race/rank/award?lang=zh-cn&pageIndex=1&pageSize=50000&beginDate=2023-08-
20&endDate=2023-08-20
&userCode=&timezone=1"
method
:=
"GET"
client
:=
&
http
.
Client
{}
...
...
@@ -99,7 +99,7 @@ func main() {
for
_
,
v
:=
range
svips
{
svipMap
[
v
.
Code
]
=
v
.
Level
}
excelFileName
:=
fmt
.
Sprintf
(
"./08
18
赛车中奖榜.xlsx"
)
excelFileName
:=
fmt
.
Sprintf
(
"./08
20
赛车中奖榜.xlsx"
)
xlFile
:=
xlsx
.
NewFile
()
sheet
,
_
:=
xlFile
.
AddSheet
(
"charge"
)
row
:=
sheet
.
AddRow
()
...
...
txop/diamond_tx/diamond.go
View file @
87d5e7a2
...
...
@@ -102,10 +102,10 @@ func TxAddReduceDiamondAccount(model *domain.Model, userId mysql.ID, operateType
var
db
*
gorm
.
DB
if
diamondOperateSet
.
AddReduce
==
mysql
.
ADD
{
//增加
db
=
model
.
DB
()
.
Model
(
diamond_m
.
DiamondAccount
{})
.
UpdateColumn
(
"diamond_num"
,
gorm
.
Expr
(
"diamond_num + ?"
,
diamondNum
))
db
=
model
.
DB
()
.
Model
(
diamond_m
.
DiamondAccount
{})
.
Where
(
"id = ?"
,
diamondAccount
.
ID
)
.
UpdateColumn
(
"diamond_num"
,
gorm
.
Expr
(
"diamond_num + ?"
,
diamondNum
))
}
else
if
diamondOperateSet
.
AddReduce
==
mysql
.
REDUCE
{
//减少,保证不能扣成负数
db
=
model
.
DB
()
.
Model
(
diamond_m
.
DiamondAccount
{})
.
Where
(
"diamond_num >= ?"
,
diamondNum
)
.
UpdateColumn
(
"diamond_num"
,
gorm
.
Expr
(
"diamond_num - ?"
,
diamondNum
))
db
=
model
.
DB
()
.
Model
(
diamond_m
.
DiamondAccount
{})
.
Where
(
"
id = ?"
,
diamondAccount
.
ID
)
.
Where
(
"
diamond_num >= ?"
,
diamondNum
)
.
UpdateColumn
(
"diamond_num"
,
gorm
.
Expr
(
"diamond_num - ?"
,
diamondNum
))
}
else
{
return
myerr
.
NewSysErrorF
(
"addReduce 枚举错误 value:"
,
diamondOperateSet
.
AddReduce
)
}
...
...
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