姜永辉 1 год назад
Родитель
Сommit
f17d653c40

+ 9 - 1
src/main/java/com/dk/oauth/mapper/integral/IntegralItemMapper.xml

@@ -58,11 +58,19 @@
             <if test="accDate != null">
                 AND tmii.acc_date = #{accDate}
             </if>
+            <!--开始日期-->
+            <if test="accDateStart != null">
+                AND tmii.acc_date &gt;= #{accDateStart}::timestamp with time zone
+            </if>
+            <!--截止日期-->
+            <if test="accDateEnd != null">
+                AND tmii.acc_date &lt; #{accDateEnd}::timestamp with time zone + interval '1 day'
+            </if>
             <if test="flgValid != null">
                 AND tmii.flg_valid = #{flgValid}
             </if>
             <if test="userId != null and userId != ''">
-                AND tmii.user_id = #{userId}
+                AND tmii.user_id = #{userId}::uuid
             </if>
             <if test="remarks != null and remarks != ''">
                 AND tmii.remarks = #{remarks}

+ 20 - 1
src/main/java/com/dk/oauth/model/query/integral/IntegralItemQuery.java

@@ -10,6 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.experimental.Accessors;
 
+import java.time.LocalDate;
 import java.time.LocalDateTime;
 
 /**
@@ -68,12 +69,30 @@ public class IntegralItemQuery extends PageInfo<IntegralItemQuery>  {
      */
     @Excel(name = "日期")
     @ApiModelProperty(value = "日期")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     @TableField(typeHandler = TimestampTypeHandler.class)
     private LocalDateTime accDate;
 
 
     /**
+     * 开始日期
+     */
+    @ApiModelProperty(value = "开始日期")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDate accDateStart;
+
+    /**
+     * 截止日期
+     */
+    @Excel(name = "截止日期")
+    @ApiModelProperty(value = "账务截止日期")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDate accDateEnd;
+
+
+    /**
      * 有效标识 (1:正常 0:停用)
      */
     @Excel(name = "有效标识 (1:正常 0:停用)")

+ 3 - 2
src/main/java/com/dk/oauth/model/response/integral/IntegralItemResponse.java

@@ -17,6 +17,7 @@ import lombok.NoArgsConstructor;
 import lombok.experimental.Accessors;
 
 import java.io.Serializable;
+import java.time.LocalDate;
 import java.time.LocalDateTime;
 
 /**
@@ -77,9 +78,9 @@ public class IntegralItemResponse{
      */
     @Excel(name = "日期")
     @ApiModelProperty(value = "日期")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     @TableField(typeHandler = TimestampTypeHandler.class)
-    private LocalDateTime accDate;
+    private LocalDate accDate;
 
 
     /**