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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?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.ext.CustomerExtMapper">
 
  <!-- 管理页面查询 -->
  <resultMap id="CustomerExtListVO" type="doumeemes.dao.ext.vo.CustomerExtListVO" autoMapping="true">
    <id column="ID" jdbcType="INTEGER" property="id"/>
  </resultMap>
  <select id="selectList" parameterType="doumeemes.dao.ext.dto.QueryCustomerExtDTO" resultMap="CustomerExtListVO">
    SELECT
      `a`.`ID`,
      `a`.`DELETED`,
      `a`.`CREATE_USER`,
      `a`.`CREATE_TIME`,
      `a`.`UPDATE_USER`,
      `a`.`UPDATE_TIME`,
      `a`.`REMARK`,
      `a`.`ROOT_DEPART_ID`,
      `a`.`CREDIT_CODE`,
      `a`.`NAME`,
      `a`.`TYPE`,
      `a`.`CODE`,
      `a`.`FOUND_DATE`,
      `a`.`LEGAL_PERSON`,
      `a`.`CATEGORYY`
    FROM `customer` `a`
    <where>
      <if test="id != null">
        AND `a`.`ID` = #{id}
      </if>
      <if test="deleted != null">
        AND `a`.`DELETED` = #{deleted}
      </if>
      <if test="createUser != null">
        AND `a`.`CREATE_USER` = #{createUser}
      </if>
      <if test="createTime != null">
        AND `a`.`CREATE_TIME` = #{createTime}
      </if>
      <if test="updateUser != null">
        AND `a`.`UPDATE_USER` = #{updateUser}
      </if>
      <if test="updateTime != null">
        AND `a`.`UPDATE_TIME` = #{updateTime}
      </if>
      <if test="remark != null and remark != ''">
        AND `a`.`REMARK` = #{remark}
      </if>
      <if test="rootDepartId != null">
        AND `a`.`ROOT_DEPART_ID` = #{rootDepartId}
      </if>
      <if test="creditCode != null and creditCode != ''">
        AND `a`.`CREDIT_CODE` = #{creditCode}
      </if>
      <if test="name != null and name != ''">
        AND `a`.`NAME` = #{name}
      </if>
      <if test="type != null and type != ''">
        AND `a`.`TYPE` = #{type}
      </if>
      <if test="code != null and code != ''">
        AND `a`.`CODE` = #{code}
      </if>
      <if test="foundDate != null">
        AND `a`.`FOUND_DATE` = #{foundDate}
      </if>
      <if test="legalPerson != null and legalPerson != ''">
        AND `a`.`LEGAL_PERSON` = #{legalPerson}
      </if>
      <if test="categoryy != null and categoryy != ''">
        AND `a`.`CATEGORYY` = #{categoryy}
      </if>
    </where>
  </select>
</mapper>