Commit 63e277af by 桂前礼

fix json null

parent 685affd0
......@@ -99,7 +99,14 @@ public class PcloudGuideSilenceRunnerImpl implements ApplicationRunner {
PcloudGuideDelayDto guideDelayDto = PcloudGuideDelayDto.builder().sendTime(new Date()).duration(0)
.spanTime((pcloudGuide.getTimeSpan() == null ? 0 : pcloudGuide.getTimeSpan())).num(pcloudGuideDelayDto.getNum() + 1)
.robotWxId(pcloudGuideDelayDto.getRobotWxId()).ip(pcloudGuideDelayDto.getIp()).code(pcloudGuideDelayDto.getCode()).msgList(messageVOList).build();
JedisClusterUtils.hset(pcloudGuideDelayDto.getRobotWxId() + PCLOUD_GUIDE_SUFFIX, pcloudGuideDelayDto.getUserWxId(), JSONObject.toJSONString(guideDelayDto));
if (JSONObject.toJSONString(guideDelayDto)==null){
guideDelayDto = PcloudGuideDelayDto.builder().sendTime(new Date()).duration(0)
.spanTime((pcloudGuide.getTimeSpan() == null ? 0 : pcloudGuide.getTimeSpan())).num(pcloudGuideDelayDto.getNum() + 1)
.robotWxId(pcloudGuideDelayDto.getRobotWxId()).code(pcloudGuideDelayDto.getCode()).ip(pcloudGuideDelayDto.getIp()).build();
}
JedisClusterUtils.hset(pcloudGuideDelayDto.getRobotWxId() + PCLOUD_GUIDE_SUFFIX, userId, JSONObject.toJSONString(guideDelayDto));
} else {
// 最后一条 删除缓存
JedisClusterUtils.hdel(pcloudGuideDelayDto.getRobotWxId() + PCLOUD_GUIDE_SUFFIX, userId);
......
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