<?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="smallProgramAdvertHistoryServiceDaoImpl">
|
|
<sql id="Base_Column_List">
|
id,
|
adverts_id as 'advertsId',
|
content,
|
operation,
|
operate_time as 'operateTime',
|
operate_user_id as 'operateUserId'
|
</sql>
|
|
<select id="selectHistoryByAdvertsId" parameterType="Map" resultType="Map">
|
select
|
<include refid="Base_Column_List" />
|
from business_small_program_advertisement_history
|
where adverts_id = #{advertsId}
|
</select>
|
|
<insert id="saveAdvertsHistory" parameterType="Map">
|
insert into business_small_program_advertisement_history
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">
|
id,
|
</if>
|
<if test="advertsId != null">
|
adverts_id,
|
</if>
|
<if test="content != null">
|
content,
|
</if>
|
<if test="operation != null">
|
operation,
|
</if>
|
<if test="operateTime != null">
|
operate_time,
|
</if>
|
<if test="operateUserId != null">
|
operate_user_id,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="id != null">
|
#{id,jdbcType=VARCHAR},
|
</if>
|
<if test="advertsId != null">
|
#{advertsId,jdbcType=VARCHAR},
|
</if>
|
<if test="content != null">
|
#{content,jdbcType=VARCHAR},
|
</if>
|
<if test="operation != null">
|
#{operation,jdbcType=VARCHAR},
|
</if>
|
<if test="operateTime != null">
|
#{operateTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="operateUserId != null">
|
#{operateUserId,jdbcType=VARCHAR},
|
</if>
|
</trim>
|
</insert>
|
|
|
</mapper>
|