From 9767770dfabddd7ebc57c8d323af566b9655fa3e Mon Sep 17 00:00:00 2001
From: gongzuming <gongzuming>
Date: 星期二, 10 九月 2024 16:42:30 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master-v2' into master-v2

---
 src/main/java/com/mzl/flower/dto/request/coupon/CreateCouponTemplateUserDTO.java   |    4 ++++
 src/main/java/com/mzl/flower/dto/request/coupon/CreateCouponTemplateVipDTO.java    |    4 ++++
 src/main/java/com/mzl/flower/dto/request/payment/DeliveryOrderInfoSpQueryDTO.java  |    4 ++++
 src/main/java/com/mzl/flower/dto/request/coupon/CreateCouponTemplatePointDTO.java  |    6 ++++++
 src/main/java/com/mzl/flower/dto/request/coupon/CreateCouponTemplateActivyDTO.java |    5 +++++
 src/main/java/com/mzl/flower/dto/request/payment/DeliveryOrderStationQueryDTO.java |    4 ++++
 src/main/java/com/mzl/flower/service/payment/DeliveryOrderService.java             |    2 ++
 src/main/resources/mapper/payment/DeliveryOrderMapper.xml                          |   16 ++++++++++++----
 src/main/resources/mapper/coupon/CouponTemplateMapperCustom.xml                    |    7 +++++--
 9 files changed, 46 insertions(+), 6 deletions(-)

diff --git a/src/main/java/com/mzl/flower/dto/request/coupon/CreateCouponTemplateActivyDTO.java b/src/main/java/com/mzl/flower/dto/request/coupon/CreateCouponTemplateActivyDTO.java
index 316ead0..e2dd62a 100644
--- a/src/main/java/com/mzl/flower/dto/request/coupon/CreateCouponTemplateActivyDTO.java
+++ b/src/main/java/com/mzl/flower/dto/request/coupon/CreateCouponTemplateActivyDTO.java
@@ -6,6 +6,7 @@
 import lombok.Data;
 import org.springframework.format.annotation.DateTimeFormat;
 
+import javax.validation.constraints.Max;
 import javax.validation.constraints.Min;
 import javax.validation.constraints.NotEmpty;
 import javax.validation.constraints.NotNull;
@@ -85,6 +86,8 @@
      * 领取后有效时间整数,比如90(天,小时,分钟)
      */
     @ApiModelProperty(value = "领取后有效时间整数")
+    @Min(value = 1,message = "领取后有效时间必须大于等于1")
+    @Max(value = 99999999,message = "领取后有效时间不能超过99999999")
     private Integer usageTimeNum;
 
 
@@ -127,6 +130,7 @@
     @ApiModelProperty(value = "发放数量")
     @NotNull(message = "发放数量不能为空")
     @Min(value = 1,message = "发放数量必须大于0")
+    @Max(value = 99999999,message = "库存数量不能超过99999999")
     private Integer couponAmount;
 
 
@@ -136,6 +140,7 @@
     @ApiModelProperty(value = "每人限领")
     @NotNull(message = "每人限领不能为空")
     @Min(value = 1,message = "每人限领必须大于0")
+    @Max(value = 99999999,message = "每人限领不能超过99999999")
     private Integer getLimit;
 
 
diff --git a/src/main/java/com/mzl/flower/dto/request/coupon/CreateCouponTemplatePointDTO.java b/src/main/java/com/mzl/flower/dto/request/coupon/CreateCouponTemplatePointDTO.java
index 94472c3..436ce5c 100644
--- a/src/main/java/com/mzl/flower/dto/request/coupon/CreateCouponTemplatePointDTO.java
+++ b/src/main/java/com/mzl/flower/dto/request/coupon/CreateCouponTemplatePointDTO.java
@@ -4,6 +4,7 @@
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import javax.validation.constraints.Max;
 import javax.validation.constraints.Min;
 import javax.validation.constraints.NotEmpty;
 import javax.validation.constraints.NotNull;
@@ -54,6 +55,7 @@
     @ApiModelProperty(value ="领取后有效时间整数,比如90(天,小时,分钟)" )
     @NotNull(message = "领取后有效时间不能为空")
     @Min(value = 1,message = "领取后有效时间必须大于等于1")
+    @Max(value = 99999999,message = "领取后有效时间不能超过99999999")
     private Integer usageTimeNum;
 
     /**
@@ -61,6 +63,7 @@
      */
     @ApiModelProperty(value = "使用条件")
     @NotNull(message = "使用条件不能为空")
