WarehouseMapper.xml
3.38 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
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?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.general.warehouse.mapper.WarehouseMapper">
<select id="selectEntity" resultType="com.huaheng.pc.general.warehouse.domain.Warehouse">
SELECT id, code, name, companyId, address1, address2, city, province, district, country, postalCode, attentionTo, phoneNum, faxNum, email, hostCode, created, createdBy, lastUpdated, lastUpdatedBy, enable, deleted, userDef1, userDef2, userDef3
FROM warehouse
<where>
<if test="id != null">
AND id = #{id}
</if>
<if test="code != null">
AND code = #{code}
</if>
<if test="name != null">
AND name = #{name}
</if>
<if test="companyIdList != null and companyIdList.size() > 0 ">
AND companyId in
<foreach collection="companyIdList" item="companyIdItem" open="(" separator="," close=")">
#{companyIdItem}
</foreach>
</if>
<if test="companyId != null">
AND companyId = #{companyId}
</if>
<if test="address1 != null">
AND address1 = #{address1}
</if>
<if test="address2 != null">
AND address2 = #{address2}
</if>
<if test="city != null">
AND city = #{city}
</if>
<if test="province != null">
AND province = #{province}
</if>
<if test="district != null">
AND district = #{district}
</if>
<if test="country != null">
AND country = #{country}
</if>
<if test="postalCode != null">
AND postalCode = #{postalCode}
</if>
<if test="attentionTo != null">
AND attentionTo = #{attentionTo}
</if>
<if test="phoneNum != null">
AND phoneNum = #{phoneNum}
</if>
<if test="faxNum != null">
AND faxNum = #{faxNum}
</if>
<if test="email != null">
AND email = #{email}
</if>
<if test="hostCode != null">
AND hostCode = #{hostCode}
</if>
<if test="created != null">
AND created = #{created}
</if>
<if test="createdBy != null">
AND createdBy = #{createdBy}
</if>
<if test="lastUpdated != null">
AND lastUpdated = #{lastUpdated}
</if>
<if test="lastUpdatedBy != null">
AND lastUpdatedBy = #{lastUpdatedBy}
</if>
<if test="enable != null">
AND enable = #{enable}
</if>
<if test="deleted != null">
AND deleted = #{deleted}
</if>
<if test="userDef1 != null">
AND userDef1 = #{userDef1}
</if>
<if test="userDef2 != null">
AND userDef2 = #{userDef2}
</if>
<if test="userDef3 != null">
AND userDef3 = #{userDef3}
</if>
</where>
</select>
</mapper>