You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dianshang-houduan/src/main/resources/mappers/FbqdStuAnswerMapper.xml

328 lines
12 KiB
XML

<?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.sztzjy.linkCommerce.mapper.FbqdStuAnswerMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.linkCommerce.entity.FbqdStuAnswer">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="module" jdbcType="VARCHAR" property="module" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.sztzjy.linkCommerce.entity.FbqdStuAnswer">
<result column="exposure_data" jdbcType="LONGVARCHAR" property="exposureData" />
<result column="click_data" jdbcType="LONGVARCHAR" property="clickData" />
<result column="ad_cost" jdbcType="LONGVARCHAR" property="adCost" />
<result column="order_amount" jdbcType="LONGVARCHAR" property="orderAmount" />
<result column="keywords" jdbcType="LONGVARCHAR" property="keywords" />
<result column="scene_promotion" jdbcType="LONGVARCHAR" property="scenePromotion" />
<result column="crowd_promotion" jdbcType="LONGVARCHAR" property="crowdPromotion" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, module, user_id
</sql>
<sql id="Blob_Column_List">
exposure_data, click_data, ad_cost, order_amount, keywords, scene_promotion, crowd_promotion
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.sztzjy.linkCommerce.entity.FbqdStuAnswerExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from fbqd_stu_answer
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.sztzjy.linkCommerce.entity.FbqdStuAnswerExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from fbqd_stu_answer
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from fbqd_stu_answer
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from fbqd_stu_answer
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.sztzjy.linkCommerce.entity.FbqdStuAnswerExample">
delete from fbqd_stu_answer
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.linkCommerce.entity.FbqdStuAnswer">
insert into fbqd_stu_answer (id, module, user_id,
exposure_data, click_data, ad_cost,
order_amount, keywords, scene_promotion,
crowd_promotion)
values (#{id,jdbcType=VARCHAR}, #{module,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR},
#{exposureData,jdbcType=LONGVARCHAR}, #{clickData,jdbcType=LONGVARCHAR}, #{adCost,jdbcType=LONGVARCHAR},
#{orderAmount,jdbcType=LONGVARCHAR}, #{keywords,jdbcType=LONGVARCHAR}, #{scenePromotion,jdbcType=LONGVARCHAR},
#{crowdPromotion,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.linkCommerce.entity.FbqdStuAnswer">
insert into fbqd_stu_answer
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="module != null">
module,
</if>
<if test="userId != null">
user_id,
</if>
<if test="exposureData != null">
exposure_data,
</if>
<if test="clickData != null">
click_data,
</if>
<if test="adCost != null">
ad_cost,
</if>
<if test="orderAmount != null">
order_amount,
</if>
<if test="keywords != null">
keywords,
</if>
<if test="scenePromotion != null">
scene_promotion,
</if>
<if test="crowdPromotion != null">
crowd_promotion,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="module != null">
#{module,jdbcType=VARCHAR},
</if>
<if test="userId != null">
#{userId,jdbcType=VARCHAR},
</if>
<if test="exposureData != null">
#{exposureData,jdbcType=LONGVARCHAR},
</if>
<if test="clickData != null">
#{clickData,jdbcType=LONGVARCHAR},
</if>
<if test="adCost != null">
#{adCost,jdbcType=LONGVARCHAR},
</if>
<if test="orderAmount != null">
#{orderAmount,jdbcType=LONGVARCHAR},
</if>
<if test="keywords != null">
#{keywords,jdbcType=LONGVARCHAR},
</if>
<if test="scenePromotion != null">
#{scenePromotion,jdbcType=LONGVARCHAR},
</if>
<if test="crowdPromotion != null">
#{crowdPromotion,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.linkCommerce.entity.FbqdStuAnswerExample" resultType="java.lang.Long">
select count(*) from fbqd_stu_answer
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update fbqd_stu_answer
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.module != null">
module = #{record.module,jdbcType=VARCHAR},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=VARCHAR},
</if>
<if test="record.exposureData != null">
exposure_data = #{record.exposureData,jdbcType=LONGVARCHAR},
</if>
<if test="record.clickData != null">
click_data = #{record.clickData,jdbcType=LONGVARCHAR},
</if>
<if test="record.adCost != null">
ad_cost = #{record.adCost,jdbcType=LONGVARCHAR},
</if>
<if test="record.orderAmount != null">
order_amount = #{record.orderAmount,jdbcType=LONGVARCHAR},
</if>
<if test="record.keywords != null">
keywords = #{record.keywords,jdbcType=LONGVARCHAR},
</if>
<if test="record.scenePromotion != null">
scene_promotion = #{record.scenePromotion,jdbcType=LONGVARCHAR},
</if>
<if test="record.crowdPromotion != null">
crowd_promotion = #{record.crowdPromotion,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update fbqd_stu_answer
set id = #{record.id,jdbcType=VARCHAR},
module = #{record.module,jdbcType=VARCHAR},
user_id = #{record.userId,jdbcType=VARCHAR},
exposure_data = #{record.exposureData,jdbcType=LONGVARCHAR},
click_data = #{record.clickData,jdbcType=LONGVARCHAR},
ad_cost = #{record.adCost,jdbcType=LONGVARCHAR},
order_amount = #{record.orderAmount,jdbcType=LONGVARCHAR},
keywords = #{record.keywords,jdbcType=LONGVARCHAR},
scene_promotion = #{record.scenePromotion,jdbcType=LONGVARCHAR},
crowd_promotion = #{record.crowdPromotion,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update fbqd_stu_answer
set id = #{record.id,jdbcType=VARCHAR},
module = #{record.module,jdbcType=VARCHAR},
user_id = #{record.userId,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.linkCommerce.entity.FbqdStuAnswer">
update fbqd_stu_answer
<set>
<if test="module != null">
module = #{module,jdbcType=VARCHAR},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=VARCHAR},
</if>
<if test="exposureData != null">
exposure_data = #{exposureData,jdbcType=LONGVARCHAR},
</if>
<if test="clickData != null">
click_data = #{clickData,jdbcType=LONGVARCHAR},
</if>
<if test="adCost != null">
ad_cost = #{adCost,jdbcType=LONGVARCHAR},
</if>
<if test="orderAmount != null">
order_amount = #{orderAmount,jdbcType=LONGVARCHAR},
</if>
<if test="keywords != null">
keywords = #{keywords,jdbcType=LONGVARCHAR},
</if>
<if test="scenePromotion != null">
scene_promotion = #{scenePromotion,jdbcType=LONGVARCHAR},
</if>
<if test="crowdPromotion != null">
crowd_promotion = #{crowdPromotion,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.sztzjy.linkCommerce.entity.FbqdStuAnswer">
update fbqd_stu_answer
set module = #{module,jdbcType=VARCHAR},
user_id = #{userId,jdbcType=VARCHAR},
exposure_data = #{exposureData,jdbcType=LONGVARCHAR},
click_data = #{clickData,jdbcType=LONGVARCHAR},
ad_cost = #{adCost,jdbcType=LONGVARCHAR},
order_amount = #{orderAmount,jdbcType=LONGVARCHAR},
keywords = #{keywords,jdbcType=LONGVARCHAR},
scene_promotion = #{scenePromotion,jdbcType=LONGVARCHAR},
crowd_promotion = #{crowdPromotion,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.linkCommerce.entity.FbqdStuAnswer">
update fbqd_stu_answer
set module = #{module,jdbcType=VARCHAR},
user_id = #{userId,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>