+    @Max(value = 99999999,message = "使用条件不能超过99999999")
     private BigDecimal minOrderAmount;
 
     /**
@@ -69,6 +72,7 @@
     @ApiModelProperty(value = "优惠券面值")
     @NotNull(message = "优惠券面值不能为空")
     @Min(value = 1,message = "优惠券面值大于0")
+    @Max(value = 99999999,message = "优惠券面值不能超过99999999")
     private BigDecimal couponDiscountValue;
 
     /**
@@ -77,12 +81,14 @@
     @ApiModelProperty(value = "库存")
     @NotNull(message = "库存不能为空")
     @Min(value = 1,message = "库存数量必须大于0")
+    @Max(value = 99999999,message = "库存数量不能超过99999999")
     private Integer couponAmount;
 
 
     @ApiModelProperty(value = "积分数量")
     @NotNull(message = "积分数量不能为空")
     @Min(value = 1,message = "积分数量必须大于0")
+    @Max(value = 99999999,message = "积分数量不能超过99999999")
     private Integer point;
 
 
diff --git a/src/main/java/com/mzl/flower/dto/request/coupon/CreateCouponTemplateUserDTO.java b/src/main/java/com/mzl/flower/dto/request/coupon/CreateCouponTemplateUserDTO.java
index 5d34ca0..1af6f04 100644
--- a/src/main/java/com/mzl/flower/dto/request/coupon/CreateCouponTemplateUserDTO.java
+++ b/src/main/java/com/mzl/flower/dto/request/coupon/CreateCouponTemplateUserDTO.java
@@ -4,6 +4,7 @@
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import javax.validation.constraints.Max;
 import javax.validation.constraints.Min;
 import javax.validation.constraints.NotEmpty;
 import javax.validation.constraints.NotNull;
@@ -52,6 +53,7 @@
     @ApiModelProperty(value ="领取后有效时间整数,比如90(天,小时,分钟)" )
     @NotNull(message = "领取后有效时间不能为空")
     @Min(value = 1,message = "领取后有效时间必须大于0")
+    @Max(value = 99999999,message = "领取后有效时间不能超过99999999")
     private Integer usageTimeNum;
 
     /**
@@ -59,6 +61,7 @@
      */
     @ApiModelProperty(value = "使用条件")
     @NotNull(message = "使用条件不能为空")
+    @Max(value = 99999999,message = "使用条件不能超过99999999")
     private BigDecimal minOrderAmount;
 
     /**
@@ -67,6 +70,7 @@
     @ApiModelProperty(value = "优惠券面值")
     @NotNull(message = "优惠券面值不能为空")
     @Min(value = 1,message = "优惠券面值大于0")
+    @Max(value = 99999999,message = "优惠券面值不能超过99999999")
     private BigDecimal couponDiscountValue;
 
 
diff --git a/src/main/java/com/mzl/flower/dto/request/coupon/CreateCouponTemplateVipDTO.java b/src/main/java/com/mzl/flower/dto/request/coupon/CreateCouponTemplateVipDTO.java
index a87686a..c06c539 100644
--- a/src/main/java/com/mzl/flower/dto/request/coupon/CreateCouponTemplateVipDTO.java
+++ b/src/main/java/com/mzl/flower/dto/request/coupon/CreateCouponTemplateVipDTO.java
@@ -4,6 +4,7 @@
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import javax.validation.constraints.Max;
 import javax.validation.constraints.NotEmpty;
 import javax.validation.constraints.NotNull;
 import java.math.BigDecimal;
@@ -41,6 +42,7 @@
      */
     @ApiModelProperty(value = "优惠券面值")
     @NotNull(message = "优惠券面值不能为空")
+    @Max(value = 99999999,message = "优惠券面值不能超过99999999")
     private BigDecimal couponDiscountValue;
 
     /**
@@ -48,6 +50,7 @@
      */
     @ApiModelProperty(value = "使用条件")
     @NotNull(message = "使用条件不能为空")
+    @Max(value = 99999999,message = "使用条件不能超过99999999")
     private BigDecimal minOrderAmount;
 
 
@@ -68,6 +71,7 @@
      * 领取后有效时间整数,比如90(天,小时,分钟)
      */
     @ApiModelProperty(value = "领取后有效时间整数")
+    @Max(value = 99999999,message = "领取后有效时间不能超过99999999")
     private Integer usageTimeNum;
 
 
diff --git a/src/main/java/com/mzl/flower/dto/request/payment/DeliveryOrderInfoSpQueryDTO.java b/src/main/java/com/mzl/flower/dto/request/payment/DeliveryOrderInfoSpQueryDTO.java
index 0ec361d..aeee9a5 100644
--- a/src/main/java/com/mzl/flower/dto/request/payment/DeliveryOrderInfoSpQueryDTO.java
+++ b/src/main/java/com/mzl/flower/dto/request/payment/DeliveryOrderInfoSpQueryDTO.java
@@ -4,6 +4,7 @@
 import lombok.Data;
 
 import java.time.LocalDateTime;
