|
@@ -6,6 +6,7 @@ import (
|
|
"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
|
|
"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
|
|
"app.yhyue.com/moapp/jybase/redis"
|
|
"app.yhyue.com/moapp/jybase/redis"
|
|
"fmt"
|
|
"fmt"
|
|
|
|
+ "jy/src/jfw/modules/publicapply/src/activityday/config"
|
|
"jy/src/jfw/modules/publicapply/src/activityday/consts"
|
|
"jy/src/jfw/modules/publicapply/src/activityday/consts"
|
|
"jy/src/jfw/modules/publicapply/src/activityday/util"
|
|
"jy/src/jfw/modules/publicapply/src/activityday/util"
|
|
"jy/src/jfw/modules/publicapply/src/db"
|
|
"jy/src/jfw/modules/publicapply/src/db"
|
|
@@ -45,13 +46,17 @@ func GetLotteryActiveInfo(activeId int64, sess map[string]interface{}, session *
|
|
return
|
|
return
|
|
}
|
|
}
|
|
//活动期间
|
|
//活动期间
|
|
- if r.DLai.ActiveStartTime <= now.Unix() && r.DLai.ActiveEndTime >= now.Unix() {
|
|
|
|
|
|
+ if r.DLai.ActiveStartTime <= now.Unix() && r.DLai.ActiveEndTime >= now.Unix() && config.Config.FASwitch {
|
|
//首次访问活动页面 赠送剑鱼币100
|
|
//首次访问活动页面 赠送剑鱼币100
|
|
onceKey := fmt.Sprintf("activity_day_once_%s", r.UserInfo.UserId)
|
|
onceKey := fmt.Sprintf("activity_day_once_%s", r.UserInfo.UserId)
|
|
if ok, err := redis.Exists(consts.RedisNewCode, onceKey); err == nil && !ok {
|
|
if ok, err := redis.Exists(consts.RedisNewCode, onceKey); err == nil && !ok {
|
|
err = r.PointHarvest(r.DLai.Cost)
|
|
err = r.PointHarvest(r.DLai.Cost)
|
|
if err == nil {
|
|
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 {
|
|
} else {
|
|
log.Println("--首次 赠送--err -:", err.Error())
|
|
log.Println("--首次 赠送--err -:", err.Error())
|
|
}
|
|
}
|