Преглед изворни кода

修改商户下的添加商品缺失的merid

Yangzw пре 11 месеци
родитељ
комит
96d040f490

+ 8 - 8
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/service/spu/ProductSpuServiceImpl.java

@@ -76,11 +76,11 @@ public class ProductSpuServiceImpl implements ProductSpuService {
         UserShopDetailsVO userShopDetails = userService.getUserShopDetails();
 
         spu.setShopId(userShopDetails.getShopId());
-        spu.setMerchantId(userShopDetails.getMerchantId());
+        spu.setMerchantId(userShopDetails.getMerId());
 
         for (ProductSkuSaveReqVO productSkuSaveReqVO : skuSaveReqList) {
             productSkuSaveReqVO.setShopId(userShopDetails.getShopId());
-            productSkuSaveReqVO.setMerchantId(userShopDetails.getMerchantId());
+            productSkuSaveReqVO.setMerchantId(userShopDetails.getMerId());
         }
 
         // 插入 SPU
@@ -227,7 +227,7 @@ public class ProductSpuServiceImpl implements ProductSpuService {
         UserShopDetailsVO userShopDetails = userService.getUserShopDetails();
 
         pageReqVO.setShopId(userShopDetails.getShopId());
-        pageReqVO.setMerchantId(userShopDetails.getMerchantId());
+        pageReqVO.setMerchantId(userShopDetails.getMerId());
         return productSpuMapper.selectPage(pageReqVO);
     }
 
@@ -298,19 +298,19 @@ public class ProductSpuServiceImpl implements ProductSpuService {
 
         // 查询销售中的商品数量
         counts.put(ProductSpuPageReqVO.FOR_SALE,
-                productSpuMapper.selectCount(ProductSpuDO::getStatus, ProductSpuStatusEnum.ENABLE.getStatus(), userShopDetails.getMerchantId(),userShopDetails.getShopId()));
+                productSpuMapper.selectCount(ProductSpuDO::getStatus, ProductSpuStatusEnum.ENABLE.getStatus(), userShopDetails.getMerId(),userShopDetails.getShopId()));
         // 查询仓库中的商品数量
         counts.put(ProductSpuPageReqVO.IN_WAREHOUSE,
-                productSpuMapper.selectCount(ProductSpuDO::getStatus, ProductSpuStatusEnum.DISABLE.getStatus(), userShopDetails.getMerchantId(),userShopDetails.getShopId()));
+                productSpuMapper.selectCount(ProductSpuDO::getStatus, ProductSpuStatusEnum.DISABLE.getStatus(), userShopDetails.getMerId(),userShopDetails.getShopId()));
         // 查询售空的商品数量
         counts.put(ProductSpuPageReqVO.SOLD_OUT,
-                productSpuMapper.selectCount(ProductSpuDO::getStock, 0, userShopDetails.getMerchantId(),userShopDetails.getShopId()));
+                productSpuMapper.selectCount(ProductSpuDO::getStock, 0, userShopDetails.getMerId(),userShopDetails.getShopId()));
         // 查询触发警戒库存的商品数量
         counts.put(ProductSpuPageReqVO.ALERT_STOCK,
-                productSpuMapper.selectCount(userShopDetails.getMerchantId(),userShopDetails.getShopId()));
+                productSpuMapper.selectCount(userShopDetails.getMerId(),userShopDetails.getShopId()));
         // 查询回收站中的商品数量
         counts.put(ProductSpuPageReqVO.RECYCLE_BIN,
-                productSpuMapper.selectCount(ProductSpuDO::getStatus, ProductSpuStatusEnum.RECYCLE.getStatus(), userShopDetails.getMerchantId(),userShopDetails.getShopId()));
+                productSpuMapper.selectCount(ProductSpuDO::getStatus, ProductSpuStatusEnum.RECYCLE.getStatus(), userShopDetails.getMerId(),userShopDetails.getShopId()));
         return counts;
     }
 

+ 4 - 4
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/aftersale/AfterSaleServiceImpl.java

@@ -85,7 +85,7 @@ public class AfterSaleServiceImpl implements AfterSaleService {
     public PageResult<AfterSaleDO> getAfterSalePage(AfterSalePageReqVO pageReqVO) {
         UserShopDetailsVO userShopDetails = userService.getUserShopDetails();
         pageReqVO.setShopId(userShopDetails.getShopId());
-        pageReqVO.setMerchantId(userShopDetails.getMerchantId());
+        pageReqVO.setMerchantId(userShopDetails.getMerId());
         return tradeAfterSaleMapper.selectPage(pageReqVO);
     }
 
@@ -426,7 +426,7 @@ public class AfterSaleServiceImpl implements AfterSaleService {
     @Override
     public Long getApplyingAfterSaleCount(Long userId) {
         UserShopDetailsVO userShopDetails = userService.getUserShopDetails();
-        return tradeAfterSaleMapper.selectCountByUserIdAndStatus(userId, userShopDetails.getShopId(),userShopDetails.getMerchantId(), AfterSaleStatusEnum.APPLYING_STATUSES);
+        return tradeAfterSaleMapper.selectCountByUserIdAndStatus(userId, userShopDetails.getShopId(),userShopDetails.getMerId(), AfterSaleStatusEnum.APPLYING_STATUSES);
     }
 
     @Override
@@ -441,7 +441,7 @@ public class AfterSaleServiceImpl implements AfterSaleService {
         return tradeAfterSaleMapper.selectList(new LambdaQueryWrapperX<AfterSaleDO>()
                 .eq(AfterSaleDO::getSpuId, spuId)
                 .eqIfPresent(AfterSaleDO::getShopId, userShopDetails.getShopId())
-                .eqIfPresent(AfterSaleDO::getMerchantId,userShopDetails.getMerchantId())
+                .eqIfPresent(AfterSaleDO::getMerchantId,userShopDetails.getMerId())
         );
     }
 
@@ -451,6 +451,6 @@ public class AfterSaleServiceImpl implements AfterSaleService {
 
         return tradeAfterSaleMapper.selectList(new LambdaQueryWrapperX<AfterSaleDO>()
                 .eqIfPresent(AfterSaleDO::getShopId, userShopDetails.getShopId())
-                .eq(AfterSaleDO::getMerchantId, userShopDetails.getMerchantId()));
+                .eq(AfterSaleDO::getMerchantId, userShopDetails.getMerId()));
     }
 }

+ 1 - 1
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/delivery/DeliveryExpressTemplateServiceImpl.java

@@ -63,7 +63,7 @@ public class DeliveryExpressTemplateServiceImpl implements DeliveryExpressTempla
         UserShopDetailsVO userShopDetails = userService.getUserShopDetails();
 
         template.setShopId(userShopDetails.getShopId());
-        template.setMerchantId(userShopDetails.getMerchantId());
+        template.setMerchantId(userShopDetails.getMerId());
         expressTemplateMapper.insert(template);
         // 插入运费模板计费表
         if (CollUtil.isNotEmpty(createReqVO.getCharges())) {

+ 3 - 3
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/order/TradeOrderQueryServiceImpl.java

@@ -109,7 +109,7 @@ public class TradeOrderQueryServiceImpl implements TradeOrderQueryService {
 
         UserShopDetailsVO userShopDetails = userService.getUserShopDetails();
 
-        reqVO.setMerchantId(userShopDetails.getMerchantId());
+        reqVO.setMerchantId(userShopDetails.getMerId());
         reqVO.setShopId(userShopDetails.getShopId());
 
         // 分页查询
@@ -174,7 +174,7 @@ public class TradeOrderQueryServiceImpl implements TradeOrderQueryService {
     public Long getOrderCount(Integer status) {
         UserShopDetailsVO userShopDetails = userService.getUserShopDetails();
 
-        return tradeOrderMapper.selectCountByStatus(status,userShopDetails.getShopId(),userShopDetails.getMerchantId());
+        return tradeOrderMapper.selectCountByStatus(status,userShopDetails.getShopId(),userShopDetails.getMerId());
     }
 
     @Override
@@ -206,7 +206,7 @@ public class TradeOrderQueryServiceImpl implements TradeOrderQueryService {
     public List<TradeOrderDO> getOrderByMerId(Long id) {
         UserShopDetailsVO userShopDetails = userService.getUserShopDetails();
 
-        return tradeOrderMapper.selectOrderListByMerId(id,userShopDetails.getMerchantId(),userShopDetails.getShopId());
+        return tradeOrderMapper.selectOrderListByMerId(id,userShopDetails.getMerId(),userShopDetails.getShopId());
     }
 
     @Override

+ 1 - 1
feifan-module-system/feifan-module-system-biz/src/main/java/cn/newfeifan/mall/module/system/controller/admin/user/vo/user/UserShopDetailsVO.java

@@ -15,5 +15,5 @@ public class UserShopDetailsVO {
     /**
      * 商户id
      */
-    private Long merchantId;
+    private Long merId;
 }

+ 1 - 1
feifan-module-system/feifan-module-system-biz/src/main/java/cn/newfeifan/mall/module/system/service/user/AdminUserServiceImpl.java

@@ -520,7 +520,7 @@ public class AdminUserServiceImpl implements AdminUserService {
             AdminUserDO adminUserDO = userMapper.selectById(loginUserId);
             UserShopDetailsVO userShopDetailsVO = new UserShopDetailsVO();
             userShopDetailsVO.setShopId(adminUserDO.getShopId());
-            userShopDetailsVO.setMerchantId(adminUserDO.getMerchantId());
+            userShopDetailsVO.setMerId(adminUserDO.getMerchantId());
             log.info("====userShopDetailsVO:{}",userShopDetailsVO);
             return userShopDetailsVO;
         } else {

+ 1 - 1
feifan-server/src/main/resources/application.yaml

@@ -3,7 +3,7 @@ spring:
     name: feifan-server
 
   profiles:
-    active: local
+    active: prod
 
   main:
     allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。