AddressMapper.xml
1.41 KB
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
<?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" />
<!-- <result column="number" jdbcType="INTEGER" property="number" />-->
<result column="param" jdbcType="VARCHAR" property="param" />
<result column="url" jdbcType="VARCHAR" property="url" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, warehouseCode,number, param,url
</sql>
<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>
</mapper>