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.
weaver-hrm-organization/src/com/engine/organization/mapper/hrmresource/HrmResourceMapper.xml

21 lines
1.1 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.hrmresource.HrmResourceMapper">
<select id="getLastNameById" resultType="java.lang.String">
select last_name
from hrmresource
where id = #{id}
</select>
<select id="listAll" resultType="com.engine.organization.entity.hrmresource.vo.HrmResourceVO">
select t.lastname as lastname, d.departmentname as departmentname, c.subcompanyname as companyname, t.mobile,
t.telephone, t1.lastname as managername from hrmresource t left join hrmdepartment d on t.departmentid = d.id
left join hrmsubcompany c on t.subcompanyid1 = c.id left join hrmresource t1 on t.managerid = t1.id where 1 = 1
<if test="ids != null and ids.size > 0">
AND t.id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
</select>
3 years ago
</mapper>