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
3ffdd810
Commit
3ffdd810
authored
Aug 24, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:去掉多余的代码
parent
31d0b271
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
25 deletions
+0
-25
group_grade.go
domain/model/groupPower_m/group_grade.go
+0
-25
No files found.
domain/model/groupPower_m/group_grade.go
View file @
3ffdd810
...
@@ -41,16 +41,6 @@ type GroupPowerExpDetail struct {
...
@@ -41,16 +41,6 @@ type GroupPowerExpDetail struct {
Remark
string
Remark
string
}
}
type
GroupPowerOnMic
struct
{
Date
string
GroupPowerId
mysql
.
ID
UserId
mysql
.
ID
Seconds
int64
LastCalTs
int64
CreatedTime
time
.
Time
`gorm:"->"`
UpdatedTime
time
.
Time
`gorm:"->"`
}
// 增加家族经验
// 增加家族经验
// 达到经验值之后升级
// 达到经验值之后升级
// 单进程同步执行,不考虑并发
// 单进程同步执行,不考虑并发
...
@@ -144,21 +134,6 @@ func IncrGroupPowerExp(txModel *domain.Model, groupPowerId mysql.ID, exp mysql.N
...
@@ -144,21 +134,6 @@ func IncrGroupPowerExp(txModel *domain.Model, groupPowerId mysql.ID, exp mysql.N
return
nil
return
nil
}
}
// 获取势力用户上麦记录
func
GetGroupPowerOnMic
(
model
*
domain
.
Model
,
groupPowerId
,
userId
mysql
.
ID
)
(
*
GroupPowerOnMic
,
error
)
{
gpom
:=
new
(
GroupPowerOnMic
)
date
:=
time
.
Now
()
.
Format
(
"2006-01-02"
)
if
err
:=
model
.
DB
()
.
Model
(
GroupPowerOnMic
{})
.
Where
(
"date = ? AND group_power_id = ? AND user_id = ?"
,
date
,
groupPowerId
,
userId
)
.
First
(
gpom
)
.
Error
;
err
!=
nil
{
if
err
==
gorm
.
ErrRecordNotFound
{
return
&
GroupPowerOnMic
{
Date
:
date
,
GroupPowerId
:
groupPowerId
,
UserId
:
userId
},
nil
}
return
nil
,
err
}
return
gpom
,
nil
}
const
MaxMinuteTimes
=
18
// 增加势力上麦经验
// 增加势力上麦经验
// 事务操作
// 事务操作
func
IncrGroupPowerExpOnMic
(
model
*
domain
.
Model
,
groupPowerId
,
userId
mysql
.
ID
)
error
{
func
IncrGroupPowerExpOnMic
(
model
*
domain
.
Model
,
groupPowerId
,
userId
mysql
.
ID
)
error
{
...
...
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