Explorar el Código

Merge remote-tracking branch 'origin/master_exclusive_shop_20250718' into master_exclusive_shop_20250718

yuhongqi hace 2 meses
padre
commit
42eab89e4e

+ 7 - 0
fs-service-system/src/main/java/com/fs/express/cache/FsStoreDeliversCacheService.java

@@ -11,4 +11,11 @@ public interface FsStoreDeliversCacheService {
      * @return List<FsStoreDelivers>
      */
     Integer findExpressStatusByOrderId(Long orderId);
+
+    /**
+     * 根据orderCode查询发货信息(取第一条)
+     * @param orderCode 订单号
+     * @return FsStoreDelivers
+     */
+    FsStoreDelivers findByOrderCode(String orderCode);
 }

+ 11 - 2
fs-service-system/src/main/java/com/fs/express/cache/impl/FsStoreDeliversCacheServiceImpl.java

@@ -3,14 +3,12 @@ package com.fs.express.cache.impl;
 import com.fs.express.FsStoreDeliversService;
 import com.fs.express.cache.FsStoreDeliversCacheService;
 import com.fs.store.domain.FsStoreDelivers;
-import com.fs.store.domain.FsUser;
 import com.github.benmanes.caffeine.cache.Cache;
 import com.github.benmanes.caffeine.cache.Caffeine;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.TimeUnit;
 
@@ -18,11 +16,17 @@ import java.util.concurrent.TimeUnit;
 public class FsStoreDeliversCacheServiceImpl implements FsStoreDeliversCacheService {
     @Autowired
     private FsStoreDeliversService fsStoreDeliversService;
+
     private static final Cache<Long, Integer> EXPRESS_STATUS_CACHE = Caffeine.newBuilder()
             .maximumSize(1000)
             .expireAfterWrite(3, TimeUnit.MINUTES)
             .build();
 
+    private static final Cache<String, FsStoreDelivers> ORDER_CODE_CACHE = Caffeine.newBuilder()
+            .maximumSize(1000)
+            .expireAfterWrite(3, TimeUnit.MINUTES)
+            .build();
+
     @Override
     public Integer findExpressStatusByOrderId(Long orderId) {
         EXPRESS_STATUS_CACHE.get(orderId, key -> {
@@ -36,4 +40,9 @@ public class FsStoreDeliversCacheServiceImpl implements FsStoreDeliversCacheServ
 
         return 0;
     }
+
+    @Override
+    public FsStoreDelivers findByOrderCode(String orderCode) {
+        return ORDER_CODE_CACHE.get(orderCode, key -> fsStoreDeliversService.findByOrderCode(orderCode));
+    }
 }

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

@@ -55,6 +55,7 @@ import com.fs.erp.service.IErpOrderService;
 import com.fs.erp.utils.ErpContextHolder;
 import com.fs.express.FsStoreDeliversService;
 import com.fs.express.cache.FsStoreDeliversCacheService;
+import com.fs.store.domain.FsStoreDelivers;
 import com.fs.huifuPay.domain.HuiFuCreateOrder;
 import com.fs.huifuPay.domain.HuifuCreateOrderResult;
 import com.fs.huifuPay.dto.*;
@@ -235,6 +236,9 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
     @Autowired
     private FsStoreDeliversService fsStoreDeliversService;
 
+    @Autowired
+    private FsStoreDeliversCacheService fsStoreDeliversCacheService;
+
     @Autowired
     private IFsStoreProductPackageService fsStoreProductPackageService;
     @Autowired
@@ -1323,6 +1327,13 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
                     vo.setItems(items);
                 }
             }
