diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/AdvanceOrderListener.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/AdvanceOrderListener.java index bdc730002..d940930a9 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/AdvanceOrderListener.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/AdvanceOrderListener.java @@ -1,6 +1,7 @@ package com.logpm.trunkline.mq; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import cn.hutool.json.JSONArray; @@ -86,7 +87,7 @@ public class AdvanceOrderListener { } if (ObjectUtil.isNotNull(advanceEntity)) { String orderCode = advanceEntity.getOrderCode(); - if(orderCode.contains("遗")){ + if (orderCode.contains("遗")) { advanceEntity.setLegacyStatus("1"); } advanceService.save(advanceEntity); @@ -102,6 +103,10 @@ public class AdvanceOrderListener { continue; } advanceDetailEntity.setAdvanceId(advanceEntity.getId()); + // 设置发货时间为当前时间 + if (StrUtil.isEmpty(advanceDetailEntity.getSendDateStr())) { + advanceDetailEntity.setSendDateStr(DateUtil.today()); + } advanceDetailEntityList.add(advanceDetailEntity); JSONArray items = detail.getJSONArray("items"); if (CollUtil.isNotEmpty(items)) {