<?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="doumeemes.dao.business.UnitExtMapper">
|
|
<!-- 管理页面查询 -->
|
<resultMap id="UnitExtListVO" type="doumeemes.dao.business.vo.UnitExtListVO" autoMapping="true">
|
<id column="ID" jdbcType="INTEGER" property="id"/>
|
</resultMap>
|
<select id="selectList" parameterType="doumeemes.dao.business.dto.QueryUnitExtDTO" resultMap="UnitExtListVO">
|
SELECT
|
`unit`.`ID`,
|
`unit`.`DELETED`,
|
`unit`.`CREATE_USER`,
|
`unit`.`CREATE_TIME`,
|
`unit`.`UPDATE_USER`,
|
`unit`.`UPDATE_TIME`,
|
`unit`.`REMARK`,
|
`unit`.`ROOT_DEPART_ID`,
|
`unit`.`NAME`,
|
`unit`.`TYPE`,
|
`unit`.`STATUS`,
|
unit.ATTRIBUTE_DATA
|
FROM `unit` `unit`
|
<where>
|
<if test="id != null">
|
AND `unit`.`ID` = #{id}
|
</if>
|
<if test="deleted != null">
|
AND `unit`.`DELETED` = #{deleted}
|
</if>
|
<if test="createUser != null">
|
AND `unit`.`CREATE_USER` = #{createUser}
|
</if>
|
<if test="createTime != null">
|
AND `unit`.`CREATE_TIME` = #{createTime}
|
</if>
|
<if test="updateUser != null">
|
AND `unit`.`UPDATE_USER` = #{updateUser}
|
</if>
|
<if test="updateTime != null">
|
AND `unit`.`UPDATE_TIME` = #{updateTime}
|
</if>
|
<if test="remark != null and remark != ''">
|
AND `unit`.`REMARK` = #{remark}
|
</if>
|
<if test="rootDepartId != null">
|
AND `unit`.`ROOT_DEPART_ID` = #{rootDepartId}
|
</if>
|
<if test="name != null and name != ''">
|
AND `unit`.`NAME` = #{name}
|
</if>
|
<if test="type != null">
|
AND `unit`.`TYPE` = #{type}
|
</if>
|
<if test="status != null">
|
AND `unit`.`STATUS` = #{status}
|
</if>
|
</where>
|
order by `unit`.`ID` desc
|
</select>
|
</mapper>
|