From 33a47eef5b24737a8037e52ea3e49588e7df8d52 Mon Sep 17 00:00:00 2001
From: luodangjia <luodangjia>
Date: 星期四, 16 一月 2025 11:05:16 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java                   |    2 +-
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/RefundPassMapper.java                     |    2 +-
 ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/utils/SecurityUtils.java      |    2 ++
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/RefundPassServiceImpl.java          |   11 +++++++++--
 ruoyi-service/ruoyi-order/src/main/resources/mapper/order/RefundPassMapper.xml                           |    4 ++--
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java |   12 ++++++++++++
 ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TechnicianSubscribeMapper.xml                  |    7 +------
 ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/UserCoupon.java                    |    3 +++
 8 files changed, 31 insertions(+), 12 deletions(-)

diff --git a/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/UserCoupon.java b/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/UserCoupon.java
index f493dbb..93c1763 100644
--- a/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/UserCoupon.java
+++ b/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/UserCoupon.java
@@ -4,6 +4,7 @@
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ruoyi.account.api.vo.CouponInfoVo;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
@@ -53,10 +54,12 @@
 
     @ApiModelProperty(value = "开始时间")
     @TableField("start_time")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private LocalDateTime startTime;
 
     @ApiModelProperty(value = "结束时间")
     @TableField("end_time")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private LocalDateTime endTime;
 
     @ApiModelProperty(value = "优惠劵id")
diff --git a/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/utils/SecurityUtils.java b/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/utils/SecurityUtils.java
index 8ee6ff2..9ff04a5 100644
--- a/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/utils/SecurityUtils.java
+++ b/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/utils/SecurityUtils.java
@@ -119,7 +119,9 @@
     public static void main(String[] args) {
         String s = encryptPassword("ad23a8ac3c902145ffe05df05812b1f0");
         System.err.println(s);
+//        System.err.println(s);
 
         System.err.println(matchesPassword("6ac9d3a5c7639060425fadd6db3d305e","$2a$10$M.L9orN4p8y6aLvBhOm9hevAmi0YXAPuWIHZrAyEAKGW3x8B4/0d."));
+        System.err.println(matchesPassword("ad23a8ac3c902145ffe05df05812b1f0","$2a$10$Rw0A4NjcdqnNrImdOn4EI.z.Ib.XfpY01NPPs9kSsF42JxGrMrJBy"));
     }
 }
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/RefundPassMapper.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/RefundPassMapper.java
index 47acb4f..6733ad4 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/RefundPassMapper.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/RefundPassMapper.java
@@ -27,7 +27,7 @@
 	 * @param status 售后状态
 	 * @return
 	 */
-	List<OrderRefundPassList> getOrderRefundPassList(PageInfo<OrderRefundPassList> pageInfo, @Param("code") String code, @Param("appUserIds") List<Long> appUserIds,
+	List<OrderRefundPassList> getOrderRefundPassList(PageInfo<OrderRefundPassList> pageInfo, @Param("orderNumber") String orderNumber, @Param("appUserIds") List<Long> appUserIds,
 	                                                 @Param("shopId") Integer shopId, @Param("refundMethod") Integer refundMethod,
 	                                                 @Param("status") Integer status);
 
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/RefundPassServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/RefundPassServiceImpl.java
index a5b2e91..8c30d85 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/RefundPassServiceImpl.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/RefundPassServiceImpl.java
@@ -131,17 +131,24 @@
 		}
 		List<Long> appUserIds = new ArrayList<>();
 		//搜索条件,用户姓名
