f318719c
louyao
渠道商后台
|
1
2
3
4
5
6
7
8
9
10
11
12
|
<?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.CatalogMapper">
<resultMap id="CatalogMap" type="com.sincere.wechatbusiness.model.Catalog">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="channelId" jdbcType="INTEGER" property="channelId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="state" jdbcType="INTEGER" property="state"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
</resultMap>
|
962b0bfd
louyao
渠道商移动端
|
13
14
15
16
|
<select id="getList" parameterType="java.lang.Integer" resultMap="CatalogMap">
select * from catalog where channelId=#{channelId} and state=1 and sort!=6 order by sort
</select>
|
e9031310
陈杰
内容下发
|
17
18
19
20
|
<select id="getDetail" parameterType="com.sincere.wechatbusiness.model.Catalog" resultMap="CatalogMap">
select * from catalog where channelId=#{channelId} and sort=#{sort} and state=1
</select>
|
f318719c
louyao
渠道商后台
|
21
22
23
24
|
<insert id="insert" parameterType="com.sincere.wechatbusiness.model.Catalog">
insert into catalog (channelId, name,sort)
values (#{channelId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}
)
|
4086b7de
陈杰
1
|
25
|
</insert>
|
f318719c
louyao
渠道商后台
|
26
27
28
29
30
31
32
33
34
35
36
|
<update id="update" parameterType="com.sincere.wechatbusiness.model.Catalog">
update catalog
<trim prefix="set" suffixOverrides=",">
<if test="name!=null and name!=''">
name=#{name},
</if>
</trim>
where id = #{id}
</update>
</mapper>
|