Commit 25cbfdc4 authored by 邓吉芬's avatar 邓吉芬

修改商品缓存

parent 31dd5ed1
......@@ -215,7 +215,7 @@ public class DrawManagerImpl implements IDrawManager {
AccountPrize accountPrize;
if (drawCountTotal - alreadyDrawCount > 0) {
// 获得奖品
List<Prize> prizeList = prizeService.listAllPrizes();
List<Prize> prizeList = prizeService.listAllPrizes(activityConfig.getActivityId());
if (CollectionUtils.isEmpty(prizeList)) {
throw new BusinessException(ErrorEnum.DRAW_CHECK_EXP, "活动已结束!");
}
......
......@@ -20,7 +20,7 @@ public interface IPrizeService extends IService<Prize> {
*
* @return
*/
List<Prize> listAllPrizes();
List<Prize> listAllPrizes(Long activityId);
/**
* 更新数量
......
......@@ -38,8 +38,6 @@ public class AccountPrizeServiceImpl extends ServiceImpl<AccountPrizeMapper, Acc
@Resource
private PrizeMapper prizeMapper;
@Value("${draw.activityId}")
private int activityId;
@Override
public Integer gainAlreadyDrawCount(String phone,Long activityId, LocalDateTime start, LocalDateTime end) {
......
......@@ -28,11 +28,10 @@ public class PrizeServiceImpl extends ServiceImpl<PrizeMapper, Prize> implements
@Resource
private PrizeMapper prizeMapper;
@Value("${draw.activityId}")
private Long activityId;
@Override
public List<Prize> listAllPrizes() {
public List<Prize> listAllPrizes(Long activityId) {
List<Prize> prizeList;
LambdaQueryWrapper<Prize> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(Prize::getValidStatus, YesOrNoEnum.YES.getCode());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment