```sql修改财务付款查询条件以支持开始和完成时间筛选在财务付款的查询映射器XML中,查询条件已更新,以支持根据开始时间和完成时间进行筛选。此更改替换了先前的创建时间筛选条件,并引入了新的结束时间参数。

同时,对应的请求VO类也进行了调整,以包含新的开始时间和完成时间字段,从而允许前端用户根据这些参数进行查询。

BREAKING CHANGE: 对于依赖于旧的createTime字段的客户端,需要更新其代码以适应新的beginTime和endTime字段。
```
This commit is contained in:
aikai 2024-08-20 11:30:58 +08:00
parent 6df2a2aba1
commit c2dfbdc508
2 changed files with 19 additions and 7 deletions

View File

@ -42,8 +42,12 @@ public class FinancialPaymentPageReqVO extends PageParam {
@Schema(description = "当前登陆用户id(领取人) 前端不用传")
private Long receiveUserId;
@Schema(description = "创建时间")
@Schema(description = "开始时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
private LocalDateTime[] beginTime;
@Schema(description = "完成时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] endTime;
}

View File

@ -54,12 +54,20 @@
and a.receive_user_id != #{vo.receiveUserId}
</if>
</if>
<if test="vo.createTime != null and vo.createTime.length > 0">
<if test="vo.createTime[0] != null">
and a.create_time &gt;= #{vo.createTime[0]}
<if test="vo.beginTime != null and vo.beginTime.length > 0">
<if test="vo.beginTime[0] != null">
and a.begin_time &gt;= #{vo.beginTime[0]}
</if>
<if test="vo.createTime[1] != null">
and a.create_time &lt;= #{vo.createTime[1]}
<if test="vo.beginTime[1] != null">
and a.begin_time &lt;= #{vo.beginTime[1]}
</if>
</if>
<if test="vo.endTime != null and vo.endTime.length > 0">
<if test="vo.endTime[0] != null">
and a.end_time &gt;= #{vo.endTime[0]}
</if>
<if test="vo.endTime[1] != null">
and a.end_time &lt;= #{vo.endTime[1]}
</if>
</if>
</where>