<?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.yeshi.fanli.dao.mybatis.goods.ShareGoodsTextTemplateMapper">
|
<resultMap id="BaseResultMap"
|
type="com.yeshi.fanli.entity.goods.ShareGoodsTextTemplate">
|
<id column="st_id" property="id" jdbcType="BIGINT" />
|
<result column="st_uid" property="uid" jdbcType="BIGINT" />
|
<result column="st_share_text_template" property="shareTextTemplate"
|
jdbcType="VARCHAR" />
|
<result column="st_share_coupon_text_template" property="shareCouponTextTemplate"
|
jdbcType="VARCHAR" />
|
<result column="st_create_time" property="createTime" jdbcType="TIMESTAMP" />
|
<result column="st_update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
</resultMap>
|
<sql id="Base_Column_List">st_id,st_uid,st_share_text_template,st_share_coupon_text_template,st_create_time,st_update_time
|
</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
parameterType="java.lang.Long">
|
select
|
<include refid="Base_Column_List" />
|
from yeshi_ec_share_template where st_id = #{id,jdbcType=BIGINT}
|
</select>
|
|
<select id="selectByUid" resultMap="BaseResultMap"
|
parameterType="java.lang.Long">
|
select
|
<include refid="Base_Column_List" />
|
from yeshi_ec_share_template where st_uid = #{0}
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
|
yeshi_ec_share_template where st_id = #{id,jdbcType=BIGINT}
|
</delete>
|
<insert id="insert" parameterType="com.yeshi.fanli.entity.goods.ShareGoodsTextTemplate"
|
useGeneratedKeys="true" keyProperty="id">insert into
|
yeshi_ec_share_template
|
(st_id,st_uid,st_share_text_template,st_share_coupon_text_template,st_create_time,st_update_time)
|
values
|
(#{id,jdbcType=BIGINT},#{uid,jdbcType=BIGINT},#{shareTextTemplate,jdbcType=VARCHAR},#{shareCouponTextTemplate,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})
|
</insert>
|
<insert id="insertSelective" parameterType="com.yeshi.fanli.entity.goods.ShareGoodsTextTemplate"
|
useGeneratedKeys="true" keyProperty="id">
|
insert into yeshi_ec_share_template
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">st_id,</if>
|
<if test="uid != null">st_uid,</if>
|
<if test="shareTextTemplate != null">st_share_text_template,</if>
|
<if test="shareCouponTextTemplate != null">st_share_coupon_text_template,</if>
|
<if test="createTime != null">st_create_time,</if>
|
<if test="updateTime != null">st_update_time,</if>
|
</trim>
|
values
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id,jdbcType=BIGINT},</if>
|
<if test="uid != null">#{uid,jdbcType=BIGINT},</if>
|
<if test="shareTextTemplate != null">#{shareTextTemplate,jdbcType=VARCHAR},</if>
|
<if test="shareCouponTextTemplate != null">#{shareCouponTextTemplate,jdbcType=VARCHAR},</if>
|
<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
<if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.goods.ShareGoodsTextTemplate">update
|
yeshi_ec_share_template set st_uid =
|
#{uid,jdbcType=BIGINT},st_share_text_template =
|
#{shareTextTemplate,jdbcType=VARCHAR},st_share_coupon_text_template =
|
#{shareCouponTextTemplate,jdbcType=VARCHAR},st_create_time =
|
#{createTime,jdbcType=TIMESTAMP},st_update_time =
|
#{updateTime,jdbcType=TIMESTAMP} where st_id = #{id,jdbcType=BIGINT}
|
</update>
|
<update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.goods.ShareGoodsTextTemplate">
|
update yeshi_ec_share_template
|
<set>
|
<if test="uid != null">st_uid=#{uid,jdbcType=BIGINT},</if>
|
<if test="shareTextTemplate != null">st_share_text_template=#{shareTextTemplate,jdbcType=VARCHAR},
|
</if>
|
<if test="shareCouponTextTemplate != null">st_share_coupon_text_template=#{shareCouponTextTemplate,jdbcType=VARCHAR},
|
</if>
|
<if test="createTime != null">st_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
|
<if test="updateTime != null">st_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
|
</set>
|
where st_id = #{id,jdbcType=BIGINT}
|
</update>
|
</mapper>
|