缓存过期时间
continuous-integration/drone/push Build is passing Details

于相涌/mail
YXY 2 years ago
parent a4e25e813c
commit 0480422d21

@ -19,6 +19,7 @@ import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.concurrent.TimeUnit;
/**
* @author yuxiangyong
@ -88,13 +89,13 @@ public class MultidimensionalTableCallback extends CallbackAbstract {
event = JSONObject.parseObject(eventStr, Event.class);
}
//如果已经存在处理中的就不需要操作数据库了
if (event != null && EventOperateStatus.PENDING.getCode().equals(event.getOperateStatus())) {
if (event != null && EventOperateStatus.PENDING.getCode().equals(event.getOperateStatus()) && event.getNumbers() < 3) {
continue;
}
event = this.buildDto(request, event,recordId);
if (event.getId() == null) {
eventService.insertEvent(event);
redisTemplate.opsForValue().set(cacheKey, JSONObject.toJSONString(event));
redisTemplate.opsForValue().set(cacheKey, JSONObject.toJSONString(event),1, TimeUnit.MINUTES);
} else {
updateEventList.add(event.getId());
}

Loading…
Cancel
Save