Browse Source

Merge branch 'dev/2024/0429/update-business' of Harper/feifan-backend-zx-business into master

修改商户下的添加商品缺失的merid
Yangzw 11 months ago
parent
commit
13d7d7e693

+ 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

@@ -97,7 +97,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);
     }
 
@@ -463,7 +463,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
@@ -478,7 +478,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())
         );
     }
 
@@ -488,7 +488,7 @@ 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;
 }

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

@@ -497,8 +497,7 @@ public class AdminUserServiceImpl implements AdminUserService {
         Set<Long> roleIds = new HashSet<>();
 
         // 查询商户管理员的ID
-        RoleDO shanghuAdmin = roleMapper.selectOne(new LambdaQueryWrapper<RoleDO>().eq(RoleDO::getCode, "shanghu_admin")
-                .eq(RoleDO::getCategoryId, 3));
+        RoleDO shanghuAdmin = roleMapper.selectOne(new LambdaQueryWrapper<RoleDO>().eq(RoleDO::getCode, "shanghu_admin"));
 
         if (shanghuAdmin != null) {
             roleIds.add(shanghuAdmin.getId());
@@ -531,8 +530,8 @@ public class AdminUserServiceImpl implements AdminUserService {
             AdminUserDO adminUserDO = userMapper.selectById(loginUserId);
             UserShopDetailsVO userShopDetailsVO = new UserShopDetailsVO();
             userShopDetailsVO.setShopId(adminUserDO.getShopId());
-            userShopDetailsVO.setMerchantId(adminUserDO.getMerchantId());
-            log.info("====userShopDetailsVO:{}", userShopDetailsVO);
+            userShopDetailsVO.setMerId(adminUserDO.getMerchantId());
+            log.info("====userShopDetailsVO:{}",userShopDetailsVO);
             return userShopDetailsVO;
         } else {
             log.info("====userShopDetailsVO:{}", s);