|
|
@@ -315,6 +315,7 @@ public class WebSocketServer {
|
|
|
msg.setStatus(status);
|
|
|
LiveGoodsVo liveGoods = liveGoodsService.selectLiveGoodsVoByGoodsId(goodsId);
|
|
|
if(liveGoods == null) return;
|
|
|
+ liveService.asyncToCacheLiveConfig(liveId);
|
|
|
msg.setLiveId(liveId);
|
|
|
msg.setData(JSONObject.toJSONString(liveGoods));
|
|
|
broadcastMessage(liveId, JSONObject.toJSONString(R.ok().put("data", msg)));
|
|
|
@@ -330,6 +331,7 @@ public class WebSocketServer {
|
|
|
msg.setStatus( status);
|
|
|
LiveRedConf liveRedConf = liveRedConfService.selectLiveRedConfByRedId(jsonObject.getLong("redId"));
|
|
|
if (Objects.nonNull(liveRedConf)) {
|
|
|
+ liveService.asyncToCacheLiveConfig(liveId);
|
|
|
msg.setData(JSONObject.toJSONString(liveRedConf));
|
|
|
broadcastMessage(liveId, JSONObject.toJSONString(R.ok().put("data", msg)));
|
|
|
}
|
|
|
@@ -345,6 +347,7 @@ public class WebSocketServer {
|
|
|
msg.setStatus( status);
|
|
|
LiveLotteryConf liveLotteryConf = liveLotteryConfService.selectLiveLotteryConfByLotteryId(jsonObject.getLong("lotteryId"));
|
|
|
if (Objects.nonNull(liveLotteryConf)) {
|
|
|
+ liveService.asyncToCacheLiveConfig(liveId);
|
|
|
msg.setData(JSONObject.toJSONString(liveLotteryConf));
|
|
|
broadcastMessage(liveId, JSONObject.toJSONString(R.ok().put("data", msg)));
|
|
|
}
|
|
|
@@ -477,6 +480,7 @@ public class WebSocketServer {
|
|
|
msg.setCmd("goods");
|
|
|
LiveGoodsVo liveGoodsVo = JSON.parseObject(task.getContent(), LiveGoodsVo.class);
|
|
|
liveGoodsService.updateLiveIsShow(liveGoodsVo.getGoodsId(), task.getLiveId());
|
|
|
+ liveService.asyncToCacheLiveConfig(task.getLiveId());
|
|
|
}else if (task.getTaskType() == 2L) {
|
|
|
msg.setCmd("red");
|
|
|
LiveRedConf liveRedConf = JSON.parseObject(task.getContent(), LiveRedConf.class);
|
|
|
@@ -488,6 +492,7 @@ public class WebSocketServer {
|
|
|
liveRedConf.setUpdateTime( now);
|
|
|
msg.setData(JSON.toJSONString(liveRedConf));
|
|
|
liveRedConfService.updateLiveRedConf(liveRedConf);
|
|
|
+ liveService.asyncToCacheLiveConfig(task.getLiveId());
|
|
|
}else if (task.getTaskType() == 4L) {
|
|
|
msg.setCmd("lottery");
|
|
|
LiveLotteryConf liveLotteryConf = JSON.parseObject(task.getContent(), LiveLotteryConf.class);
|
|
|
@@ -499,6 +504,7 @@ public class WebSocketServer {
|
|
|
liveLotteryConf.setUpdateTime( now);
|
|
|
msg.setData(JSON.toJSONString(liveLotteryConf));
|
|
|
liveLotteryConfService.updateLiveLotteryConf(liveLotteryConf);
|
|
|
+ liveService.asyncToCacheLiveConfig(task.getLiveId());
|
|
|
}else if (task.getTaskType() == 3L) {
|
|
|
msg.setCmd("sendMsg");
|
|
|
msg.setMsg(task.getContent());
|