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
74cfec26
Commit
74cfec26
authored
Aug 03, 2023
by
chenweijian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
创建游戏房
parent
4a822699
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
0 deletions
+30
-0
cron.go
cron/cron.go
+1
-0
create_group.go
cron/group_cron/create_group.go
+29
-0
No files found.
cron/cron.go
View file @
74cfec26
...
...
@@ -18,4 +18,5 @@ func Init() {
group_cron
.
GroupPowerMonthRankAct
()
group_cron
.
GroupInEventInit
()
// 进房事件
group_cron
.
GroupPowerGradeExp
()
// 家族升级
group_cron
.
CreateGroup
()
//
}
cron/group_cron/create_group.go
0 → 100644
View file @
74cfec26
package
group_cron
import
(
"git.hilo.cn/hilo-common/domain"
"git.hilo.cn/hilo-common/resource/config"
"github.com/robfig/cron"
"hilo-group/domain/service/group_s"
)
func
CreateGroup
()
{
if
!
config
.
IsMaster
()
{
return
}
c
:=
cron
.
New
()
spec
:=
"0 6 15 3 8 ?"
_
=
c
.
AddFunc
(
spec
,
func
()
{
var
model
=
domain
.
CreateModelNil
()
userId
:=
uint64
(
7687
)
if
config
.
AppIsRelease
()
{
userId
=
41
}
err
:=
group_s
.
NewGroupService
(
model
.
MyContext
)
.
CreateGroupMulByUid
(
userId
,
10
)
if
err
!=
nil
{
model
.
Log
.
Errorf
(
"CreateGroupMulByUid fail:%v"
,
err
)
}
})
c
.
Start
()
}
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