|
@@ -51,7 +51,11 @@ func GetLotteryActiveInfo(activeId int64, sess map[string]interface{}, session *
|
|
|
if ok, err := redis.Exists(consts.RedisNewCode, onceKey); err == nil && !ok {
|
|
|
err = r.PointHarvest(r.DLai.Cost)
|
|
|
if err == nil {
|
|
|
- redis.Put(consts.RedisNewCode, onceKey, now.Day(), 30*24*60*60)
|
|
|
+ expireTime := 10 * 24 * 60 * 60
|
|
|
+ if r.DLai.ActiveEndTime > now.Unix() {
|
|
|
+ expireTime = int(r.DLai.ActiveEndTime - now.Unix())
|
|
|
+ }
|
|
|
+ redis.Put(consts.RedisNewCode, onceKey, now.Day(), expireTime)
|
|
|
} else {
|
|
|
log.Println("--首次 赠送--err -:", err.Error())
|
|
|
}
|