diff --git a/call/mail.go b/call/mail.go index 075f6bc..35a095f 100644 --- a/call/mail.go +++ b/call/mail.go @@ -2,6 +2,7 @@ package call import ( "fmt" + "github.com/liangdas/mqant/log" "server/common" "server/db" "server/util" @@ -51,11 +52,11 @@ func checkMail(uid int, red *common.PlayerRed) (unReadCount int) { db.Mysql().QueryAll(sql, "", &common.Mail{}, &all) if len(all) > 0 { now := time.Now().Unix() - //u, err := db.Mysql().UpdateRes(&common.PlayerData{UID: uid, LastSysEmailDraw: data.LastSysEmailDraw}, &common.PlayerData{LastSysEmailDraw: now}) - //if err != nil || u == 0 { - // log.Error("err:%v", err) - // return - //} + u, err := db.Mysql().UpdateRes(&common.PlayerData{UID: uid, LastSysEmailDraw: data.LastSysEmailDraw}, &common.PlayerData{LastSysEmailDraw: now}) + if err != nil || u == 0 { + log.Error("err:%v", err) + return + } for _, v := range all { one := v one.ID = 0 diff --git a/call/redpoint.go b/call/redpoint.go index 82b1a67..6cd6c7b 100644 --- a/call/redpoint.go +++ b/call/redpoint.go @@ -159,4 +159,5 @@ func PushRed(uid int, module pb.RedPointModule, num uint32) { one.List = append(one.List, &pb.RedInfo{ModuleName: module, Num: num}) log.Debug("redpoint,uid:%v,module:%v,info:%v", uid, module, one) SendNR(uid, int(pb.ServerCommonResp_CommonRedPointResp), one, "common") + checkMail(uid, nil) } diff --git a/call/share.go b/call/share.go index 1e14004..f4d3779 100644 --- a/call/share.go +++ b/call/share.go @@ -853,15 +853,15 @@ func updateShareByUp(uid, upUid, uplevel, updateType int, updateValue int64, exp // UpdateShare updateType(1:下注,2:充值,3:任务,4:邀请人,5:提现, 6:回滚) func UpdateShare(uid, updateType int, updateValue int64, expand ...string) (err error) { if updateType == 1 { // 直接更新下注奖池 + if len(expand) > 0 && expand[0] == "isRobot" { + return + } _, _, expired, rankKey := getShareRankJackpotKey() _, err = db.Redis().Incr(rankKey, updateValue/100) if err != nil { log.Error("update rank jackpot err, %s:%s", rankKey, err.Error()) } db.Redis().Expire(rankKey, time.Duration(expired)*time.Second) - if len(expand) > 0 && expand[0] == "isRobot" { - return - } } now := time.Now() shareInfo := GetShareInfo(uid) diff --git a/modules/web/handler/game.go b/modules/web/handler/game.go index 9745ab6..feaeeb1 100644 --- a/modules/web/handler/game.go +++ b/modules/web/handler/game.go @@ -365,7 +365,7 @@ func EnterGameNew(c *gin.Context) { resp.URL = all.EnterGame(enter) if resp.URL == "" { a.Code = values.CodeParam - a.Msg = "Under Maintenance,please try later." + a.Msg = "The game is under maintenance and is expected to be available at 12:00." return } util.Go(func() { diff --git a/modules/web/handler/user.go b/modules/web/handler/user.go index 625bc03..d2689c0 100644 --- a/modules/web/handler/user.go +++ b/modules/web/handler/user.go @@ -44,10 +44,7 @@ func getUserInfo(uid int, isNew bool) (resp values.UserInfoResp, err error) { resp.Activitys.WeekCard = call.ShouldShowActivityWeekCard(uid) resp.Activitys.LuckyShop = call.ShouldShowActivityLuckShop(uid) if ticker := call.GetUserValidItemsMax(uid, common.ItemDiscountTicket); ticker.ID > 0 { - resp.Activitys.DiscountTicket = struct { - Amount int64 - DiscountAmount int64 - }{Amount: ticker.Exi2, DiscountAmount: ticker.Exi1} + resp.Activitys.DiscountTicket = &values.DiscountTicketV{Amount: ticker.Exi2, DiscountAmount: ticker.Exi1} } vip := call.GetVipCon(uid) var nextVip *common.ConfigVIP @@ -140,10 +137,7 @@ func GetUserInfo(c *gin.Context) { resp.Activitys.WeekCard = call.ShouldShowActivityWeekCard(uid) resp.Activitys.LuckyShop = call.ShouldShowActivityLuckShop(uid) if ticker := call.GetUserValidItemsMax(uid, common.ItemDiscountTicket); ticker.ID > 0 { - resp.Activitys.DiscountTicket = struct { - Amount int64 - DiscountAmount int64 - }{Amount: ticker.Exi2, DiscountAmount: ticker.Exi1} + resp.Activitys.DiscountTicket = &values.DiscountTicketV{Amount: ticker.Exi2, DiscountAmount: ticker.Exi1} } vip := call.GetVipCon(a.UID) nextVip := call.GetConfigVIPByLevel(vip.Level + 1) diff --git a/modules/web/values/protocol.go b/modules/web/values/protocol.go index 67771db..68e36ad 100644 --- a/modules/web/values/protocol.go +++ b/modules/web/values/protocol.go @@ -68,13 +68,15 @@ type UserInfoResp struct { DaySign bool WeekCard bool // 是否弹出周卡 LuckyShop bool // 是否弹出幸运商店 - DiscountTicket struct { - Amount int64 // 优惠券额度 - DiscountAmount int64 // 优惠金额 - } // 优惠金额最大优惠券 + DiscountTicket *DiscountTicketV } } +type DiscountTicketV struct { + Amount int64 // 优惠券额度 + DiscountAmount int64 // 优惠金额 +} + // BalanceHisReq 请求金币流水记录 type BalanceHisReq struct { Page int `json:"page"` // 页码