日志级别debug 改成 info
This commit is contained in:
parent
6c479e744a
commit
ed10a03442
@ -820,7 +820,7 @@ public class LakalaApiServiceImpl implements LakalaApiService {
|
|||||||
return JSONUtil.createObj().set("code", "FAIL").set("message", "返回数据转换异常!");
|
return JSONUtil.createObj().set("code", "FAIL").set("message", "返回数据转换异常!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 写上确认收货通知日志
|
// 不管成功与否,写入确认收货通知日志,后续补偿遗漏分账的材料
|
||||||
lklReceiveNotifyLogService.addOrUpdate(paramsJSON.toString());
|
lklReceiveNotifyLogService.addOrUpdate(paramsJSON.toString());
|
||||||
|
|
||||||
// 订单是否为合单
|
// 订单是否为合单
|
||||||
@ -873,16 +873,9 @@ public class LakalaApiServiceImpl implements LakalaApiService {
|
|||||||
log.warn("[确认收货通知] 未能获取到商品子单信息,使用原始参数进行处理");
|
log.warn("[确认收货通知] 未能获取到商品子单信息,使用原始参数进行处理");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// 非合单订单,确认收货响应数据:{"trade_no":"20251015110110000066202154232129","log_no":"66202154232129","trade_state":"SUCCESS",
|
|
||||||
// "total_amount":"2950","trade_time":"20251015165538",
|
|
||||||
// "complete_notify_url":"https://mall.gpxscs.cn/api/mobile/shop/lakala/trans/receive/completeNotify",
|
|
||||||
// "merchant_no":"8226330541100H4","sub_mch_id":"812310610","origin_trade_no":"20251015110113130266250075936522",
|
|
||||||
// "origin_log_no":"66250075936522","origin_out_trade_no":"DD_20251015_2"}
|
|
||||||
log.debug("[确认收货通知] 从订单信息中获取原始交易号: originTradeNo={} originLogNo={}", originTradeNo, originLogNo);
|
log.debug("[确认收货通知] 从订单信息中获取原始交易号: originTradeNo={} originLogNo={}", originTradeNo, originLogNo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (StrUtil.isBlank(tradeState) || !"SUCCESS".equals(tradeState)) {
|
if (StrUtil.isBlank(tradeState) || !"SUCCESS".equals(tradeState)) {
|
||||||
log.warn("[确认收货通知] 交易状态未成功,不做任何处理: tradeState={}", tradeState);
|
log.warn("[确认收货通知] 交易状态未成功,不做任何处理: tradeState={}", tradeState);
|
||||||
return JSONUtil.createObj().set("code", "FAIL").set("message", "交易状态未成功,不做任何处理!");
|
return JSONUtil.createObj().set("code", "FAIL").set("message", "交易状态未成功,不做任何处理!");
|
||||||
|
|||||||
@ -5,7 +5,6 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.suisung.mall.common.constant.CommonConstant;
|
|
||||||
import com.suisung.mall.common.modules.lakala.LklReceiveNotifyLog;
|
import com.suisung.mall.common.modules.lakala.LklReceiveNotifyLog;
|
||||||
import com.suisung.mall.core.web.service.impl.BaseServiceImpl;
|
import com.suisung.mall.core.web.service.impl.BaseServiceImpl;
|
||||||
import com.suisung.mall.shop.lakala.mapper.LklReceiveNotifyLogMapper;
|
import com.suisung.mall.shop.lakala.mapper.LklReceiveNotifyLogMapper;
|
||||||
@ -44,12 +43,11 @@ public class LklReceiveNotifyLogServiceImpl extends BaseServiceImpl<LklReceiveNo
|
|||||||
log.warn("[LklReceiveNotifyLog] 新增或更新记录参数校验失败,订单号为空");
|
log.warn("[LklReceiveNotifyLog] 新增或更新记录参数校验失败,订单号为空");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 直接构建记录对象
|
// 直接构建记录对象
|
||||||
LklReceiveNotifyLog record = new LklReceiveNotifyLog();
|
LklReceiveNotifyLog record = new LklReceiveNotifyLog();
|
||||||
record.setOrderId(orderId);
|
record.setOrderId(orderId);
|
||||||
record.setRespJson(lklReceiveNotifyJSON);
|
record.setRespJson(lklReceiveNotifyJSON);
|
||||||
record.setStatus(CommonConstant.Disable2);
|
|
||||||
|
|
||||||
// 使用 saveOrUpdate 方法替代先查询再判断的方式
|
// 使用 saveOrUpdate 方法替代先查询再判断的方式
|
||||||
boolean result = saveOrUpdate(record,
|
boolean result = saveOrUpdate(record,
|
||||||
@ -65,7 +63,7 @@ public class LklReceiveNotifyLogServiceImpl extends BaseServiceImpl<LklReceiveNo
|
|||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("[LklReceiveNotifyLog] 处理拉卡拉确认收货通知记录异常,通知数据={}",
|
log.error("[LklReceiveNotifyLog] 处理拉卡拉确认收货通知记录异常,通知数据={}",
|
||||||
lklReceiveNotifyJSON.substring(0, Math.min(lklReceiveNotifyJSON.length(), 100)), e);
|
lklReceiveNotifyJSON, e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -88,6 +86,7 @@ public class LklReceiveNotifyLogServiceImpl extends BaseServiceImpl<LklReceiveNo
|
|||||||
try {
|
try {
|
||||||
log.debug("[LklReceiveNotifyLog] 开始查询拉卡拉确认收货通知记录,订单号={}", orderId);
|
log.debug("[LklReceiveNotifyLog] 开始查询拉卡拉确认收货通知记录,订单号={}", orderId);
|
||||||
|
|
||||||
|
|
||||||
QueryWrapper<LklReceiveNotifyLog> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<LklReceiveNotifyLog> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("order_id", orderId);
|
queryWrapper.eq("order_id", orderId);
|
||||||
|
|
||||||
@ -104,4 +103,5 @@ public class LklReceiveNotifyLogServiceImpl extends BaseServiceImpl<LklReceiveNo
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -145,7 +145,7 @@ logging:
|
|||||||
com:
|
com:
|
||||||
suisung:
|
suisung:
|
||||||
mall:
|
mall:
|
||||||
shop: debug
|
shop: info
|
||||||
sun:
|
sun:
|
||||||
mail: error
|
mail: error
|
||||||
baomidou: error
|
baomidou: error
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user