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
6311f9d6
Commit
6311f9d6
authored
Jun 12, 2023
by
chenweijian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cp
parent
4156f4f6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
6 deletions
+11
-6
cp_relation.go
_const/enum/cp_e/cp_relation.go
+2
-0
cp.go
corn/cp_corn/cp.go
+4
-2
cp_relation.go
route/cp_r/cp_relation.go
+5
-4
No files found.
_const/enum/cp_e/cp_relation.go
View file @
6311f9d6
...
@@ -20,4 +20,6 @@ const (
...
@@ -20,4 +20,6 @@ const (
CpCancelRevoke
CpCancelStatus
=
2
CpCancelRevoke
CpCancelStatus
=
2
CpCancelAccept
CpCancelStatus
=
3
CpCancelAccept
CpCancelStatus
=
3
CpCancelAcceptAuto
CpCancelStatus
=
4
CpCancelAcceptAuto
CpCancelStatus
=
4
CpConfessionGiftId
=
3379
// cp礼物id cwj----
)
)
corn/cp_corn/cp.go
View file @
6311f9d6
...
@@ -30,7 +30,8 @@ func CpInviteCancelInit() {
...
@@ -30,7 +30,8 @@ func CpInviteCancelInit() {
defer
utils
.
CheckGoPanic
()
defer
utils
.
CheckGoPanic
()
model
:=
domain
.
CreateModelNil
()
model
:=
domain
.
CreateModelNil
()
// 获取超过24小时没被处理的cp邀请
// 获取超过24小时没被处理的cp邀请
inviteList
,
err
:=
cp_m
.
GetCpInviteByTime
(
model
,
time
.
Now
()
.
AddDate
(
0
,
0
,
-
1
))
//inviteList, err := cp_m.GetCpInviteByTime(model, time.Now().AddDate(0, 0, -1)) cwj----
inviteList
,
err
:=
cp_m
.
GetCpInviteByTime
(
model
,
time
.
Now
()
.
Add
(
time
.
Minute
*
10
))
// cwj----
if
err
!=
nil
{
if
err
!=
nil
{
model
.
Log
.
Errorf
(
"CpInviteCancelInit err:%v"
,
err
)
model
.
Log
.
Errorf
(
"CpInviteCancelInit err:%v"
,
err
)
return
return
...
@@ -60,7 +61,8 @@ func CpInviteCancelInit() {
...
@@ -60,7 +61,8 @@ func CpInviteCancelInit() {
}
}
// 获取超过24小时没被处理的cp解除申请
// 获取超过24小时没被处理的cp解除申请
cancelList
,
err
:=
cp_m
.
GetCpCancelByTime
(
model
,
time
.
Now
()
.
AddDate
(
0
,
0
,
-
1
))
//cancelList, err := cp_m.GetCpCancelByTime(model, time.Now().AddDate(0, 0, -1)) cwj----
cancelList
,
err
:=
cp_m
.
GetCpCancelByTime
(
model
,
time
.
Now
()
.
Add
(
time
.
Minute
*
10
))
// cwj----
if
err
!=
nil
{
if
err
!=
nil
{
model
.
Log
.
Errorf
(
"CpInviteCancelInit err:%v"
,
err
)
model
.
Log
.
Errorf
(
"CpInviteCancelInit err:%v"
,
err
)
return
return
...
...
route/cp_r/cp_relation.go
View file @
6311f9d6
...
@@ -9,6 +9,7 @@ import (
...
@@ -9,6 +9,7 @@ import (
"git.hilo.cn/hilo-common/myerr/comerr"
"git.hilo.cn/hilo-common/myerr/comerr"
"git.hilo.cn/hilo-common/resource/mysql"
"git.hilo.cn/hilo-common/resource/mysql"
"git.hilo.cn/hilo-common/sdk/tencentyun"
"git.hilo.cn/hilo-common/sdk/tencentyun"
"git.hilo.cn/hilo-common/txop/bag_tx"
"git.hilo.cn/hilo-common/txop/msg"
"git.hilo.cn/hilo-common/txop/msg"
"git.hilo.cn/hilo-common/utils"
"git.hilo.cn/hilo-common/utils"
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin"
...
@@ -205,10 +206,10 @@ func ReplyCpInvite(c *gin.Context) (*mycontext.MyContext, error) {
...
@@ -205,10 +206,10 @@ func ReplyCpInvite(c *gin.Context) (*mycontext.MyContext, error) {
return
err
return
err
}
}
// 发放告白礼物 cwj----
// 发放告白礼物 cwj----
//if _, err = bag_tx.SendUserBag(model, userSender.ID, 1, award.GiftId, award.GiftN
, 3, "告白礼物"); err != nil {
if
_
,
err
=
bag_tx
.
SendUserBag
(
model
,
userSender
.
ID
,
1
,
cp_e
.
CpConfessionGiftId
,
1
,
3
,
"告白礼物"
);
err
!=
nil
{
//
model.Log.Errorf("ReplyCpInvite userSender:%d, user:%d, status:%d, err:%v", userSender.ID, user.ID, updateStatus, err)
model
.
Log
.
Errorf
(
"ReplyCpInvite userSender:%d, user:%d, status:%d, err:%v"
,
userSender
.
ID
,
user
.
ID
,
updateStatus
,
err
)
//
return err
return
err
//
}
}
// 发放头饰 cwj----
// 发放头饰 cwj----
//if err = headwear_tx.SendHeadwear(model, userSender.ID, 1, 3); err != nil {
//if err = headwear_tx.SendHeadwear(model, userSender.ID, 1, 3); err != nil {
// model.Log.Errorf("ReplyCpInvite userSender:%d, user:%d, status:%d, err:%v", userSender.ID, user.ID, updateStatus, err)
// model.Log.Errorf("ReplyCpInvite userSender:%d, user:%d, status:%d, err:%v", userSender.ID, user.ID, updateStatus, err)
...
...
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