|
@@ -391,17 +391,16 @@ func (r *RaffleInfo) UserAccountInfo() (ua *Lua, err error) {
|
|
|
)
|
|
|
//今日是否已中奖
|
|
|
if now.Format(date.Date_Short_Layout) == strings.Split(createTime, " ")[0] {
|
|
|
- todayNum = 1
|
|
|
- }
|
|
|
- if _, ok := (*ua)[pk]; ok {
|
|
|
- (*ua)[pk].TodayNum += todayNum
|
|
|
- } else {
|
|
|
- (*ua)[pk] = &entity.LotteryUserAccount{
|
|
|
- ActiveId: activeId,
|
|
|
- PrizeId: prizeInfoId,
|
|
|
- CreateTime: createTime,
|
|
|
- TodayNum: todayNum,
|
|
|
+ if tmp, ok := (*ua)[pk]; ok {
|
|
|
+ todayNum = tmp.TodayNum
|
|
|
}
|
|
|
+ todayNum += 1
|
|
|
+ }
|
|
|
+ (*ua)[pk] = &entity.LotteryUserAccount{
|
|
|
+ ActiveId: activeId,
|
|
|
+ PrizeId: prizeInfoId,
|
|
|
+ CreateTime: createTime,
|
|
|
+ TodayNum: todayNum,
|
|
|
}
|
|
|
//此类奖品--中奖时间
|
|
|
r.PrizeTimesMap[pm] = append(r.PrizeTimesMap[pm], createTime)
|