列表查询接口添加删除状态过滤条件isDelete,默认查询未删除数据

topo_dev
DESKTOP-DDTUS3E\yaxin 9 months ago
parent c45b374f7a
commit 628461c058

@ -38,6 +38,9 @@ public class ModelCaseVO {
@Schema(description = "当事人")
private String lawParty;
@Schema(description = "删除状态,默认查询未删除数据")
private Boolean isDelete = false;
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private LocalDateTime updateStartTime;

@ -3,10 +3,16 @@
<mapper namespace="com.supervision.police.mapper.ModelCaseMapper">
<select id="selectAll" resultType="com.supervision.police.domain.ModelCase">
select * from model_case
where data_status = '1'
where 1=1
<if test="modelCase.id != null and modelCase.id != ''">
and id = #{modelCase.id}
</if>
<if test="modelCase.isDelete">
and data_status != '1'
</if>
<if test="!modelCase.isDelete">
and data_status = '1'
</if>
<if test="modelCase.caseNo != null and modelCase.caseNo != ''">
and case_no like concat('%', #{modelCase.caseNo}, '%')
</if>

Loading…
Cancel
Save