Blame view

src/main/resources/mybatis/config/AddressMapper.xml 1.41 KB
pengcheng authored
1
2
3
4
5
6
7
<?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.huaheng.pc.config.address.mapper.AddressMapper">
  <resultMap id="BaseResultMap" type="com.huaheng.pc.config.address.domain.Address">
    <!--@mbg.generated-->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" />
易文鹏 authored
8
<!--    <result column="number" jdbcType="INTEGER" property="number" />-->
pengcheng authored
9
10
11
12
13
    <result column="param" jdbcType="VARCHAR" property="param" />
    <result column="url" jdbcType="VARCHAR" property="url" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
pengcheng authored
14
    id, warehouseCode,number, param,url
pengcheng authored
15
  </sql>
易文鹏 authored
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38


  <select id="selectEntity"  resultType="com.huaheng.pc.config.address.domain.Address">
    select id,warehouseCode,param,url,number from address
    <where>
      <if test="id != null">
        AND id = #{id}
      </if>
      <if test="warehouseCode != null and warehouseCode != ''">
        AND warehouseCode = #{warehouseCode}
      </if>
      <if test="param != null and param != ''">
        AND param = #{param}
      </if>
      <if test="url != null and url != ''">
        AND url = #{url}
      </if>
      <if test="number != null and number != ''">
        AND number = #{number}
      </if>
    </where>
    limit 1
  </select>
pengcheng authored
39
</mapper>