tlias管理系统-员工分页条件查询实现功能实现

This commit is contained in:
2025-10-11 12:02:44 +08:00
parent 1298e154a5
commit 7b98564143
5 changed files with 42 additions and 10 deletions

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.inmind.mapper.EmpMapper">
<select id="list" resultType="com.inmind.pojo.Emp">
select * from emp
<where>
<if test="name != null and name != '' ">
name like concat('%',#{name},'%')
</if>
<if test="gender != null">
and gender = #{gender}
</if>
<if test="begin != null and end != null">
and entrydate between #{begin} and #{end}
</if>
</where>
order by update_time desc
</select>
</mapper>