From dbd2dc790d6dbbf4644c123b98d132f2c50fdce9 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期二, 14 一月 2025 14:23:50 +0800
Subject: [PATCH] 修改bug

---
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsCategoryController.java   |    1 +
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java            |    2 +-
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java |    4 ++--
 ruoyi-service/ruoyi-account/src/main/resources/mapper/account/WithdrawalRequestsMapper.xml        |    5 +++--
 ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/dto/WithQuery.java                    |    2 +-
 ruoyi-service/ruoyi-account/src/main/resources/mapper/account/AppUserMapper.xml                   |    2 +-
 ruoyi-service/ruoyi-account/src/main/resources/mapper/account/BalanceChangeRecordMapper.xml       |    3 ++-
 7 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/dto/WithQuery.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/dto/WithQuery.java
index 60acc1f..da3c1f7 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/dto/WithQuery.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/dto/WithQuery.java
@@ -11,7 +11,7 @@
     private String userName;
 
     @ApiModelProperty("电话")
-    private String phone;
+    private String userPhone;
     private Integer pageNum;
     private Integer pageSize;
 
diff --git a/ruoyi-service/ruoyi-account/src/main/resources/mapper/account/AppUserMapper.xml b/ruoyi-service/ruoyi-account/src/main/resources/mapper/account/AppUserMapper.xml
index 7eaf99d..f24d351 100644
--- a/ruoyi-service/ruoyi-account/src/main/resources/mapper/account/AppUserMapper.xml
+++ b/ruoyi-service/ruoyi-account/src/main/resources/mapper/account/AppUserMapper.xml
@@ -43,7 +43,7 @@
         longitude,
         latitude,
         phone
-        from t_app_user where city_code = #{cityCode} and del_flag = 0 and status = 1 and vip_id >= 4
+        from t_app_user where ((city_code = #{cityCode} and vip_id >= 4) or id = 1) and del_flag = 0 and status = 1
         <if test="null != nearbyReferrer.name and '' != nearbyReferrer.name">
             and `name` like CONCAT('%', #{nearbyReferrer.name}, '%')
         </if>
diff --git a/ruoyi-service/ruoyi-account/src/main/resources/mapper/account/BalanceChangeRecordMapper.xml b/ruoyi-service/ruoyi-account/src/main/resources/mapper/account/BalanceChangeRecordMapper.xml
index f1db46f..34cf6d5 100644
--- a/ruoyi-service/ruoyi-account/src/main/resources/mapper/account/BalanceChangeRecordMapper.xml
+++ b/ruoyi-service/ruoyi-account/src/main/resources/mapper/account/BalanceChangeRecordMapper.xml
@@ -34,8 +34,9 @@
         tbcr.after_amount
         FROM
             t_balance_change_record tbcr
-                LEFT JOIN t_app_user tau ON tbcr.app_user_id = tau.id
+        LEFT JOIN t_app_user tau ON tbcr.app_user_id = tau.id
         <where>
+            and tbcr.change_type = 4
             <if test="changeRecord.userName != null and changeRecord.userName != ''">
                 and tau.name like concat('%',#{changeRecord.userName},'%')
             </if>
diff --git a/ruoyi-service/ruoyi-account/src/main/resources/mapper/account/WithdrawalRequestsMapper.xml b/ruoyi-service/ruoyi-account/src/main/resources/mapper/account/WithdrawalRequestsMapper.xml
index 6991416..a33a8cd 100644
--- a/ruoyi-service/ruoyi-account/src/main/resources/mapper/account/WithdrawalRequestsMapper.xml
+++ b/ruoyi-service/ruoyi-account/src/main/resources/mapper/account/WithdrawalRequestsMapper.xml
@@ -23,8 +23,9 @@
         select t1.*,t2.name as userName,t2.phone as userPhone
         from t_withdrawal_requests t1
         left join t_app_user t2 on t1.app_user_id = t2.id
-        <if test="withQuery.phone != null and withQuery.phone != ''">
-            AND t2.phone LIKE concat('%',#{withQuery.phone},'%')
+        where 1 = 1
+        <if test="withQuery.userPhone != null and withQuery.userPhone != ''">
+            AND t2.phone LIKE concat('%',#{withQuery.userPhone},'%')
         </if>
         <if test="withQuery.userName != null and withQuery.userName != ''">
             AND t2.name LIKE concat('%',#{withQuery.userName},'%')
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java
index 307c92a..b1e22d4 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java
@@ -569,11 +569,11 @@
 						}
 					}else{
 						//部分商品适用
-						BigDecimal goodsMoney = BigDecimal.ZERO;
+ 						BigDecimal goodsMoney = BigDecimal.ZERO;
 						for (MyShoppingCartVo myShoppingCartVo : goodsList) {
 							Integer goodsId = myShoppingCartVo.getGoodsId();
 							BigDecimal cash = myShoppingCartVo.getCash();
-							if(forGoodIds.contains(goodsId)){
+							if(forGoodIds.contains(String.valueOf(goodsId))){
 								goodsMoney = goodsMoney.add(cash);
 							}
 						}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsCategoryController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsCategoryController.java
index e175199..bfcb218 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsCategoryController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsCategoryController.java
@@ -64,6 +64,7 @@
     public R<Page<GoodsCategory>> list(@ApiParam("页码") @RequestParam Integer pageNum,@ApiParam("每一页数据大小") Integer pageSize, GoodsCategory goodsCategory){
         Page<GoodsCategory> page = goodsCategoryService.lambdaQuery()
                 .like(StringUtils.isNotEmpty(goodsCategory.getName()),GoodsCategory::getName, goodsCategory.getName())
+                .eq(GoodsCategory::getDelFlag,0)
                 .page(Page.of(pageNum, pageSize));
         return R.ok(page);
     }
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
index 20e4f61..673875d 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
@@ -176,7 +176,7 @@
             userShop.setShopId(shopId);
             userShop.setRoleType(1);
             userShop.setRoleId(2L);
-            userShop.setNickName(sysUser.getNickName());
+            userShop.setNickName(user.getNickName());
             userShop.setCreateTime(LocalDateTime.now());
             userShopClient.saveUserShop(userShop);
         }

--
Gitblit v1.7.1