Showing
1 changed file
with
7 additions
and
7 deletions
1 | package com.yohoufo.order.service.seller.processor; | 1 | package com.yohoufo.order.service.seller.processor; |
2 | 2 | ||
3 | -import com.yohoufo.common.alarm.CommonAlarmEventPublisher; | ||
4 | import com.yohoufo.common.utils.DateUtil; | 3 | import com.yohoufo.common.utils.DateUtil; |
5 | import com.yohoufo.dal.order.SellerTaskMapper; | 4 | import com.yohoufo.dal.order.SellerTaskMapper; |
6 | import com.yohoufo.dal.order.model.SellerTask; | 5 | import com.yohoufo.dal.order.model.SellerTask; |
7 | -import com.yohoufo.order.model.dto.*; | 6 | +import com.yohoufo.order.model.dto.SellerTaskDTO; |
7 | +import com.yohoufo.order.model.dto.SellerTaskResult; | ||
8 | import com.yohoufo.order.service.handler.ISellerTaskHandler; | 8 | import com.yohoufo.order.service.handler.ISellerTaskHandler; |
9 | import com.yohoufo.order.utils.LoggerUtils; | 9 | import com.yohoufo.order.utils.LoggerUtils; |
10 | import org.slf4j.Logger; | 10 | import org.slf4j.Logger; |
@@ -23,7 +23,7 @@ public class SellerTaskProcessor { | @@ -23,7 +23,7 @@ public class SellerTaskProcessor { | ||
23 | private SellerTaskMapper sellerTaskMapper; | 23 | private SellerTaskMapper sellerTaskMapper; |
24 | 24 | ||
25 | public SellerTaskResult process(SellerTaskDTO taskDto) { | 25 | public SellerTaskResult process(SellerTaskDTO taskDto) { |
26 | - if (taskDto == null){ | 26 | + if (taskDto == null) { |
27 | return null; | 27 | return null; |
28 | } | 28 | } |
29 | int uid = taskDto.getUid(); | 29 | int uid = taskDto.getUid(); |
@@ -52,11 +52,11 @@ public class SellerTaskProcessor { | @@ -52,11 +52,11 @@ public class SellerTaskProcessor { | ||
52 | 52 | ||
53 | private SellerTaskResult doProcess(SellerTaskDTO sbpDto) { | 53 | private SellerTaskResult doProcess(SellerTaskDTO sbpDto) { |
54 | ISellerTaskHandler handler = sbpDto.getTaskHandler(); | 54 | ISellerTaskHandler handler = sbpDto.getTaskHandler(); |
55 | - SellerTaskResult taskResult = handler.handle(sbpDto); | 55 | + SellerTaskResult taskResult = handler.handle(sbpDto); |
56 | if (taskResult == null || taskResult.failCnt > 0) { | 56 | if (taskResult == null || taskResult.failCnt > 0) { |
57 | - //任务失败或者有部分失败 | ||
58 | - CommonAlarmEventPublisher.publish("seller batch operation fail", "ufo.seller.batchTask", | ||
59 | - "uid=" + sbpDto.getUid() + ",taskId=" + sbpDto.getTaskId() + ",taskType=" + sbpDto.getTaskType()); | 57 | + // 任务失败或者有部分失败, 改成异步检查数据一致性 |
58 | + log.info("[{}-{}] seller batch operation fail, taskType is {} and taskMeta is {}", | ||
59 | + sbpDto.getUid(), sbpDto.getTaskId(), sbpDto.getTaskType(), sbpDto.getTaskMeta()); | ||
60 | } | 60 | } |
61 | return taskResult; | 61 | return taskResult; |
62 | } | 62 | } |
-
Please register or login to post a comment