|
|
@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON; |
|
|
|
import com.epmet.commons.rocketmq.constants.MQUserPropertys; |
|
|
|
import com.epmet.commons.rocketmq.messages.DisputeProcessMQMsg; |
|
|
|
import com.epmet.commons.rocketmq.messages.ProjectChangedMQMsg; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.distributedlock.DistributedLock; |
|
|
|
import com.epmet.commons.tools.exception.ExceptionUtils; |
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
@ -111,12 +112,19 @@ public class ProjectChangedCustomListener implements MessageListenerConcurrently |
|
|
|
String customerId = msgObj.getCustomerId(); |
|
|
|
distributedLock = SpringContextUtils.getBean(DistributedLock.class); |
|
|
|
lock = distributedLock.getLock(String.format("lock:project_changed:%s:%s", customerId, msgObj.getProjectId()) |
|
|
|
,30L, 30L, TimeUnit.SECONDS); |
|
|
|
,60L, 60L, TimeUnit.SECONDS); |
|
|
|
|
|
|
|
if (StringUtils.isBlank(customerId)){ |
|
|
|
logger.error("consumer project_changed fail,msg:{}",customerId); |
|
|
|
return; |
|
|
|
} |
|
|
|
//睡一秒 要不然那边执行不完
|
|
|
|
try { |
|
|
|
Thread.sleep(NumConstant.ONE_THOUSAND); |
|
|
|
} catch (InterruptedException e) { |
|
|
|
log.error("consumeMessage exception",e); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ExtractOriginFormDTO extractOriginFormDTO = new ExtractOriginFormDTO(); |
|
|
|
extractOriginFormDTO.setCustomerId(customerId); |
|
|
|