Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hilo-user
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
chenweijian
hilo-user
Commits
211fbd1b
Commit
211fbd1b
authored
Jul 13, 2023
by
chenweijian
Committed by
hujiebin
Jul 13, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cp解除
parent
549ced37
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
cp_relation.go
cron/cp_cron/cp_relation.go
+5
-3
cron.go
cron/cron.go
+1
-2
No files found.
c
orn/cp_corn/cp
.go
→
c
ron/cp_cron/cp_relation
.go
View file @
211fbd1b
package
cp_c
or
n
package
cp_c
ro
n
import
(
import
(
"git.hilo.cn/hilo-common/_const/enum/diamond_e"
"git.hilo.cn/hilo-common/_const/enum/diamond_e"
...
@@ -36,6 +36,7 @@ func CpInviteCancelInit() {
...
@@ -36,6 +36,7 @@ func CpInviteCancelInit() {
return
return
}
}
for
_
,
v
:=
range
inviteList
{
for
_
,
v
:=
range
inviteList
{
model
:=
domain
.
CreateModelContext
(
model
.
MyContext
)
model
.
Log
.
Infof
(
"CpInviteCancelInit invite:%+v"
,
v
)
model
.
Log
.
Infof
(
"CpInviteCancelInit invite:%+v"
,
v
)
err
=
model
.
Transaction
(
func
(
model
*
domain
.
Model
)
error
{
err
=
model
.
Transaction
(
func
(
model
*
domain
.
Model
)
error
{
// 更新邀请记录
// 更新邀请记录
...
@@ -54,7 +55,7 @@ func CpInviteCancelInit() {
...
@@ -54,7 +55,7 @@ func CpInviteCancelInit() {
})
})
if
err
!=
nil
{
if
err
!=
nil
{
model
.
Log
.
Errorf
(
"CpInviteCancelInit invite:%+v, err:%v"
,
v
,
err
)
model
.
Log
.
Errorf
(
"CpInviteCancelInit invite:%+v, err:%v"
,
v
,
err
)
return
continue
}
}
time
.
Sleep
(
time
.
Millisecond
*
10
)
time
.
Sleep
(
time
.
Millisecond
*
10
)
}
}
...
@@ -66,6 +67,7 @@ func CpInviteCancelInit() {
...
@@ -66,6 +67,7 @@ func CpInviteCancelInit() {
return
return
}
}
for
_
,
v
:=
range
cancelList
{
for
_
,
v
:=
range
cancelList
{
model
:=
domain
.
CreateModelContext
(
model
.
MyContext
)
model
.
Log
.
Infof
(
"CpInviteCancelInit cancel:%+v"
,
v
)
model
.
Log
.
Infof
(
"CpInviteCancelInit cancel:%+v"
,
v
)
err
=
model
.
Transaction
(
func
(
model
*
domain
.
Model
)
error
{
err
=
model
.
Transaction
(
func
(
model
*
domain
.
Model
)
error
{
// 更新解除记录
// 更新解除记录
...
@@ -84,7 +86,7 @@ func CpInviteCancelInit() {
...
@@ -84,7 +86,7 @@ func CpInviteCancelInit() {
})
})
if
err
!=
nil
{
if
err
!=
nil
{
model
.
Log
.
Errorf
(
"CpInviteCancelInit cancel:%+v, err:%v"
,
v
,
err
)
model
.
Log
.
Errorf
(
"CpInviteCancelInit cancel:%+v, err:%v"
,
v
,
err
)
return
continue
}
}
time
.
Sleep
(
time
.
Millisecond
*
10
)
time
.
Sleep
(
time
.
Millisecond
*
10
)
}
}
...
...
cron/cron.go
View file @
211fbd1b
...
@@ -2,7 +2,6 @@ package cron
...
@@ -2,7 +2,6 @@ package cron
import
(
import
(
"git.hilo.cn/hilo-common/resource/config"
"git.hilo.cn/hilo-common/resource/config"
"hilo-user/corn/cp_corn"
"hilo-user/cron/cp_cron"
"hilo-user/cron/cp_cron"
"hilo-user/cron/gift_cron"
"hilo-user/cron/gift_cron"
)
)
...
@@ -15,5 +14,5 @@ func Init() {
...
@@ -15,5 +14,5 @@ func Init() {
gift_cron
.
GiftRemark
()
// 礼物消息补偿
gift_cron
.
GiftRemark
()
// 礼物消息补偿
cp_cron
.
ClearCpExpire
()
// 清理过期cp
cp_cron
.
ClearCpExpire
()
// 清理过期cp
cp_cron
.
CpAnniversaryNotice
()
// cp纪念日
cp_cron
.
CpAnniversaryNotice
()
// cp纪念日
cp_c
or
n
.
CpInviteCancelInit
()
// cp邀请、解除到期结算
cp_c
ro
n
.
CpInviteCancelInit
()
// cp邀请、解除到期结算
}
}
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