Commit 6311f9d6 authored by chenweijian's avatar chenweijian

cp

parent 4156f4f6
...@@ -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----
) )
...@@ -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
......
...@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment