|
|
|
@ -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) |
|
|
|
|