|
@@ -117,11 +117,16 @@ public class LiveFacadeServiceImpl extends BaseController implements LiveFacadeS
|
|
|
LiveVo liveVo;
|
|
LiveVo liveVo;
|
|
|
if (ObjectUtil.isNotEmpty(o)) {
|
|
if (ObjectUtil.isNotEmpty(o)) {
|
|
|
liveVo = JSON.parseObject(o.toString(), LiveVo.class);
|
|
liveVo = JSON.parseObject(o.toString(), LiveVo.class);
|
|
|
-
|
|
|
|
|
} else {
|
|
} else {
|
|
|
liveVo = liveService.asyncToCacheLiveDetail(id);
|
|
liveVo = liveService.asyncToCacheLiveDetail(id);
|
|
|
}
|
|
}
|
|
|
- return R.ok().put("data", liveVo).put("storeId", liveVo.getStoreId());
|
|
|
|
|
|
|
+ if (ObjectUtil.isEmpty(liveVo)) {
|
|
|
|
|
+ R.error("未找到直播");
|
|
|
|
|
+ }
|
|
|
|
|
+ if(liveVo.getIsShow() == 2) {
|
|
|
|
|
+ return R.error("直播未开放");
|
|
|
|
|
+ }
|
|
|
|
|
+ return R.ok().put("data", liveVo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -154,9 +159,9 @@ public class LiveFacadeServiceImpl extends BaseController implements LiveFacadeS
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- @DistributeLock(keyExpression = "#lottery.liveId + #lottery.userId", scene = "draw_claim")
|
|
|
|
|
|
|
+ @DistributeLock(keyExpression = "#lottery.liveId +'_' #lottery.userId", scene = "draw_claim")
|
|
|
public R drawClaim(LotteryPO lottery) {
|
|
public R drawClaim(LotteryPO lottery) {
|
|
|
- Object o = redisUtil.hashGet(String.format(LiveKeysConstant.LIVE_HOME_PAGE_CONFIG_RED, lottery.getLiveId(), lottery.getLotteryId()), String.valueOf(lottery.getUserId()));
|
|
|
|
|
|
|
+ Object o = redisUtil.hashGet(String.format(LiveKeysConstant.LIVE_HOME_PAGE_CONFIG_DRAW, lottery.getLiveId(), lottery.getLotteryId()), String.valueOf(lottery.getUserId()));
|
|
|
if (ObjectUtil.isNotEmpty(o)) {
|
|
if (ObjectUtil.isNotEmpty(o)) {
|
|
|
return R.ok("您已参加抽奖活动,请等待开奖!");
|
|
return R.ok("您已参加抽奖活动,请等待开奖!");
|
|
|
}
|
|
}
|