Jelajahi Sumber

订单新增订单来源信息

yfh 2 minggu lalu
induk
melakukan
4f9b393aa6

+ 5 - 0
fs-service-system/src/main/java/com/fs/store/param/FsStoreOrderParam.java

@@ -80,6 +80,11 @@ public class FsStoreOrderParam extends BaseEntity implements Serializable
 
     private Long scheduleId;
 
+    /**
+     * appId 订单来源
+     */
+    private String orderSource;
+
     private String orderVisit;
 
 }

+ 2 - 0
fs-service-system/src/main/java/com/fs/store/service/impl/FsStoreAfterSalesServiceImpl.java

@@ -37,6 +37,8 @@ import com.fs.store.cache.IFsWarehouseCacheService;
 import com.fs.store.mapper.FsStoreDeliversMapper;
 import com.fs.store.mapper.FsWarehousesMapper;
 import com.fs.system.config.SnowflakeUtils;
+import com.fs.system.domain.WxMiniProgramConfig;
+import com.fs.system.mapper.WxMiniProgramConfigMapper;
 import com.fs.tzBank.TzBankService;
 import com.fs.pay.pay.domain.RefundResult;
 import com.fs.pay.pay.service.PayService;

+ 4 - 0
fs-service-system/src/main/java/com/fs/store/service/impl/FsStoreOrderServiceImpl.java

@@ -638,6 +638,10 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
                     vo.setItems(items);
                 }
             }
+            List<FsStorePayment> fsStorePayments = fsStorePaymentMapper.selectFsStorePaymentByOrderIdNew(vo.getId());
+            if (CollectionUtils.isNotEmpty(fsStorePayments)) {
+                vo.setOrderSource(fsStorePayments.get(0).getAppId());
+            }
         }
         return list;
     }

+ 1 - 0
fs-service-system/src/main/java/com/fs/store/service/impl/FsStorePaymentServiceImpl.java

@@ -1,6 +1,7 @@
 package com.fs.store.service.impl;
 
 import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.concurrent.TimeUnit;
 

+ 4 - 1
fs-service-system/src/main/java/com/fs/store/vo/FsStoreOrderVO.java

@@ -242,6 +242,9 @@ public class FsStoreOrderVO implements Serializable
     private String itemJson;
 
     private String orderVisit;
-
+    /**
+     * appId 订单来源
+     */
+    private String orderSource;
 
 }

+ 7 - 0
fs-service-system/src/main/resources/mapper/store/FsStoreOrderMapper.xml

@@ -577,6 +577,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             left join fs_store_order_item oi on o.id = oi.order_id
             left join fs_store_product fsp on fsp.product_id = oi.product_id
         </if>
+        <if test = 'maps.orderSource != null and  maps.orderSource !=  "" '>
+            left join fs_store_payment sp on o.id = sp.order_id
+        </if>
+
         <where>
             <if test = 'maps.orderCode != null and  maps.orderCode !=""    '>
                 and o.order_code like CONCAT(#{maps.orderCode},'%')
@@ -599,6 +603,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test = 'maps.phone != null and  maps.phone !=""     '>
                 and u.phone like CONCAT(#{maps.phone},'%')
             </if>
+            <if test = 'maps.orderSource != null and  maps.orderSource !=  "" '>
+                and sp.app_id =#{maps.orderSource}
+            </if>
             <if test = 'maps.userPhone != null and  maps.userPhone !=""     '>
                 and o.user_phone like CONCAT(#{maps.userPhone},'%')
             </if>