|
|
@@ -21,6 +21,8 @@ import com.fs.live.param.LiveLotteryProduct;
|
|
|
import com.fs.live.service.ILiveAutoTaskService;
|
|
|
import com.fs.live.service.ILiveGoodsService;
|
|
|
import com.fs.live.vo.LiveGoodsVo;
|
|
|
+import com.fs.live.vo.LiveLotteryConfVo;
|
|
|
+import com.fs.live.vo.LiveLotteryProductListVo;
|
|
|
import org.checkerframework.checker.units.qual.A;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@@ -126,7 +128,9 @@ public class LiveAutoTaskServiceImpl implements ILiveAutoTaskService {
|
|
|
LiveLotteryConf liveLotteryConf = liveLotteryConfMapper.selectLiveLotteryConfByLotteryId(Long.valueOf(liveAutoTask.getContent()));
|
|
|
if(liveLotteryConf == null) return R.error("抽奖配置不存在");
|
|
|
if(!"0".equals(liveLotteryConf.getLotteryStatus())) return R.error("抽奖状态应该为:未开始");
|
|
|
- List<LiveLotteryProduct> prizes = lotteryProductConfMapper.selectLiveLotteryProductConfByLotteryId(liveLotteryConf.getLotteryId());
|
|
|
+ List<Long> lotteryIds = new ArrayList<>();
|
|
|
+ lotteryIds.add(liveLotteryConf.getLotteryId());
|
|
|
+ List<LiveLotteryProductListVo> prizes = lotteryProductConfMapper.selectLiveLotteryProductConfByLotteryIds(lotteryIds);
|
|
|
if (prizes == null || prizes.isEmpty()) {
|
|
|
return R.error("抽奖配置请先添加奖品");
|
|
|
}
|