f318719c
louyao
渠道商后台
|
1
2
3
4
5
6
|
<?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.sincere.wechatbusiness.mapper.ChannelProductMapper">
<resultMap id="ChannelProductMap" type="com.sincere.wechatbusiness.model.ChannelProduct">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="channelId" jdbcType="INTEGER" property="channelId" />
|
962b0bfd
louyao
渠道商移动端
|
7
|
<result column="product_name" jdbcType="VARCHAR" property="productName" />
|
f318719c
louyao
渠道商后台
|
8
9
|
<result column="price" jdbcType="VARCHAR" property="price" />
<result column="channel_price" jdbcType="VARCHAR" property="channelPrice" />
|
962b0bfd
louyao
渠道商移动端
|
10
|
<result column="caption" jdbcType="VARCHAR" property="caption" />
|
f318719c
louyao
渠道商后台
|
11
12
13
14
|
<result column="state" jdbcType="INTEGER" property="state"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
</resultMap>
|
eca46c74
陈杰
1
|
15
16
|
<select id="getList" parameterType="java.lang.Integer" resultMap="ChannelProductMap">
select * from channel_product where state=1 and channelId=#{id} order by create_time
|
e9031310
陈杰
内容下发
|
17
18
19
20
|
</select>
<insert id="insert" parameterType="com.sincere.wechatbusiness.model.ChannelProduct">
insert into channel_product (channelId, product_name,price)
|
eca46c74
陈杰
1
|
21
|
values (#{channelId,jdbcType=INTEGER}, #{productName,jdbcType=VARCHAR}, #{price,jdbcType=VARCHAR}
|
cdc58444
陈杰
1
|
22
|
)
|
f318719c
louyao
渠道商后台
|
23
24
25
26
27
28
29
|
</insert>
<update id="update" parameterType="com.sincere.wechatbusiness.model.ChannelProduct">
update channel_product
<trim prefix="set" suffixOverrides=",">
<if test="channelPrice!=null and channelPrice!=''">
channel_price=#{channelPrice},
|
bbcd213f
陈杰
渠道商 动态码
|
30
31
|
</if>
<if test="caption!=null and caption!=''">
|
9c4d6326
陈杰
渠道商品 编辑
|
32
|
caption=#{caption},
|
bbcd213f
陈杰
渠道商 动态码
|
33
34
|
</if>
</trim>
|
f318719c
louyao
渠道商后台
|
35
36
37
|
where id = #{id}
</update>
|
9c4d6326
陈杰
渠道商品 编辑
|
38
39
40
41
|
<update id="deleteChannelProduct" parameterType="java.lang.Integer">
update channel_product set state=0 where channelId=#{id}
</update>
</mapper>
|
f318719c
louyao
渠道商后台
|
|
|
bbcd213f
陈杰
渠道商 动态码
|
|
|
f318719c
louyao
渠道商后台
|
|
|
eca46c74
陈杰
1
|
|
|
4582f838
陈杰
1
|
|
|
eca46c74
陈杰
1
|
|
|
f318719c
louyao
渠道商后台
|
|
|
cdc58444
陈杰
1
|
|
|
f318719c
louyao
渠道商后台
|
|
|
962b0bfd
louyao
渠道商移动端
|
|
|
f318719c
louyao
渠道商后台
|
|
|