فهرست منبع

更新客户端bug

Yangzw 11 ماه پیش
والد
کامیت
aa154540ba
11فایلهای تغییر یافته به همراه41 افزوده شده و 8 حذف شده
  1. 3 3
      feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/controller/admin/spu/ProductSpuController.java
  2. 2 2
      feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/service/spu/ProductSpuService.java
  3. 1 1
      feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/service/spu/ProductSpuServiceImpl.java
  4. 1 0
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/dal/mysql/order/TradeOrderMapper.java
  5. 5 0
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/order/TradeOrderQueryServiceImpl.java
  6. 1 2
      feifan-module-sale/feifan-module-sale-biz/src/main/java/cn/newfeifan/mall/sale/controller/admin/shop/ShopController.java
  7. 6 0
      feifan-module-sale/feifan-module-sale-biz/src/main/java/cn/newfeifan/mall/sale/service/shop/ShopService.java
  8. 7 0
      feifan-module-sale/feifan-module-sale-biz/src/main/java/cn/newfeifan/mall/sale/service/shop/ShopServiceImpl.java
  9. 9 0
      feifan-module-system/feifan-module-system-biz/src/main/java/cn/newfeifan/mall/module/system/controller/admin/user/UserProfileController.java
  10. 1 0
      feifan-module-system/feifan-module-system-biz/src/main/java/cn/newfeifan/mall/module/system/service/user/AdminUserService.java
  11. 5 0
      feifan-module-system/feifan-module-system-biz/src/main/java/cn/newfeifan/mall/module/system/service/user/AdminUserServiceImpl.java

+ 3 - 3
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/controller/admin/spu/ProductSpuController.java

@@ -125,10 +125,10 @@ public class ProductSpuController {
     }
 
     @GetMapping("/get-count-by-mer")
-    @Operation(summary = "获得商品 SPU 分页 tab count")
+    @Operation(summary = "获得商品 SPU 分页 tab count - 通过店铺商户查询")
     @PreAuthorize("@ss.hasPermission('product:spu:query')")
