Переглянути джерело

Merge branch 'dev_v1.3.4_20220902'

liujunchi 3 роки тому
батько
коміт
5f4190796f

+ 11 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/queryInfo/CouponIssueQueryInfo.java

@@ -66,9 +66,20 @@ public class CouponIssueQueryInfo implements Serializable {
     // 可用品类
     private List<CouponCategoryEnum> couponCategoryList;
 
+    // 是否订单使用
+    private Integer orderUse;
+
     // 过期时间
     private Long expiredTime = DateTime.now().getMillis();
 
+    public Integer getOrderUse() {
+        return orderUse;
+    }
+
+    public void setOrderUse(Integer orderUse) {
+        this.orderUse = orderUse;
+    }
+
     public BigDecimal getAmount() {
         return amount;
     }

+ 5 - 2
cooleshow-user/user-biz/src/main/resources/config/mybatis/CouponIssueMapper.xml

@@ -86,7 +86,10 @@
                         and ci.end_time_ &lt; #{query.expiredTime} and ci.use_state_  = 'USABLE'
                     </when>
                     <when test="query.useState.code == 'USABLE'">
-                        and ci.end_time_ &gt;= #{query.expiredTime} and ci.start_time_ &lt;= #{query.expiredTime} and ci.use_state_ = 'USABLE'
+                        and ci.end_time_ &gt;= #{query.expiredTime} and ci.use_state_ = 'USABLE'
+                        <if test="query.orderUse != null and query.orderUse == 1">
+                            and ci.start_time_ &lt;= #{query.expiredTime}
+                        </if>
                     </when>
                     <otherwise>
                         and ci.use_state_ = #{query.useState}
@@ -139,7 +142,7 @@
             <if test="record.timestamp != null">
                 <choose>
                     <when test="record.userState.code == 'USABLE'">
-                        AND t1.start_time_ &lt;= #{record.timestamp} AND #{record.timestamp} &lt;= t1.end_time_ AND t1.use_state_ = 'USABLE'
+                        AND #{record.timestamp} &lt;= t1.end_time_ AND t1.use_state_ = 'USABLE'
                     </when>
                     <when test="record.userState.code == 'EXPIRED'">
                         AND #{record.timestamp} &gt;= t1.end_time_ AND t1.use_state_ = 'USABLE'

+ 3 - 0
cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/io/request/CouponInfoVO.java

@@ -50,6 +50,9 @@ public class CouponInfoVO {
         @ApiModelProperty("订单金额")
         private BigDecimal amount;
 
+        @ApiModelProperty("是否订单使用,0:否 1:是")
+        private Integer orderUse;
+
         // 可用品类
         @ApiModelProperty(hidden = true)
         private List<CouponCategoryEnum> couponCategoryList;