WH01243 4 年之前
父節點
當前提交
cad451722d
共有 2 個文件被更改,包括 6 次插入0 次删除
  1. 1 0
      api/internal/logic/lotteryinfochecklogic.go
  2. 5 0
      service/ActivityService.go

+ 1 - 0
api/internal/logic/lotteryinfochecklogic.go

@@ -53,6 +53,7 @@ func (l *LotteryInfoCheckLogic) LotteryInfoCheck(req types.Request) (*types.Lott
 		productJson.Describe=value.Describe
 		userLottery.UseProductList=append(userLottery.UseProductList,productJson)
 	}
+	userLottery.UserLotteryId=data.UserLotteryId
 	userLottery.Instructions = data.Instructions
 	userLottery.Remark = data.Remark
 	userLottery.LotteryType=data.LotteryType

+ 5 - 0
service/ActivityService.go

@@ -57,6 +57,11 @@ func (service *ActivityService) LotteryReceive(data *activity.LotteryOperation,
 			orm.Rollback()
 			return entity.ErrorCode, "活动没有开始不可领劵"
 		}
+		if !activityTime(activity.EndDate) {
+			log.Println("活动结束不可领劵", activity)
+			orm.Rollback()
+			return entity.ErrorCode, "活动结束不可领劵"
+		}
 		//3、先判断奖券是否可以重复领取,在判断之前是否领取过