-    public CommonResult<Map<Integer, Long>> getSpuCountByMer(@RequestParam("merId") Long merId) {
-        return success(productSpuService.getTabsCount(merId));
+    public CommonResult<Map<Integer, Long>> getSpuCountByMer() {
+        return success(productSpuService.getTabsCountByMer());
     }
 
 

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

@@ -105,11 +105,11 @@ public interface ProductSpuService {
 
 
     /**
-     * 获取 SPU 列表标签对应的 Count 数量
+     * 根据商户获取 SPU 列表标签对应的 Count 数量
      *
      * @return Count 数量
      */
-    Map<Integer, Long> getTabsCount(Long merId);
+    Map<Integer, Long> getTabsCountByMer();
 
 
     /**

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

@@ -309,7 +309,7 @@ public class ProductSpuServiceImpl implements ProductSpuService {
     }
 
     @Override
-    public Map<Integer, Long> getTabsCount(Long merId) {
+    public Map<Integer, Long> getTabsCountByMer() {
         Map<Integer, Long> counts = Maps.newLinkedHashMapWithExpectedSize(5);
 
         ShopBO shop = getShop();

+ 1 - 0
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/dal/mysql/order/TradeOrderMapper.java

@@ -39,6 +39,7 @@ public interface TradeOrderMapper extends BaseMapperX<TradeOrderDO> {
                 .eqIfPresent(TradeOrderDO::getTerminal, reqVO.getTerminal())
                 .eqIfPresent(TradeOrderDO::getLogisticsId, reqVO.getLogisticsId())
                 .eqIfPresent(TradeOrderDO::getMerchantId, reqVO.getMerchantId())
+                .eqIfPresent(TradeOrderDO::getShopId, reqVO.getShopId())
 
                 .inIfPresent(TradeOrderDO::getPickUpStoreId, reqVO.getPickUpStoreIds())
                 .likeIfPresent(TradeOrderDO::getPickUpVerifyCode, reqVO.getPickUpVerifyCode())

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

@@ -117,6 +117,11 @@ public class TradeOrderQueryServiceImpl implements TradeOrderQueryService {
         if (userIds == null) { // 没查询到用户,说明肯定也没他的订单
             return PageResult.empty();
         }
+
+        ShopBO shop = getShop();
+        reqVO.setMerchantId(shop.getMerId());
+        reqVO.setShopId(shop.getShopId());
+
         // 分页查询
         return tradeOrderMapper.selectPage(reqVO, userIds);
     }

+ 1 - 2
feifan-module-sale/feifan-module-sale-biz/src/main/java/cn/newfeifan/mall/sale/controller/admin/shop/ShopController.java

@@ -125,8 +125,7 @@ public class ShopController {
         if (shops.isEmpty()) {
             return success(Collections.emptyList());
         }
-        List<Long> shopIds = shops.stream().map(ShopRespVO::getId).collect(Collectors.toList());
-        List<UserRespVO> userRespVOS = shopService.getAllUser(shopIds);
+        List<UserRespVO> userRespVOS = shopService.getAllUserByMerId(merId);
         return success(userRespVOS);
     }
 

+ 6 - 0
feifan-module-sale/feifan-module-sale-biz/src/main/java/cn/newfeifan/mall/sale/service/shop/ShopService.java

@@ -103,4 +103,10 @@ public interface ShopService {
 
     List<ShopRespVO> getAllShopByUserId(Long loginUserId);
 
+    /**
+     * 获取商户下的所有用户
+     * @param merId 商户编号
+     * @return  用户
+     */
+    List<UserRespVO> getAllUserByMerId(Long merId);
 }

+ 7 - 0
feifan-module-sale/feifan-module-sale-biz/src/main/java/cn/newfeifan/mall/sale/service/shop/ShopServiceImpl.java

@@ -162,4 +162,11 @@ public class ShopServiceImpl implements ShopService {
         return getMerchantAllShop(adminUserDO.getMerchantId());
     }
 
+    @Override
+    public List<UserRespVO> getAllUserByMerId(Long merId) {
+        List<AdminUserDO> userRespVO = userService.getUserByMerId(merId);
+
+        return BeanUtils.toBean(userRespVO, UserRespVO.class);
+    }
+
 }

+ 9 - 0
feifan-module-system/feifan-module-system-biz/src/main/java/cn/newfeifan/mall/module/system/controller/admin/user/UserProfileController.java

@@ -22,6 +22,7 @@ import cn.newfeifan.mall.module.system.service.user.AdminUserService;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import io.swagger.v3.oas.annotations.Operation;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.security.crypto.password.PasswordEncoder;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
@@ -54,6 +55,8 @@ public class UserProfileController {
     private RoleService roleService;
     @Resource
     private SocialUserService socialService;
+    @Resource
+    private PasswordEncoder passwordEncoder;
 
     @GetMapping("/get")
     @Operation(summary = "获得登录用户信息")
@@ -85,6 +88,12 @@ public class UserProfileController {
         userService.updateUserPassword(getLoginUserId(), reqVO);
         return success(true);
     }
+    @PutMapping("/test-pwd")
+    @Operation(summary = "测试pwd的接口-无需调用")
+    public String testPwd(String pwd) {
+        //仅供测试
+        return passwordEncoder.encode(pwd);
+    }
 
     @RequestMapping(value = "/update-avatar",
             method = {RequestMethod.POST, RequestMethod.PUT}) // 解决 uni-app 不支持 Put 上传文件的问题

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

@@ -217,4 +217,5 @@ public interface AdminUserService {
     void createUserByMobile(Long merId, Long shopId, String contactMobile, String contactName);
 
 
+    List<AdminUserDO> getUserByMerId(Long merId);
 }

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

@@ -502,6 +502,11 @@ public class AdminUserServiceImpl implements AdminUserService {
         createUser(build);
     }
 
+    @Override
+    public List<AdminUserDO> getUserByMerId(Long merId) {
+        return userMapper.selectList(new LambdaQueryWrapper<AdminUserDO>().eq(AdminUserDO::getMerchantId, merId));
+    }
+
     /**
      * 对密码进行加密
      *