|
|
@ -9,6 +9,8 @@ import com.epmet.commons.tools.exception.RenException; |
|
|
|
import com.epmet.commons.tools.redis.RedisKeys; |
|
|
|
import com.epmet.commons.tools.redis.RedisUtils; |
|
|
|
import com.epmet.commons.tools.utils.SpringContextUtils; |
|
|
|
import com.epmet.constant.SystemMessageType; |
|
|
|
import com.epmet.service.IcNatService; |
|
|
|
import com.epmet.service.StatsResiWarnService; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.lang.StringUtils; |
|
|
@ -71,6 +73,9 @@ public class ICWarnStatsEventListener implements MessageListenerConcurrently { |
|
|
|
30L, 30L, TimeUnit.SECONDS); |
|
|
|
//待执行方法
|
|
|
|
SpringContextUtils.getBean(StatsResiWarnService.class).resiWarn(obj.getCustomerId()); |
|
|
|
//根据居民Id更新 核酸检测的是否居民状态
|
|
|
|
updateIcNatResiFlag(tags, obj); |
|
|
|
|
|
|
|
} catch (RenException e) { |
|
|
|
// 如果是我们手动抛出的异常,说明在业务可控范围内。目前不需要MQ重试
|
|
|
|
logger.error("【开放数据事件监听器】-客户居民信息变动MQ失败:".concat(ExceptionUtils.getErrorStackTrace(e))); |
|
|
@ -91,6 +96,26 @@ public class ICWarnStatsEventListener implements MessageListenerConcurrently { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* desc:根据居民Id更新 核酸检测的是否居民状态(只有新增和删除时调用) |
|
|
|
* @param tags |
|
|
|
* @param obj |
|
|
|
*/ |
|
|
|
private void updateIcNatResiFlag(String tags, IcResiUserAddMQMsg obj) { |
|
|
|
try { |
|
|
|
if (StringUtils.isBlank(obj.getCustomerId())||StringUtils.isBlank(obj.getIcResiUser())){ |
|
|
|
log.warn("updateIcNatResiFlag param is error"); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (SystemMessageType.IC_RESI_USER_ADD.equals(tags) || SystemMessageType.IC_RESI_USER_DEL.equals(tags)) { |
|
|
|
Integer effectRow = SpringContextUtils.getBean(IcNatService.class).updateIsResiFlag(obj.getCustomerId(), obj.getIcResiUser()); |
|
|
|
log.debug("updateIcNatResiFlag effectRow:{},param customerId & icResiUserId:{}", effectRow, JSON.toJSONString(obj)); |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("updateIcNatResiFlag exception", e); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @description |
|
|
|
* |
|
|
|