修改优惠券格式;修复邮箱;分享奖池过滤机器人

dev_aagame_provider
zhora 2 weeks ago
parent 5168aaba29
commit 0524ebab14
  1. 11
      call/mail.go
  2. 1
      call/redpoint.go
  3. 6
      call/share.go
  4. 2
      modules/web/handler/game.go
  5. 10
      modules/web/handler/user.go
  6. 8
      modules/web/values/protocol.go

@ -2,6 +2,7 @@ package call
import ( import (
"fmt" "fmt"
"github.com/liangdas/mqant/log"
"server/common" "server/common"
"server/db" "server/db"
"server/util" "server/util"
@ -51,11 +52,11 @@ func checkMail(uid int, red *common.PlayerRed) (unReadCount int) {
db.Mysql().QueryAll(sql, "", &common.Mail{}, &all) db.Mysql().QueryAll(sql, "", &common.Mail{}, &all)
if len(all) > 0 { if len(all) > 0 {
now := time.Now().Unix() now := time.Now().Unix()
//u, err := db.Mysql().UpdateRes(&common.PlayerData{UID: uid, LastSysEmailDraw: data.LastSysEmailDraw}, &common.PlayerData{LastSysEmailDraw: now}) u, err := db.Mysql().UpdateRes(&common.PlayerData{UID: uid, LastSysEmailDraw: data.LastSysEmailDraw}, &common.PlayerData{LastSysEmailDraw: now})
//if err != nil || u == 0 { if err != nil || u == 0 {
// log.Error("err:%v", err) log.Error("err:%v", err)
// return return
//} }
for _, v := range all { for _, v := range all {
one := v one := v
one.ID = 0 one.ID = 0

@ -159,4 +159,5 @@ func PushRed(uid int, module pb.RedPointModule, num uint32) {
one.List = append(one.List, &pb.RedInfo{ModuleName: module, Num: num}) one.List = append(one.List, &pb.RedInfo{ModuleName: module, Num: num})
log.Debug("redpoint,uid:%v,module:%v,info:%v", uid, module, one) log.Debug("redpoint,uid:%v,module:%v,info:%v", uid, module, one)
SendNR(uid, int(pb.ServerCommonResp_CommonRedPointResp), one, "common") SendNR(uid, int(pb.ServerCommonResp_CommonRedPointResp), one, "common")
checkMail(uid, nil)
} }

@ -853,15 +853,15 @@ func updateShareByUp(uid, upUid, uplevel, updateType int, updateValue int64, exp
// UpdateShare updateType(1:下注,2:充值,3:任务,4:邀请人,5:提现, 6:回滚) // UpdateShare updateType(1:下注,2:充值,3:任务,4:邀请人,5:提现, 6:回滚)
func UpdateShare(uid, updateType int, updateValue int64, expand ...string) (err error) { func UpdateShare(uid, updateType int, updateValue int64, expand ...string) (err error) {
if updateType == 1 { // 直接更新下注奖池 if updateType == 1 { // 直接更新下注奖池
if len(expand) > 0 && expand[0] == "isRobot" {
return
}
_, _, expired, rankKey := getShareRankJackpotKey() _, _, expired, rankKey := getShareRankJackpotKey()
_, err = db.Redis().Incr(rankKey, updateValue/100) _, err = db.Redis().Incr(rankKey, updateValue/100)
if err != nil { if err != nil {
log.Error("update rank jackpot err, %s:%s", rankKey, err.Error()) log.Error("update rank jackpot err, %s:%s", rankKey, err.Error())
} }
db.Redis().Expire(rankKey, time.Duration(expired)*time.Second) db.Redis().Expire(rankKey, time.Duration(expired)*time.Second)
if len(expand) > 0 && expand[0] == "isRobot" {
return
}
} }
now := time.Now() now := time.Now()
shareInfo := GetShareInfo(uid) shareInfo := GetShareInfo(uid)

@ -365,7 +365,7 @@ func EnterGameNew(c *gin.Context) {
resp.URL = all.EnterGame(enter) resp.URL = all.EnterGame(enter)
if resp.URL == "" { if resp.URL == "" {
a.Code = values.CodeParam 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 return
} }
util.Go(func() { util.Go(func() {

@ -44,10 +44,7 @@ func getUserInfo(uid int, isNew bool) (resp values.UserInfoResp, err error) {
resp.Activitys.WeekCard = call.ShouldShowActivityWeekCard(uid) resp.Activitys.WeekCard = call.ShouldShowActivityWeekCard(uid)
resp.Activitys.LuckyShop = call.ShouldShowActivityLuckShop(uid) resp.Activitys.LuckyShop = call.ShouldShowActivityLuckShop(uid)
if ticker := call.GetUserValidItemsMax(uid, common.ItemDiscountTicket); ticker.ID > 0 { if ticker := call.GetUserValidItemsMax(uid, common.ItemDiscountTicket); ticker.ID > 0 {
resp.Activitys.DiscountTicket = struct { resp.Activitys.DiscountTicket = &values.DiscountTicketV{Amount: ticker.Exi2, DiscountAmount: ticker.Exi1}
Amount int64
DiscountAmount int64
}{Amount: ticker.Exi2, DiscountAmount: ticker.Exi1}
} }
vip := call.GetVipCon(uid) vip := call.GetVipCon(uid)
var nextVip *common.ConfigVIP var nextVip *common.ConfigVIP
@ -140,10 +137,7 @@ func GetUserInfo(c *gin.Context) {
resp.Activitys.WeekCard = call.ShouldShowActivityWeekCard(uid) resp.Activitys.WeekCard = call.ShouldShowActivityWeekCard(uid)
resp.Activitys.LuckyShop = call.ShouldShowActivityLuckShop(uid) resp.Activitys.LuckyShop = call.ShouldShowActivityLuckShop(uid)
if ticker := call.GetUserValidItemsMax(uid, common.ItemDiscountTicket); ticker.ID > 0 { if ticker := call.GetUserValidItemsMax(uid, common.ItemDiscountTicket); ticker.ID > 0 {
resp.Activitys.DiscountTicket = struct { resp.Activitys.DiscountTicket = &values.DiscountTicketV{Amount: ticker.Exi2, DiscountAmount: ticker.Exi1}
Amount int64
DiscountAmount int64
}{Amount: ticker.Exi2, DiscountAmount: ticker.Exi1}
} }
vip := call.GetVipCon(a.UID) vip := call.GetVipCon(a.UID)
nextVip := call.GetConfigVIPByLevel(vip.Level + 1) nextVip := call.GetConfigVIPByLevel(vip.Level + 1)

@ -68,11 +68,13 @@ type UserInfoResp struct {
DaySign bool DaySign bool
WeekCard bool // 是否弹出周卡 WeekCard bool // 是否弹出周卡
LuckyShop bool // 是否弹出幸运商店 LuckyShop bool // 是否弹出幸运商店
DiscountTicket struct { DiscountTicket *DiscountTicketV
}
}
type DiscountTicketV struct {
Amount int64 // 优惠券额度 Amount int64 // 优惠券额度
DiscountAmount int64 // 优惠金额 DiscountAmount int64 // 优惠金额
} // 优惠金额最大优惠券
}
} }
// BalanceHisReq 请求金币流水记录 // BalanceHisReq 请求金币流水记录

Loading…
Cancel
Save