|
@ -6,6 +6,8 @@ import com.epmet.commons.rocketmq.messages.StaffPatrolMQMsg; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
import com.epmet.commons.tools.distributedlock.DistributedLock; |
|
|
import com.epmet.commons.tools.distributedlock.DistributedLock; |
|
|
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
import com.epmet.commons.tools.exception.ExceptionUtils; |
|
|
import com.epmet.commons.tools.exception.ExceptionUtils; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.redis.RedisKeys; |
|
|
import com.epmet.commons.tools.redis.RedisKeys; |
|
@ -77,10 +79,6 @@ public class OpenDataPatrolChangeEventListener implements MessageListenerConcurr |
|
|
if (!StrConstant.PY_CUSTOMER.equals(msgObj.getCustomerId())) { |
|
|
if (!StrConstant.PY_CUSTOMER.equals(msgObj.getCustomerId())) { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
if (msgObj == null) { |
|
|
|
|
|
log.warn("consumeMessage msg body is blank"); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
RLock lock = null; |
|
|
RLock lock = null; |
|
|
try { |
|
|
try { |
|
|
lock = distributedLock.getLock(String.format("lock:open_data_patrol:%s:%s",tags, msgObj.getObjectId()), |
|
|
lock = distributedLock.getLock(String.format("lock:open_data_patrol:%s:%s",tags, msgObj.getObjectId()), |
|
@ -104,6 +102,9 @@ public class OpenDataPatrolChangeEventListener implements MessageListenerConcurr |
|
|
log.error("错误的消息类型:{}", tags); |
|
|
log.error("错误的消息类型:{}", tags); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
if (aBoolean == null || !aBoolean){ |
|
|
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"消费失败!"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} catch (RenException e) { |
|
|
} catch (RenException e) { |
|
|
// 如果是我们手动抛出的异常,说明在业务可控范围内。目前不需要MQ重试
|
|
|
// 如果是我们手动抛出的异常,说明在业务可控范围内。目前不需要MQ重试
|
|
|