jiangping
2023-08-21 2837bdd57f72e386bbf9a725e7b3a13e5eb9e930
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?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>