diff --git a/_const/enum/cp_e/cp_relation.go b/_const/enum/cp_e/cp_relation.go index 86bd635e83a87d8504076cb35583ff298f9e019c..ca95e4c2a2c27671fcd7e7abf0c8be220911ff3e 100644 --- a/_const/enum/cp_e/cp_relation.go +++ b/_const/enum/cp_e/cp_relation.go @@ -20,4 +20,6 @@ const ( CpCancelRevoke CpCancelStatus = 2 CpCancelAccept CpCancelStatus = 3 CpCancelAcceptAuto CpCancelStatus = 4 + + CpConfessionGiftId = 3379 // cp礼物id cwj---- ) diff --git a/corn/cp_corn/cp.go b/corn/cp_corn/cp.go index aed68b3893ad4c736c4f548f19c44615482b480b..3fe404424e9dcefc8446bbb69e8b6412ae9abfc6 100644 --- a/corn/cp_corn/cp.go +++ b/corn/cp_corn/cp.go @@ -30,7 +30,8 @@ func CpInviteCancelInit() { defer utils.CheckGoPanic() model := domain.CreateModelNil() // 获取超过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 { model.Log.Errorf("CpInviteCancelInit err:%v", err) return @@ -60,7 +61,8 @@ func CpInviteCancelInit() { } // 获取超过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 { model.Log.Errorf("CpInviteCancelInit err:%v", err) return diff --git a/route/cp_r/cp_relation.go b/route/cp_r/cp_relation.go index 03b3256621d7802fc4e10e01fe828c26b55eeeb3..f109e80f3ea2b7235dcef861e7c0e5e531f509d3 100644 --- a/route/cp_r/cp_relation.go +++ b/route/cp_r/cp_relation.go @@ -9,6 +9,7 @@ import ( "git.hilo.cn/hilo-common/myerr/comerr" "git.hilo.cn/hilo-common/resource/mysql" "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/utils" "github.com/gin-gonic/gin" @@ -205,10 +206,10 @@ func ReplyCpInvite(c *gin.Context) (*mycontext.MyContext, error) { return err } // 发放告白礼物 cwj---- - //if _, err = bag_tx.SendUserBag(model, userSender.ID, 1, award.GiftId, award.GiftN, 3, "告白礼物"); err != nil { - // model.Log.Errorf("ReplyCpInvite userSender:%d, user:%d, status:%d, err:%v", userSender.ID, user.ID, updateStatus, err) - // return err - //} + 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) + return err + } // 发放头饰 cwj---- //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)