Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hilo-group
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-group
Commits
4e1c124a
Commit
4e1c124a
authored
Mar 16, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/family' into feature/3.5
parents
4db784cf
796e14c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
group_star.go
domain/model/groupPower_m/group_star.go
+1
-0
mic.go
domain/model/mic_m/mic.go
+5
-4
No files found.
domain/model/groupPower_m/group_star.go
View file @
4e1c124a
...
...
@@ -30,6 +30,7 @@ func IncrGroupPowerMonthStarScore(model *domain.Model, groupPowerId, userId mysq
UserId
:
userId
,
Type
:
_type
,
Score
:
score
,
LastCalTs
:
lastCalTs
,
}
if
err
:=
model
.
DB
()
.
Model
(
GroupPowerMonthStar
{})
.
Clauses
(
clause
.
OnConflict
{
Columns
:
[]
clause
.
Column
{{
Name
:
"month"
},
{
Name
:
"group_power_id"
},
{
Name
:
"user_id"
},
{
Name
:
"type"
}},
...
...
domain/model/mic_m/mic.go
View file @
4e1c124a
...
...
@@ -51,12 +51,13 @@ func IncrUserOnMic(model *domain.Model, userId mysql.ID, joinMicTimestamp int64)
score
:=
nowTs
-
curTs
day
:=
time
.
Now
()
.
Format
(
"2006-01-02"
)
onMicNew
:=
&
UserOnMic
{
Date
:
day
,
UserId
:
userId
,
Seconds
:
mysql
.
Num
(
score
),
Date
:
day
,
UserId
:
userId
,
Seconds
:
mysql
.
Num
(
score
),
LastCalTs
:
nowTs
,
}
if
err
:=
model
.
DB
()
.
Model
(
UserOnMic
{})
.
Clauses
(
clause
.
OnConflict
{
Columns
:
[]
clause
.
Column
{{
Name
:
"da
y
"
},
{
Name
:
"user_id"
}},
Columns
:
[]
clause
.
Column
{{
Name
:
"da
te
"
},
{
Name
:
"user_id"
}},
DoUpdates
:
clause
.
Assignments
(
map
[
string
]
interface
{}{
"seconds"
:
gorm
.
Expr
(
"seconds + ?"
,
onMicNew
.
Seconds
),
"last_cal_ts"
:
nowTs
,
...
...
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