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>
|
f318719c
louyao
渠道商后台
|
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
insert into catalog (channelId, name,sort)
values (#{channelId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}
)
</insert>
<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>
|