Authored by LUOXC

log

package com.yohoufo.order.service.seller.processor;
import com.yohoufo.common.alarm.CommonAlarmEventPublisher;
import com.yohoufo.common.utils.DateUtil;
import com.yohoufo.dal.order.SellerTaskMapper;
import com.yohoufo.dal.order.model.SellerTask;
import com.yohoufo.order.model.dto.*;
import com.yohoufo.order.model.dto.SellerTaskDTO;
import com.yohoufo.order.model.dto.SellerTaskResult;
import com.yohoufo.order.service.handler.ISellerTaskHandler;
import com.yohoufo.order.utils.LoggerUtils;
import org.slf4j.Logger;
... ... @@ -23,7 +23,7 @@ public class SellerTaskProcessor {
private SellerTaskMapper sellerTaskMapper;
public SellerTaskResult process(SellerTaskDTO taskDto) {
if (taskDto == null){
if (taskDto == null) {
return null;
}
int uid = taskDto.getUid();
... ... @@ -54,9 +54,9 @@ public class SellerTaskProcessor {
ISellerTaskHandler handler = sbpDto.getTaskHandler();
SellerTaskResult taskResult = handler.handle(sbpDto);
if (taskResult == null || taskResult.failCnt > 0) {
//任务失败或者有部分失败
CommonAlarmEventPublisher.publish("seller batch operation fail", "ufo.seller.batchTask",
"uid=" + sbpDto.getUid() + ",taskId=" + sbpDto.getTaskId() + ",taskType=" + sbpDto.getTaskType());
// 任务失败或者有部分失败, 改成异步检查数据一致性
log.info("[{}-{}] seller batch operation fail, taskType is {} and taskMeta is {}",
sbpDto.getUid(), sbpDto.getTaskId(), sbpDto.getTaskType(), sbpDto.getTaskMeta());
}
return taskResult;
}
... ...