+import java.util.List;
 
 @Data
 public class DeliveryOrderInfoSpQueryDTO {
@@ -36,4 +37,7 @@
 
     @ApiModelProperty(hidden = true)
     private LocalDateTime endDate;
+
+    @ApiModelProperty(hidden = true)
+    private List<String> statusList;
 }
diff --git a/src/main/java/com/mzl/flower/dto/request/payment/DeliveryOrderStationQueryDTO.java b/src/main/java/com/mzl/flower/dto/request/payment/DeliveryOrderStationQueryDTO.java
index 842e30f..19217da 100644
--- a/src/main/java/com/mzl/flower/dto/request/payment/DeliveryOrderStationQueryDTO.java
+++ b/src/main/java/com/mzl/flower/dto/request/payment/DeliveryOrderStationQueryDTO.java
@@ -4,6 +4,7 @@
 import lombok.Data;
 
 import java.time.LocalDateTime;
+import java.util.List;
 
 @Data
 public class DeliveryOrderStationQueryDTO {
@@ -42,4 +43,7 @@
 
     @ApiModelProperty(hidden = true)
     private LocalDateTime endDate;
+
+    @ApiModelProperty(hidden = true)
+    private List<String> statusList;
 }
diff --git a/src/main/java/com/mzl/flower/service/payment/DeliveryOrderService.java b/src/main/java/com/mzl/flower/service/payment/DeliveryOrderService.java
index ecac9e4..92f7400 100644
--- a/src/main/java/com/mzl/flower/service/payment/DeliveryOrderService.java
+++ b/src/main/java/com/mzl/flower/service/payment/DeliveryOrderService.java
@@ -463,6 +463,7 @@
 
     //////////////////////////////////////////////////////////////新接口
     public Page<DeliveryOrderList4CheckDTO> selectSupplierDoList4Check(Page page, DeliveryOrderStationQueryDTO dto) {
+        dto.setStatusList(splitParam(dto.getStatus()));
         List<DeliveryOrderList4CheckDTO> ls = deliveryOrderMapper.selectSupplierDoList4Check(page, dto);
 
         page.setRecords(ls);
@@ -473,6 +474,7 @@
         if(dto.getSupplierId() == null){
             throw new ValidationException("供应商id不能为空");
         }
+        dto.setStatusList(splitParam(dto.getStatus()));
         List<DeliveryOrder4CheckDTO> ls = deliveryOrderMapper.selectSupplierDoInfo4Check(page, dto);
 
         if(ls != null && ls.size() > 0){
diff --git a/src/main/resources/mapper/coupon/CouponTemplateMapperCustom.xml b/src/main/resources/mapper/coupon/CouponTemplateMapperCustom.xml
index 66f2f6f..618568f 100644
--- a/src/main/resources/mapper/coupon/CouponTemplateMapperCustom.xml
+++ b/src/main/resources/mapper/coupon/CouponTemplateMapperCustom.xml
@@ -76,8 +76,11 @@
         SELECT *
         FROM t_coupon_template t
         WHERE t.deleted = FALSE
-        AND t.get_start_date &lt;= NOW()
-        AND NOW() &lt;= t.get_end_date
+        <if test="param.category != null and param.category != '' and param.category == 'activity' ">
+            AND t.get_start_date &lt;= NOW()
+            AND NOW() &lt;= t.get_end_date
+        </if>
+
         <if test="param.category != null and param.category != ''">
             AND category =  #{param.category}
         </if>
diff --git a/src/main/resources/mapper/payment/DeliveryOrderMapper.xml b/src/main/resources/mapper/payment/DeliveryOrderMapper.xml
index 93e2eaf..34f3909 100644
--- a/src/main/resources/mapper/payment/DeliveryOrderMapper.xml
+++ b/src/main/resources/mapper/payment/DeliveryOrderMapper.xml
@@ -101,8 +101,12 @@
         <if test="condition.orderNo != null and condition.orderNo != ''">
             AND q.order_no LIKE concat('%', #{condition.orderNo},'%')
         </if>
-        <if test="condition.status != null and condition.status != ''">
-            AND q.status = #{condition.status}
+
+        <if test="condition.statusList != null and condition.statusList.size > 0">
+            AND q.status in
+            <foreach collection="condition.statusList" item="status" open="(" separator="," close=")">
+                #{status}
+            </foreach>
         </if>
 
         <if test="condition.supplierId != null">
@@ -151,8 +155,12 @@
         <if test="condition.orderNo != null and condition.orderNo != ''">
             AND q.order_no LIKE concat('%', #{condition.orderNo},'%')
         </if>
-        <if test="condition.status != null and condition.status != ''">
-            AND q.status = #{condition.status}
+
+        <if test="condition.statusList != null and condition.statusList.size > 0">
+            AND q.status in
+            <foreach collection="condition.statusList" item="status" open="(" separator="," close=")">
+                #{status}
+            </foreach>
         </if>
 
         <if test="condition.warehouseId != null">

--
Gitblit v1.9.3