You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
2.2 KiB
XML
60 lines
2.2 KiB
XML
3 years ago
|
<?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.engine.organization.mapper.resource.ResourceMapper">
|
||
|
<resultMap id="BaseResultMap" type="com.engine.organization.entity.hrmresource.po.HrmResourcePO">
|
||
|
</resultMap>
|
||
|
|
||
|
<!-- 表字段 -->
|
||
|
<sql id="baseColumns">
|
||
|
id,last_name,department_id,company_id,mobile,telephone,manager_id
|
||
|
</sql>
|
||
|
|
||
|
<select id="listAll" resultType="com.engine.organization.entity.hrmresource.po.HrmResourcePO">
|
||
|
SELECT
|
||
|
<include refid="baseColumns"/>
|
||
|
FROM jcl_org_hrmresource
|
||
|
where 1 = 1
|
||
|
<include refid="likeSql"/>
|
||
|
<if test="param.departmentId != null and param.departmentId != ''">
|
||
|
and department_id = #{param.departmentId}
|
||
|
</if>
|
||
|
<if test="param.companyId != null and param.companyId != ''">
|
||
|
and company_id = #{param.companyId}
|
||
|
</if>
|
||
|
<if test="param.mobile != null and param.mobile != ''">
|
||
|
and mobile = #{param.mobile}
|
||
|
</if>
|
||
|
<if test="param.telephone != null and param.telephone != ''">
|
||
|
and telephone = #{param.telephone}
|
||
|
</if>
|
||
|
<if test="param.managerId != null and param.managerId != ''">
|
||
|
and manager_id = #{param.managerId}
|
||
|
</if>
|
||
|
<if test="param.mobileCall != null and param.mobileCall != ''">
|
||
|
and mobile_call = #{param.mobileCall}
|
||
|
</if>
|
||
|
<if test="param.jobTitle != null and param.jobTitle != ''">
|
||
|
and job_title = #{param.jobTitle}
|
||
|
</if>
|
||
|
order by id asc;
|
||
|
</select>
|
||
|
|
||
|
<sql id="likeSql">
|
||
|
<if test="param.lastName != null and param.lastName != ''">
|
||
|
AND last_name like CONCAT('%',#{param.lastName},'%')
|
||
|
</if>
|
||
|
</sql>
|
||
|
<sql id="likeSql" databaseId="oracle">
|
||
|
<if test="param.lastName != null and param.lastName != ''">
|
||
|
AND last_name like '%'||#{param.lastName}||'%'
|
||
|
</if>
|
||
|
</sql>
|
||
|
<sql id="likeSql" databaseId="sqlserver">
|
||
|
<if test="param.lastName != null and param.lastName != ''">
|
||
|
AND last_name like '%'+#{param.lastName}+'%'
|
||
|
</if>
|
||
|
</sql>
|
||
|
|
||
|
|
||
|
|
||
|
</mapper>
|