37 lines
1.5 KiB
XML
37 lines
1.5 KiB
XML
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||
|
<mapper namespace="com.dite.znpt.mapper.PersonnelMapper">
|
||
|
|
||
|
<sql id="Base_Column_List">
|
||
|
a.person_id, a.name, a.role_type, a.company_id,
|
||
|
a.password
|
||
|
</sql>
|
||
|
|
||
|
<select id="queryBySelective" resultType="com.dite.znpt.domain.vo.PersonnelResp">
|
||
|
select
|
||
|
<include refid="Base_Column_List"/>
|
||
|
from personnel a
|
||
|
<where>
|
||
|
<if test="keyword != null and keyword != ''">
|
||
|
# and (a.TODO like concat('%', #{keyword,jdbcType=VARCHAR}, '%') or a.TODO like concat('%', #{keyword,jdbcType=VARCHAR}, '%'))
|
||
|
</if>
|
||
|
<if test="personId != null and personId != ''">
|
||
|
and a.person_id like concat ('%', #{personId}, '%')
|
||
|
</if>
|
||
|
<if test="name != null and name != ''">
|
||
|
and a.name like concat ('%', #{name}, '%')
|
||
|
</if>
|
||
|
<if test="roleType != null and roleType != ''">
|
||
|
and a.role_type like concat ('%', #{roleType}, '%')
|
||
|
</if>
|
||
|
<if test="companyId != null and companyId != ''">
|
||
|
and a.company_id like concat ('%', #{companyId}, '%')
|
||
|
</if>
|
||
|
<if test="password != null and password != ''">
|
||
|
and a.password like concat ('%', #{password}, '%')
|
||
|
</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
</mapper>
|
||
|
|