+            // 从fs_store_delivers表通过orderCode获取deliveryId
+            if(StringUtils.isNotEmpty(vo.getOrderCode())){
+                FsStoreDelivers delivers = fsStoreDeliversCacheService.findByOrderCode(vo.getOrderCode());
+                if(delivers != null && StringUtils.isNotEmpty(delivers.getDeliverId())){
+                    vo.setDeliveryId(delivers.getDeliverId());
+                }
+            }
             //处理是否可以申请售后
             vo.setIsAfterSales(0);
             if(vo.getStatus().equals(OrderInfoEnum.STATUS_3.getValue())){

+ 10 - 10
fs-user-app/src/main/java/com/fs/app/controller/LiveCartController.java

@@ -80,16 +80,16 @@ public class LiveCartController extends AppBaseController
     /**
      * 导出购物车列表
      */
-    @Log(title = "购物车", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    @ApiOperation("导出购物车列表")
-    @Login
-    public AjaxResult export(LiveCart liveCart)
-    {
-        List<LiveCart> list = liveCartService.selectLiveCartList(liveCart);
-        ExcelUtil<LiveCart> util = new ExcelUtil<LiveCart>(LiveCart.class);
-        return util.exportExcel(list, "购物车数据");
-    }
+//    @Log(title = "购物车", businessType = BusinessType.EXPORT)
+//    @GetMapping("/export")
+//    @ApiOperation("导出购物车列表")
+//    @Login
+//    public AjaxResult export(LiveCart liveCart)
+//    {
+//        List<LiveCart> list = liveCartService.selectLiveCartList(liveCart);
+//        ExcelUtil<LiveCart> util = new ExcelUtil<LiveCart>(LiveCart.class);
+//        return util.exportExcel(list, "购物车数据");
+//    }
 
     /**
      * 获取购物车详细信息

+ 8 - 8
fs-user-app/src/main/java/com/fs/app/controller/LiveGoodsController.java

@@ -81,14 +81,14 @@ public class LiveGoodsController extends AppBaseController
     /**
      * 导出直播商品列表
      */
-    @Log(title = "直播商品", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(LiveGoods liveGoods)
-    {
-        List<LiveGoods> list = liveGoodsService.selectLiveGoodsList(liveGoods);
-        ExcelUtil<LiveGoods> util = new ExcelUtil<LiveGoods>(LiveGoods.class);
-        return util.exportExcel(list, "直播商品数据");
-    }
+//    @Log(title = "直播商品", businessType = BusinessType.EXPORT)
+//    @GetMapping("/export")
+//    public AjaxResult export(LiveGoods liveGoods)
+//    {
+//        List<LiveGoods> list = liveGoodsService.selectLiveGoodsList(liveGoods);
+//        ExcelUtil<LiveGoods> util = new ExcelUtil<LiveGoods>(LiveGoods.class);
+//        return util.exportExcel(list, "直播商品数据");
+//    }
 
     /**
      * 获取直播商品详细信息

+ 8 - 8
fs-user-app/src/main/java/com/fs/app/controller/LiveMsgController.java

@@ -42,14 +42,14 @@ public class LiveMsgController extends BaseController
     /**
      * 导出直播讨论列表
      */
-    @Log(title = "直播讨论", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(LiveMsg liveMsg)
-    {
-        List<LiveMsg> list = liveMsgService.selectLiveMsgList(liveMsg);
-        ExcelUtil<LiveMsg> util = new ExcelUtil<LiveMsg>(LiveMsg.class);
-        return util.exportExcel(list, "直播讨论数据");
-    }
+//    @Log(title = "直播讨论", businessType = BusinessType.EXPORT)
+//    @GetMapping("/export")
+//    public AjaxResult export(LiveMsg liveMsg)
+//    {
+//        List<LiveMsg> list = liveMsgService.selectLiveMsgList(liveMsg);
+//        ExcelUtil<LiveMsg> util = new ExcelUtil<LiveMsg>(LiveMsg.class);
+//        return util.exportExcel(list, "直播讨论数据");
+//    }
 
 
 

+ 10 - 10
fs-user-app/src/main/java/com/fs/app/controller/LiveOrderController.java

@@ -144,16 +144,16 @@ public class LiveOrderController extends AppBaseController
     /**
      * 导出订单列表
      */
-    @Log(title = "订单", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(LiveOrderQueryVO liveOrder)
-    {
-        log.info("订单导出 参数: {}", JSON.toJSONString(liveOrder));
-
-        List<LiveOrder> list = liveOrderService.selectLiveOrderListExport(liveOrder);
-        ExcelUtil<LiveOrder> util = new ExcelUtil<LiveOrder>(LiveOrder.class);
-        return util.exportExcel(list, "订单数据");
-    }
+//    @Log(title = "订单", businessType = BusinessType.EXPORT)
+//    @GetMapping("/export")
+//    public AjaxResult export(LiveOrderQueryVO liveOrder)
+//    {
+//        log.info("订单导出 参数: {}", JSON.toJSONString(liveOrder));
+//
+//        List<LiveOrder> list = liveOrderService.selectLiveOrderListExport(liveOrder);
+//        ExcelUtil<LiveOrder> util = new ExcelUtil<LiveOrder>(LiveOrder.class);
+//        return util.exportExcel(list, "订单数据");
+//    }
 
     /**
      * 获取订单详细信息

+ 8 - 8
fs-user-app/src/main/java/com/fs/app/controller/LiveOrderLogsController.java

@@ -40,14 +40,14 @@ public class LiveOrderLogsController extends BaseController
     /**
      * 导出订单操作记录列表
      */
-    @Log(title = "订单操作记录", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(LiveOrderLogs liveOrderLogs)
-    {
-        List<LiveOrderLogs> list = liveOrderLogsService.selectLiveOrderLogsList(liveOrderLogs);
-        ExcelUtil<LiveOrderLogs> util = new ExcelUtil<LiveOrderLogs>(LiveOrderLogs.class);
-        return util.exportExcel(list, "订单操作记录数据");
-    }
+//    @Log(title = "订单操作记录", businessType = BusinessType.EXPORT)
+//    @GetMapping("/export")
+//    public AjaxResult export(LiveOrderLogs liveOrderLogs)
+//    {
+//        List<LiveOrderLogs> list = liveOrderLogsService.selectLiveOrderLogsList(liveOrderLogs);
+//        ExcelUtil<LiveOrderLogs> util = new ExcelUtil<LiveOrderLogs>(LiveOrderLogs.class);
+//        return util.exportExcel(list, "订单操作记录数据");
+//    }
 
     /**
      * 获取订单操作记录详细信息

+ 8 - 8
fs-user-app/src/main/java/com/fs/app/controller/LiveOrderPaymentController.java

@@ -40,14 +40,14 @@ public class LiveOrderPaymentController extends BaseController
     /**
      * 导出支付明细列表
      */
-    @Log(title = "支付明细", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(LiveOrderPayment liveOrderPayment)
-    {
-        List<LiveOrderPayment> list = liveOrderPaymentService.selectLiveOrderPaymentList(liveOrderPayment);
-        ExcelUtil<LiveOrderPayment> util = new ExcelUtil<LiveOrderPayment>(LiveOrderPayment.class);
-        return util.exportExcel(list, "支付明细数据");
-    }
+//    @Log(title = "支付明细", businessType = BusinessType.EXPORT)
+//    @GetMapping("/export")
+//    public AjaxResult export(LiveOrderPayment liveOrderPayment)
+//    {
+//        List<LiveOrderPayment> list = liveOrderPaymentService.selectLiveOrderPaymentList(liveOrderPayment);
+//        ExcelUtil<LiveOrderPayment> util = new ExcelUtil<LiveOrderPayment>(LiveOrderPayment.class);
+//        return util.exportExcel(list, "支付明细数据");
+//    }
 
     /**
      * 获取支付明细详细信息

+ 8 - 8
fs-user-app/src/main/java/com/fs/app/controller/LiveUserFavoriteController.java

@@ -40,14 +40,14 @@ public class LiveUserFavoriteController extends BaseController
     /**
      * 导出用户直播收藏列表
      */
-    @Log(title = "用户直播收藏", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(LiveUserFavorite liveUserFavorite)
-    {
-        List<LiveUserFavorite> list = liveUserFavoriteService.selectLiveUserFavoriteList(liveUserFavorite);
-        ExcelUtil<LiveUserFavorite> util = new ExcelUtil<LiveUserFavorite>(LiveUserFavorite.class);
-        return util.exportExcel(list, "用户直播收藏数据");
-    }
+//    @Log(title = "用户直播收藏", businessType = BusinessType.EXPORT)
+//    @GetMapping("/export")
+//    public AjaxResult export(LiveUserFavorite liveUserFavorite)
+//    {
+//        List<LiveUserFavorite> list = liveUserFavoriteService.selectLiveUserFavoriteList(liveUserFavorite);
+//        ExcelUtil<LiveUserFavorite> util = new ExcelUtil<LiveUserFavorite>(LiveUserFavorite.class);
+//        return util.exportExcel(list, "用户直播收藏数据");
+//    }
 
     /**
      * 获取用户直播收藏详细信息

+ 11 - 11
fs-user-app/src/main/java/com/fs/app/controller/LiveUserFollowController.java

@@ -37,17 +37,17 @@ public class LiveUserFollowController extends BaseController
         return getDataTable(list);
     }
 
-    /**
-     * 导出用户直播关注列表
-     */
-    @Log(title = "用户直播关注", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(LiveUserFollow liveUserFollow)
-    {
-        List<LiveUserFollow> list = liveUserFollowService.selectLiveUserFollowList(liveUserFollow);
-        ExcelUtil<LiveUserFollow> util = new ExcelUtil<LiveUserFollow>(LiveUserFollow.class);
-        return util.exportExcel(list, "用户直播关注数据");
-    }
+//    /**
+//     * 导出用户直播关注列表
+//     */
+//    @Log(title = "用户直播关注", businessType = BusinessType.EXPORT)
+//    @GetMapping("/export")
+//    public AjaxResult export(LiveUserFollow liveUserFollow)
+//    {
+//        List<LiveUserFollow> list = liveUserFollowService.selectLiveUserFollowList(liveUserFollow);
+//        ExcelUtil<LiveUserFollow> util = new ExcelUtil<LiveUserFollow>(LiveUserFollow.class);
+//        return util.exportExcel(list, "用户直播关注数据");
+//    }
 
     /**
      * 获取用户直播关注详细信息

+ 8 - 8
fs-user-app/src/main/java/com/fs/app/controller/LiveUserLikeController.java

@@ -40,14 +40,14 @@ public class LiveUserLikeController extends BaseController
     /**
      * 导出用户直播赞列表
      */
-    @Log(title = "用户直播赞", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(LiveUserLike liveUserLike)
-    {
-        List<LiveUserLike> list = liveUserLikeService.selectLiveUserLikeList(liveUserLike);
-        ExcelUtil<LiveUserLike> util = new ExcelUtil<LiveUserLike>(LiveUserLike.class);
-        return util.exportExcel(list, "用户直播赞数据");
-    }
+//    @Log(title = "用户直播赞", businessType = BusinessType.EXPORT)
+//    @GetMapping("/export")
+//    public AjaxResult export(LiveUserLike liveUserLike)
+//    {
+//        List<LiveUserLike> list = liveUserLikeService.selectLiveUserLikeList(liveUserLike);
+//        ExcelUtil<LiveUserLike> util = new ExcelUtil<LiveUserLike>(LiveUserLike.class);
+//        return util.exportExcel(list, "用户直播赞数据");
+//    }
 
     /**
      * 获取用户直播赞详细信息