From 581646569a0273486c742a60961ecd98e60c6773 Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期三, 20 五月 2026 17:08:10 +0800
Subject: [PATCH] 1.处理后台巡游打卡计划多个用户选择 2.优惠券新增字段类型

---
 xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/vo/XpCruiseCheckInRuleListPage.java              |   10 ++++++----
 xp-robotaxi-account-boot/src/main/resources/mapper/account/XpAppUserCouponMapper.xml                                 |    1 +
 xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpCruiseCheckInRuleServiceImpl.java |   12 ++++++------
 xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/model/vo/XpAppUserCouponListVo.java                      |    4 ++++
 4 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/model/vo/XpAppUserCouponListVo.java b/xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/model/vo/XpAppUserCouponListVo.java
index 56da205..99dfc93 100644
--- a/xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/model/vo/XpAppUserCouponListVo.java
+++ b/xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/model/vo/XpAppUserCouponListVo.java
@@ -24,6 +24,10 @@
     @ApiModelProperty(value = "用户id 根据手机号获取")
     private Long appUserId;
 
+
+    @ApiModelProperty(value = "优惠券类型 1-满减 2-折扣 3-抹零")
+    private Integer couponType;
+
     @ApiModelProperty("条件金额")
     private BigDecimal conditionAmount;
 
diff --git a/xp-robotaxi-account-boot/src/main/resources/mapper/account/XpAppUserCouponMapper.xml b/xp-robotaxi-account-boot/src/main/resources/mapper/account/XpAppUserCouponMapper.xml
index 6173e2f..ce318d4 100644
--- a/xp-robotaxi-account-boot/src/main/resources/mapper/account/XpAppUserCouponMapper.xml
+++ b/xp-robotaxi-account-boot/src/main/resources/mapper/account/XpAppUserCouponMapper.xml
@@ -41,6 +41,7 @@
         use_time as useTime,
         create_time as createTime,
         expiration_time as expireTime,
+        coupon_type as couponType,
         case
         when status = 1 and now() >= expiration_time then 3  -- 包含等于的情况
         when status = 1 and expiration_time > now() then 1
diff --git a/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpCruiseCheckInRuleServiceImpl.java b/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpCruiseCheckInRuleServiceImpl.java
index 6f18e7d..cc701b9 100644
--- a/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpCruiseCheckInRuleServiceImpl.java
+++ b/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpCruiseCheckInRuleServiceImpl.java
@@ -72,7 +72,7 @@
     @Override
     public AppXpCruiseCheckInRuleVo getMyXpCruiseCheckInRule(Long uid) {
         List<XpCruiseCheckInRule> list = this.list(new LambdaQueryWrapper<XpCruiseCheckInRule>().eq(XpCruiseCheckInRule::getDeleted, 0)
-                .eq(XpCruiseCheckInRule::getOperationsUserId, uid).last(" and (now() BETWEEN start_time and end_time or cyclic_mode = 1)"));
+                .apply("find_in_set({0}, operations_user_id)", uid).last(" and (now() BETWEEN start_time and end_time or cyclic_mode = 1)"));
         if(list.isEmpty()){
             return null;
         }
@@ -147,7 +147,7 @@
     public Long saveCruiseCheckInRecord(XpCruiseCheckInRecord dto) {
         Long checkLocationId = dto.getCheckLocationId();
         List<XpCruiseCheckInRule> list = this.list(new LambdaQueryWrapper<XpCruiseCheckInRule>().eq(XpCruiseCheckInRule::getDeleted, 0)
-                .eq(XpCruiseCheckInRule::getOperationsUserId, dto.getOperationsUserId()).last(" and (now() BETWEEN start_time and end_time or cyclic_mode = 1)"));
+                .apply("find_in_set({0}, operations_user_id)", dto.getOperationsUserId()).last(" and (now() BETWEEN start_time and end_time or cyclic_mode = 1)"));
         if(list.isEmpty()){
             return null;
         }
@@ -294,10 +294,10 @@
             long count = xpCruiseCheckInRuleLocationService.count(new LambdaQueryWrapper<XpCruiseCheckInRuleLocation>()
                     .eq(XpCruiseCheckInRuleLocation::getCruiseCheckInRuleId, cruiseCheckInRuleListPage.getId()));
             cruiseCheckInRuleListPage.setPointNum(count);
-            XpOperationsUser xpOperationsUser = xpOperationsUserClient.queryById(cruiseCheckInRuleListPage.getOperationsUserId()).getData();
-            cruiseCheckInRuleListPage.setUserName(xpOperationsUser.getNickName());
-            cruiseCheckInRuleListPage.setPhone(xpOperationsUser.getPhoneNumber());
-            cruiseCheckInRuleListPage.setRoleName(xpOperationsUser.getRoleName());
+            List<XpOperationsUser> xpOperationsUser = xpOperationsUserClient.queryByIds(cruiseCheckInRuleListPage.getOperationsUserId()).getData();
+            cruiseCheckInRuleListPage.setUserName(xpOperationsUser.stream().map(XpOperationsUser::getNickName).collect(Collectors.toList()));
+            cruiseCheckInRuleListPage.setPhone(xpOperationsUser.stream().map(XpOperationsUser::getPhoneNumber).collect(Collectors.toList()));
+            cruiseCheckInRuleListPage.setRoleName(xpOperationsUser.stream().map(XpOperationsUser::getRoleName).collect(Collectors.toList()));
         }
         return xpCruiseCheckInRuleListPage;
     }
diff --git a/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/vo/XpCruiseCheckInRuleListPage.java b/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/vo/XpCruiseCheckInRuleListPage.java
index 8c7cdb7..7527b45 100644
--- a/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/vo/XpCruiseCheckInRuleListPage.java
+++ b/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/vo/XpCruiseCheckInRuleListPage.java
@@ -4,6 +4,8 @@
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import java.util.List;
+
 @Data
 @ApiModel
 public class XpCruiseCheckInRuleListPage {
@@ -14,11 +16,11 @@
     @ApiModelProperty("关联点位数量")
     private Long pointNum;
     @ApiModelProperty("执行人员")
-    private String userName;
+    private List<String> userName;
     @ApiModelProperty("手机号")
-    private String phone;
+    private List<String> phone;
     @ApiModelProperty("人员角色")
-    private String roleName;
+    private List<String> roleName;
 
-    private Long operationsUserId;
+    private String operationsUserId;
 }

--
Gitblit v1.7.1