|
|
@ -6,12 +6,10 @@ import com.epmet.commons.rocketmq.messages.OrgOrStaffMQMsg; |
|
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
|
import com.epmet.commons.tools.distributedlock.DistributedLock; |
|
|
|
import com.epmet.commons.tools.exception.ExceptionUtils; |
|
|
|
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.opendata.dto.form.StaffBaseInfoFormDTO; |
|
|
|
import com.epmet.opendata.service.ExUserService; |
|
|
|
import com.epmet.opendata.service.GridstaffInfoPingyinService; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyContext; |
|
|
@ -22,7 +20,6 @@ import org.redisson.api.RLock; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.concurrent.TimeUnit; |
|
|
|
|
|
|
@ -90,12 +87,9 @@ public class OpenDataStaffChangeEventListener implements MessageListenerConcurre |
|
|
|
SpringContextUtils.getBean(ExUserService.class).getStaffBaseInfo(dto);*/ |
|
|
|
dto.setStaffIdList(obj.getStaffIdList()); |
|
|
|
SpringContextUtils.getBean(GridstaffInfoPingyinService.class).getStaffBaseInfo(dto); |
|
|
|
} catch (RenException e) { |
|
|
|
// 如果是我们手动抛出的异常,说明在业务可控范围内。目前不需要MQ重试
|
|
|
|
logger.error("【开放数据事件监听器】-工作人员信息变更-初始化客户组织失败:".concat(ExceptionUtils.getErrorStackTrace(e))); |
|
|
|
} catch (Exception e) { |
|
|
|
// 不是我们自己抛出的异常,可以让MQ重试
|
|
|
|
logger.error("【开放数据事件监听器】-工作人员信息变更-初始化客户组织失败:".concat(ExceptionUtils.getErrorStackTrace(e))); |
|
|
|
logger.warn("【开放数据事件监听器】-工作人员信息变更-初始化客户组织失败:".concat(ExceptionUtils.getErrorStackTrace(e))); |
|
|
|
throw e; |
|
|
|
} finally { |
|
|
|
distributedLock.unLock(lock); |
|
|
|