update:订单执行日志打印

This commit is contained in:
Damonny 2025-02-21 14:30:38 +08:00
parent 6ef2974124
commit c8559a5451
1 changed files with 203 additions and 193 deletions

View File

@ -40,6 +40,7 @@ import com.doudian.open.core.AccessToken;
import com.doudian.open.core.AccessTokenBuilder;
import com.doudian.open.core.GlobalConfig;
import com.doudian.open.gson.Gson;
import com.doudian.open.gson.JsonSyntaxException;
import com.doudian.open.msg.refund_RefundAgreed.param.RefundRefundAgreedParam;
import com.doudian.open.msg.refund_RefundCreated.param.RefundRefundCreatedParam;
import com.doudian.open.msg.refund_ReturnApplyAgreed.param.RefundReturnApplyAgreedParam;
@ -47,6 +48,7 @@ import com.doudian.open.msg.trade_TradeCanceled.param.TradeTradeCanceledParam;
import com.doudian.open.msg.trade_TradePaid.param.TradeTradePaidParam;
import com.doudian.open.msg.trade_TradePending.param.TradeTradePendingParam;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -63,6 +65,7 @@ import java.util.regex.Pattern;
@Service
@Validated
@Slf4j
public class DouDianOrderCatchServiceImpl implements OrderCatchService {
@ -94,6 +97,9 @@ public class DouDianOrderCatchServiceImpl implements OrderCatchService {
@Override
public void catchOrders(List<Message> catchRepVO) {
// 插入日志
log.info("抖音消息推送订单,抓取/更新 订单");
log.error("抖音订单推送:{}", catchRepVO);
try {
Gson gson = new Gson();
for (Message message : catchRepVO) {
String tag = message.getTag();
@ -297,6 +303,10 @@ public class DouDianOrderCatchServiceImpl implements OrderCatchService {
// 未接入的消息类型
}
}
} catch (Exception e) {
log.error(e.getMessage(),e);
log.error("订单解析执行报错,错误原因:{}",e);
}
}