tlias管理系统-员工分页条件查询实现功能实现
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user