ShopMapper.xml
5.84 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<?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.yoho.search.dal.ShopMapper" >
<resultMap id="BaseResultMap" type="com.yoho.search.dal.model.Shops" >
<id column="shops_id" property="shopsId" jdbcType="INTEGER" />
<result column="shop_name" property="shopName" jdbcType="VARCHAR" />
<result column="shop_domain" property="shopDomain" jdbcType="VARCHAR" />
<result column="shop_nature" property="shopNature" jdbcType="INTEGER" />
<result column="shop_logo" property="shopLogo" jdbcType="VARCHAR" />
<result column="website_url" property="websiteUrl" jdbcType="VARCHAR" />
<result column="other_url" property="otherUrl" jdbcType="VARCHAR" />
<result column="shop_address" property="shopAddress" jdbcType="VARCHAR" />
<result column="create_pid" property="createPid" jdbcType="INTEGER" />
<result column="shops_type" property="shopsType" jdbcType="INTEGER" />
<result column="operation_status" property="operationStatus" jdbcType="INTEGER" />
<result column="examine_status" property="examineStatus" jdbcType="INTEGER" />
<result column="status" property="status" jdbcType="INTEGER" />
<result column="check_status" property="checkStatus" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="INTEGER" />
<result column="update_time" property="updateTime" jdbcType="INTEGER" />
<result column="blk_status" property="blkStatus" jdbcType="INTEGER" />
<result column="shop_intro" property="shopIntro" jdbcType="LONGVARCHAR" />
<result column="decorator_template_type" property="decoratorTemplateType" jdbcType="INTEGER" />
</resultMap>
<sql id="Base_Column_List" >
shops_id, shop_name, shop_domain, shop_nature, shop_logo, website_url, other_url,
shop_address, create_pid, shops_type, operation_status, examine_status, status, check_status,
create_time, update_time, blk_status,shop_intro,decorator_template_type
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from shops
where shops_id = #{shopsId,jdbcType=INTEGER}
limit 1
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from shops
where shops_id = #{shopsId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.yoho.search.dal.model.Shops" >
insert into shops (shops_id, shop_name, shop_domain,
shop_nature, shop_logo, website_url,
other_url, shop_address, create_pid,
shops_type, operation_status, examine_status,
status, check_status, create_time,
update_time, blk_status, shop_intro,decorator_template_type
)
values (#{shopsId,jdbcType=INTEGER}, #{shopName,jdbcType=VARCHAR}, #{shopDomain,jdbcType=VARCHAR},
#{shopNature,jdbcType=TINYINT}, #{shopLogo,jdbcType=VARCHAR}, #{websiteUrl,jdbcType=VARCHAR},
#{otherUrl,jdbcType=VARCHAR}, #{shopAddress,jdbcType=VARCHAR}, #{createPid,jdbcType=INTEGER},
#{shopsType,jdbcType=TINYINT}, #{operationStatus,jdbcType=TINYINT}, #{examineStatus,jdbcType=TINYINT},
#{status,jdbcType=TINYINT}, #{checkStatus,jdbcType=SMALLINT}, #{createTime,jdbcType=INTEGER},
#{updateTime,jdbcType=INTEGER}, #{blkStatus,jdbcType=TINYINT}, #{shopIntro,jdbcType=LONGVARCHAR},#{decoratorTemplateType,jdbcType=INTEGER}
)
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yoho.search.dal.model.Shops" >
update shops
<set >
<if test="shopName != null" >
shop_name = #{shopName,jdbcType=VARCHAR},
</if>
<if test="shopDomain != null" >
shop_domain = #{shopDomain,jdbcType=VARCHAR},
</if>
<if test="shopNature != null" >
shop_nature = #{shopNature,jdbcType=INTEGER},
</if>
<if test="shopLogo != null" >
shop_logo = #{shopLogo,jdbcType=VARCHAR},
</if>
<if test="websiteUrl != null" >
website_url = #{websiteUrl,jdbcType=VARCHAR},
</if>
<if test="otherUrl != null" >
other_url = #{otherUrl,jdbcType=VARCHAR},
</if>
<if test="shopAddress != null" >
shop_address = #{shopAddress,jdbcType=VARCHAR},
</if>
<if test="createPid != null" >
create_pid = #{createPid,jdbcType=INTEGER},
</if>
<if test="shopsType != null" >
shops_type = #{shopsType,jdbcType=INTEGER},
</if>
<if test="operationStatus != null" >
operation_status = #{operationStatus,jdbcType=INTEGER},
</if>
<if test="examineStatus != null" >
examine_status = #{examineStatus,jdbcType=INTEGER},
</if>
<if test="status != null" >
status = #{status,jdbcType=INTEGER},
</if>
<if test="checkStatus != null" >
check_status = #{checkStatus,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
create_time = #{createTime,jdbcType=INTEGER},
</if>
<if test="updateTime != null" >
update_time = #{updateTime,jdbcType=INTEGER},
</if>
<if test="blkStatus != null" >
blk_status = #{blkStatus,jdbcType=INTEGER},
</if>
<if test="shopIntro != null" >
shop_intro = #{shopIntro,jdbcType=LONGVARCHAR},
</if>
<if test="decoratorTemplateType != null" >
decorator_template_type = #{decoratorTemplateType,jdbcType=INTEGER},
</if>
</set>
where shops_id = #{shopsId,jdbcType=INTEGER}
</update>
<select id="selectCount" resultType="java.lang.Integer" timeout="20000">
SELECT count(shops_id) FROM shops
</select>
<select id="selectPageLists" resultMap="BaseResultMap" timeout="20000">
select
<include refid="Base_Column_List" />
from shops limit #{offset},#{pageSize}
</select>
</mapper>