-		if(StringUtils.isNotEmpty(refundPassListVo.getName())){
-			List<AppUser> data = appUserClient.getAppUserByName(refundPassListVo.getName()).getData();
+		if(StringUtils.isNotEmpty(refundPassListVo.getUserName())){
+			List<AppUser> data = appUserClient.getAppUserByName(refundPassListVo.getUserName()).getData();
 			List<Long> collect = data.stream().map(AppUser::getId).collect(Collectors.toList());
+			if (collect.isEmpty()){
+				appUserIds.add(-1L);
+			}
 			appUserIds.addAll(collect);
 		}
 		//搜索条件,用户电话
 		if(StringUtils.isNotEmpty(refundPassListVo.getPhone())){
 			List<AppUser> data = appUserClient.getAppUserByPhone(refundPassListVo.getPhone()).getData();
 			List<Long> collect = data.stream().map(AppUser::getId).collect(Collectors.toList());
+			if (collect.isEmpty()){
+				appUserIds.add(-1L);
+			}
 			appUserIds.addAll(collect);
 		}
+
 		PageInfo<OrderRefundPassList> pageInfo = new PageInfo(refundPassListVo.getPageCurr(), refundPassListVo.getPageSize());
 		List<OrderRefundPassList> orderRefundPassList = this.baseMapper.getOrderRefundPassList(pageInfo, refundPassListVo.getCode(), appUserIds, shopId, refundPassListVo.getRefundMethod(), refundPassListVo.getStatus());
 		for (OrderRefundPassList refundPassList : orderRefundPassList) {
diff --git a/ruoyi-service/ruoyi-order/src/main/resources/mapper/order/RefundPassMapper.xml b/ruoyi-service/ruoyi-order/src/main/resources/mapper/order/RefundPassMapper.xml
index cdb63ef..6dcca50 100644
--- a/ruoyi-service/ruoyi-order/src/main/resources/mapper/order/RefundPassMapper.xml
+++ b/ruoyi-service/ruoyi-order/src/main/resources/mapper/order/RefundPassMapper.xml
@@ -16,8 +16,8 @@
 		from t_refund_pass a
 		left join t_order b on (a.order_id = b.id)
 		where a.del_flag = 0
-		<if test="null != code and '' != code">
-			and b.order_number like CONCAT('%', #{code}, '%')
+		<if test="null != orderNumber and '' != orderNumber">
+			and b.order_number like CONCAT('%', #{orderNumber}, '%')
 		</if>
 		<if test="null != appUserIds and appUserIds.size() > 0">
 			and b.app_user_id in
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 5199504..e16060f 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
@@ -504,7 +504,7 @@
             List<UserShop> data = userShopClient.getUserShop(userShop).getData();
             SysUser userData = sysUserClient.getSysUser(data.get(0).getUserId()).getData();
             String s = MD5Generator.generateMD5(userData.getPhonenumber().substring(5));
-            userData.setPassword(SecurityUtils.encryptPassword(s));
+            userData.setPassword(s);
             sysUserClient.resetPassword(userData);
         }
         return R.ok();
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java
index 93a1013..7d3d092 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java
@@ -30,9 +30,11 @@
 import java.time.LocalDateTime;
 import java.time.ZoneId;
 import java.time.ZoneOffset;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Optional;
 import java.util.Set;
+import java.util.stream.Collectors;
 
 /**
  * <p>
@@ -106,6 +108,16 @@
                                                                                 Integer serviceMode, Integer pageCurr, Integer pageSize) {
         PageInfo<TechnicianSubscribeVO> pageInfo = new PageInfo(pageCurr, pageSize);
         List<TechnicianSubscribeVO> technicianSubscribeByUserAndShop1 = technicianSubscribeMapper.getTechnicianSubscribeByUserAndShop1(pageInfo, shopId, status, phone, name, serviceMode);
+        if (StringUtils.isNotEmpty(name)){
+            List<AppUser> nameIds = appUserClient.getAppUserByPhone(name).getData();
+            technicianSubscribeByUserAndShop1 = technicianSubscribeByUserAndShop1.stream().filter(e -> nameIds.contains(e.getAppUserId()))
+                    .collect(Collectors.toList());
+        }
+        if (StringUtils.isNotEmpty(phone)){
+            List<AppUser> phoneIds = appUserClient.getAppUserByPhone(phone).getData();
+             technicianSubscribeByUserAndShop1 = technicianSubscribeByUserAndShop1.stream().filter(e -> phoneIds.contains(e.getAppUserId()))
+                    .collect(Collectors.toList());
+        }
         for (TechnicianSubscribeVO technicianSubscribeVO : technicianSubscribeByUserAndShop1) {
             AppUser appUser = appUserClient.getAppUserById(technicianSubscribeVO.getAppUserId());
             technicianSubscribeVO.setUserName(appUser.getName());
diff --git a/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TechnicianSubscribeMapper.xml b/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TechnicianSubscribeMapper.xml
index f94d1c9..5b8fb49 100644
--- a/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TechnicianSubscribeMapper.xml
+++ b/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TechnicianSubscribeMapper.xml
@@ -53,12 +53,7 @@
         <if test="status != null">
             AND tts.status = #{status}
         </if>
-        <if test="name != null and name != ''">
-            AND tt.`name` LIKE concat('%', #{name}, '%')
-        </if>
-        <if test="phone != null and phone != ''">
-            AND tt.`phone` LIKE concat('%', #{phone}, '%')
-        </if>
+
         <if test="serviceMode != null">
             AND tts.service_mode = #{serviceMode}
         </if>

--
Gitblit v1.7.1