Commit 733f1899 authored by zhangfeng's avatar zhangfeng

订单V值删完善日志

parent ccac072e
......@@ -51,13 +51,13 @@ public class OderVStrategy implements ScoreRuleStrategy {
@Override
public void addScore(ScoreMessage message) {
log.info("订单V值增加积分");
log.info("Received order V message,orderID:{}", message.getOrderId());
Long orderId = message.getOrderId();
OrderRespDTO order;
try {
order = orderApi.getOrder(orderId, "");
} catch (Exception e) {
log.error("Order in shipping listener: Get order error,orderId:{},orderNo:{}", orderId, "");
log.error("Order in shipping listener: Get order error,orderId:{}", orderId, e);
return;
}
if (Objects.isNull(order)) {
......@@ -72,12 +72,12 @@ public class OderVStrategy implements ScoreRuleStrategy {
Integer transportId = order.getTransportId();
ScoreRuleDO scoreRuleDO = scoreRuleService.getEnabledOrderVScoreRuleByTransportType(transportId);
if (Objects.isNull(scoreRuleDO)) {
log.info("Order in shipping listener: No score rule match");
log.info("Order in shipping listener: No score rule match,orderID:{}", orderId);
return;
}
// 是否过期,或者活动还没开始
if (!scoreRuleDO.getEndTime().after(new Date()) || !scoreRuleDO.getStartTime().before(new Date())) {
log.info("Order in shipping listener: The score rule has expired");
log.info("Order in shipping listener: The score rule has expired,scoreRuleID:{}", scoreRuleDO.getId());
return;
}
// 目的地信息
......@@ -117,7 +117,7 @@ public class OderVStrategy implements ScoreRuleStrategy {
// 订单入口
String orderEntryString = extraInfo.getOrderEntry();
if (StringUtils.isBlank(orderEntryString)) {
log.info("Order in shipping listener: orderEntry is null");
log.info("Order in shipping listener: orderEntry is null,scoreRuleID:{}", scoreRuleDO.getId());
return;
}
String[] orderEntry = orderEntryString.split(",");
......@@ -149,7 +149,7 @@ public class OderVStrategy implements ScoreRuleStrategy {
// 是否首单,首单只加一次
if (extraInfo.getFirstOrder() == YesOrNoTypeEnum.YES.ordinal()) {
if (!orderApi.isFirstOrder(userId)) {
log.info("Order in shipping listener: Not first order");
log.info("Order in shipping listener: Not first order,userId:{}", userId);
return;
}
}
......@@ -188,6 +188,7 @@ public class OderVStrategy implements ScoreRuleStrategy {
} catch (Exception e) {
log.error("Order in shipping listener: operateScore error", e);
}
log.info("Order V rule add score success,ruleID:{},orderID:{},userID:{}", scoreRuleDO.getId(), message.getOrderId(), userId);
}
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment