From a918f6fdb38ac7cc033c3b811a6fe501192a70a6 Mon Sep 17 00:00:00 2001 From: Jack <46790855@qq.com> Date: Fri, 13 Dec 2024 15:16:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E7=A5=A8=E6=9C=BA=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../suisung/mall/common/api/StateCode.java | 16 ++++++++++++++- .../impl/ShopOrderBaseServiceImpl.java | 20 ++++++++++++++++++- .../mapper/order/ShopOrderBaseMapper.xml | 13 +++++++----- 3 files changed, 42 insertions(+), 7 deletions(-) diff --git a/mall-common/src/main/java/com/suisung/mall/common/api/StateCode.java b/mall-common/src/main/java/com/suisung/mall/common/api/StateCode.java index a0e95a02..21aaa690 100644 --- a/mall-common/src/main/java/com/suisung/mall/common/api/StateCode.java +++ b/mall-common/src/main/java/com/suisung/mall/common/api/StateCode.java @@ -1,6 +1,7 @@ package com.suisung.mall.common.api; import com.suisung.mall.common.utils.I18nUtil; +import io.swagger.models.auth.In; import java.math.BigDecimal; import java.util.HashMap; @@ -15,7 +16,20 @@ public class StateCode { public static final int DELIVERY_TYPE_SELF_PICK_UP = 5; // 自提(运费 0 元) public static final int DELIVERY_TYPE_EXP = 10; // 普通快递 public static final int DELIVERY_TYPE_IN_STORE_SERVICE = 15; // 店铺配送 - public static final int DELIVERY_TYPE_SAME_CITY= 16;//同城配送,一般是顺丰同城,达达,蜂鸟 + public static final int DELIVERY_TYPE_SAME_CITY= 16;//顺丰同城配送 + + public static final Map DELIVERY_TYPE_MAP = new HashMap(){ + { + put(DELIVERY_TYPE_EXPRESS,"快递配送"); + put(DELIVERY_TYPE_EMS,"EMS"); + put(DELIVERY_TYPE_MAIL,"平邮"); + put(DELIVERY_TYPE_AIR_FREIGHT,"货运"); + put(DELIVERY_TYPE_SELF_PICK_UP,"到店自提"); + put(DELIVERY_TYPE_EXP,"普通快递"); + put(DELIVERY_TYPE_IN_STORE_SERVICE,"店铺配送"); + put(DELIVERY_TYPE_SAME_CITY,"顺丰同城"); + } + }; public static final int DELIVERY_TIME_NO_LIMIT = 1; //不限送货时间:周一至周日 public static final int DELIVERY_TIME_WORKING_DAY = 2; //工作日送货:周一至周五 diff --git a/mall-shop/src/main/java/com/suisung/mall/shop/order/service/impl/ShopOrderBaseServiceImpl.java b/mall-shop/src/main/java/com/suisung/mall/shop/order/service/impl/ShopOrderBaseServiceImpl.java index b1b47afd..7e97bf08 100644 --- a/mall-shop/src/main/java/com/suisung/mall/shop/order/service/impl/ShopOrderBaseServiceImpl.java +++ b/mall-shop/src/main/java/com/suisung/mall/shop/order/service/impl/ShopOrderBaseServiceImpl.java @@ -8266,14 +8266,32 @@ public class ShopOrderBaseServiceImpl extends BaseServiceImpl 0 ? orderShippingFee : orderShippingFeeAmount); + + // 支付渠道处理 + m.put("payment_channel_name", m.getOrDefault("payment_channel_name", "线上支付").toString()); + // 配送时间= 支付时间+25分钟 m.put("delivery_time", DateUtil.offsetMinute((Date) m.get("payment_time"), 25)); + // 配送方式 + String deliveryTypeName = StateCode.DELIVERY_TYPE_MAP.getOrDefault(m.getOrDefault("delivery_type_id",StateCode.DELIVERY_TYPE_SAME_CITY),"普通快递"); + m.put("delivery_type_name", deliveryTypeName); + + // 预留字段 + m.put("quanyi", 0.00); // 会员权益 + m.put("miaosha", 0.00); // 秒杀 + m.put("yajin", 0.00); // 押金 + m.put("cashier", m.getOrDefault("store_name", "店长")); // 收银员 + m.put("order_source", "微信小程序"); // 订单来源 return m; } diff --git a/mall-shop/src/main/resources/mapper/order/ShopOrderBaseMapper.xml b/mall-shop/src/main/resources/mapper/order/ShopOrderBaseMapper.xml index 1bef985b..9afd9e53 100644 --- a/mall-shop/src/main/resources/mapper/order/ShopOrderBaseMapper.xml +++ b/mall-shop/src/main/resources/mapper/order/ShopOrderBaseMapper.xml @@ -521,17 +521,20 @@