限时购库表修改
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
<result column="product_category_id" jdbcType="BIGINT" property="productCategoryId" />
|
||||
<result column="feight_template_id" jdbcType="BIGINT" property="feightTemplateId" />
|
||||
<result column="product_attribute_category_id" jdbcType="BIGINT" property="productAttributeCategoryId" />
|
||||
<result column="flash_promotion_id" jdbcType="INTEGER" property="flashPromotionId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="pic" jdbcType="VARCHAR" property="pic" />
|
||||
<result column="product_sn" jdbcType="VARCHAR" property="productSn" />
|
||||
@@ -35,9 +34,6 @@
|
||||
<result column="note" jdbcType="VARCHAR" property="note" />
|
||||
<result column="album_pics" jdbcType="VARCHAR" property="albumPics" />
|
||||
<result column="detail_title" jdbcType="VARCHAR" property="detailTitle" />
|
||||
<result column="flash_promotion_price" jdbcType="DECIMAL" property="flashPromotionPrice" />
|
||||
<result column="flash_promotion_count" jdbcType="INTEGER" property="flashPromotionCount" />
|
||||
<result column="flash_promotion_sort" jdbcType="INTEGER" property="flashPromotionSort" />
|
||||
<result column="promotion_start_time" jdbcType="TIMESTAMP" property="promotionStartTime" />
|
||||
<result column="promotion_end_time" jdbcType="TIMESTAMP" property="promotionEndTime" />
|
||||
<result column="promotion_per_limit" jdbcType="INTEGER" property="promotionPerLimit" />
|
||||
@@ -111,11 +107,10 @@
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, brand_id, product_category_id, feight_template_id, product_attribute_category_id,
|
||||
flash_promotion_id, name, pic, product_sn, delete_status, publish_status, new_status,
|
||||
recommand_status, verify_status, sort, sale, price, promotion_price, gift_growth,
|
||||
gift_point, use_point_limit, sub_title, original_price, stock, low_stock, unit, weight,
|
||||
preview_status, service_ids, keywords, note, album_pics, detail_title, flash_promotion_price,
|
||||
flash_promotion_count, flash_promotion_sort, promotion_start_time, promotion_end_time,
|
||||
name, pic, product_sn, delete_status, publish_status, new_status, recommand_status,
|
||||
verify_status, sort, sale, price, promotion_price, gift_growth, gift_point, use_point_limit,
|
||||
sub_title, original_price, stock, low_stock, unit, weight, preview_status, service_ids,
|
||||
keywords, note, album_pics, detail_title, promotion_start_time, promotion_end_time,
|
||||
promotion_per_limit, promotion_type, brand_name, product_category_name
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
@@ -174,39 +169,33 @@
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into pms_product (brand_id, product_category_id, feight_template_id,
|
||||
product_attribute_category_id, flash_promotion_id,
|
||||
name, pic, product_sn,
|
||||
delete_status, publish_status, new_status,
|
||||
recommand_status, verify_status, sort,
|
||||
sale, price, promotion_price,
|
||||
gift_growth, gift_point, use_point_limit,
|
||||
sub_title, original_price, stock,
|
||||
low_stock, unit, weight,
|
||||
preview_status, service_ids, keywords,
|
||||
note, album_pics, detail_title,
|
||||
flash_promotion_price, flash_promotion_count,
|
||||
flash_promotion_sort, promotion_start_time,
|
||||
promotion_end_time, promotion_per_limit,
|
||||
promotion_type, brand_name, product_category_name,
|
||||
description, detail_desc, detail_html,
|
||||
detail_mobile_html)
|
||||
product_attribute_category_id, name, pic,
|
||||
product_sn, delete_status, publish_status,
|
||||
new_status, recommand_status, verify_status,
|
||||
sort, sale, price,
|
||||
promotion_price, gift_growth, gift_point,
|
||||
use_point_limit, sub_title, original_price,
|
||||
stock, low_stock, unit,
|
||||
weight, preview_status, service_ids,
|
||||
keywords, note, album_pics,
|
||||
detail_title, promotion_start_time, promotion_end_time,
|
||||
promotion_per_limit, promotion_type, brand_name,
|
||||
product_category_name, description, detail_desc,
|
||||
detail_html, detail_mobile_html)
|
||||
values (#{brandId,jdbcType=BIGINT}, #{productCategoryId,jdbcType=BIGINT}, #{feightTemplateId,jdbcType=BIGINT},
|
||||
#{productAttributeCategoryId,jdbcType=BIGINT}, #{flashPromotionId,jdbcType=INTEGER},
|
||||
#{name,jdbcType=VARCHAR}, #{pic,jdbcType=VARCHAR}, #{productSn,jdbcType=VARCHAR},
|
||||
#{deleteStatus,jdbcType=INTEGER}, #{publishStatus,jdbcType=INTEGER}, #{newStatus,jdbcType=INTEGER},
|
||||
#{recommandStatus,jdbcType=INTEGER}, #{verifyStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER},
|
||||
#{sale,jdbcType=INTEGER}, #{price,jdbcType=DECIMAL}, #{promotionPrice,jdbcType=DECIMAL},
|
||||
#{giftGrowth,jdbcType=INTEGER}, #{giftPoint,jdbcType=INTEGER}, #{usePointLimit,jdbcType=INTEGER},
|
||||
#{subTitle,jdbcType=VARCHAR}, #{originalPrice,jdbcType=DECIMAL}, #{stock,jdbcType=INTEGER},
|
||||
#{lowStock,jdbcType=INTEGER}, #{unit,jdbcType=VARCHAR}, #{weight,jdbcType=DECIMAL},
|
||||
#{previewStatus,jdbcType=INTEGER}, #{serviceIds,jdbcType=VARCHAR}, #{keywords,jdbcType=VARCHAR},
|
||||
#{note,jdbcType=VARCHAR}, #{albumPics,jdbcType=VARCHAR}, #{detailTitle,jdbcType=VARCHAR},
|
||||
#{flashPromotionPrice,jdbcType=DECIMAL}, #{flashPromotionCount,jdbcType=INTEGER},
|
||||
#{flashPromotionSort,jdbcType=INTEGER}, #{promotionStartTime,jdbcType=TIMESTAMP},
|
||||
#{promotionEndTime,jdbcType=TIMESTAMP}, #{promotionPerLimit,jdbcType=INTEGER},
|
||||
#{promotionType,jdbcType=INTEGER}, #{brandName,jdbcType=VARCHAR}, #{productCategoryName,jdbcType=VARCHAR},
|
||||
#{description,jdbcType=LONGVARCHAR}, #{detailDesc,jdbcType=LONGVARCHAR}, #{detailHtml,jdbcType=LONGVARCHAR},
|
||||
#{detailMobileHtml,jdbcType=LONGVARCHAR})
|
||||
#{productAttributeCategoryId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{pic,jdbcType=VARCHAR},
|
||||
#{productSn,jdbcType=VARCHAR}, #{deleteStatus,jdbcType=INTEGER}, #{publishStatus,jdbcType=INTEGER},
|
||||
#{newStatus,jdbcType=INTEGER}, #{recommandStatus,jdbcType=INTEGER}, #{verifyStatus,jdbcType=INTEGER},
|
||||
#{sort,jdbcType=INTEGER}, #{sale,jdbcType=INTEGER}, #{price,jdbcType=DECIMAL},
|
||||
#{promotionPrice,jdbcType=DECIMAL}, #{giftGrowth,jdbcType=INTEGER}, #{giftPoint,jdbcType=INTEGER},
|
||||
#{usePointLimit,jdbcType=INTEGER}, #{subTitle,jdbcType=VARCHAR}, #{originalPrice,jdbcType=DECIMAL},
|
||||
#{stock,jdbcType=INTEGER}, #{lowStock,jdbcType=INTEGER}, #{unit,jdbcType=VARCHAR},
|
||||
#{weight,jdbcType=DECIMAL}, #{previewStatus,jdbcType=INTEGER}, #{serviceIds,jdbcType=VARCHAR},
|
||||
#{keywords,jdbcType=VARCHAR}, #{note,jdbcType=VARCHAR}, #{albumPics,jdbcType=VARCHAR},
|
||||
#{detailTitle,jdbcType=VARCHAR}, #{promotionStartTime,jdbcType=TIMESTAMP}, #{promotionEndTime,jdbcType=TIMESTAMP},
|
||||
#{promotionPerLimit,jdbcType=INTEGER}, #{promotionType,jdbcType=INTEGER}, #{brandName,jdbcType=VARCHAR},
|
||||
#{productCategoryName,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR}, #{detailDesc,jdbcType=LONGVARCHAR},
|
||||
#{detailHtml,jdbcType=LONGVARCHAR}, #{detailMobileHtml,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsProduct">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
@@ -226,9 +215,6 @@
|
||||
<if test="productAttributeCategoryId != null">
|
||||
product_attribute_category_id,
|
||||
</if>
|
||||
<if test="flashPromotionId != null">
|
||||
flash_promotion_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
@@ -310,15 +296,6 @@
|
||||
<if test="detailTitle != null">
|
||||
detail_title,
|
||||
</if>
|
||||
<if test="flashPromotionPrice != null">
|
||||
flash_promotion_price,
|
||||
</if>
|
||||
<if test="flashPromotionCount != null">
|
||||
flash_promotion_count,
|
||||
</if>
|
||||
<if test="flashPromotionSort != null">
|
||||
flash_promotion_sort,
|
||||
</if>
|
||||
<if test="promotionStartTime != null">
|
||||
promotion_start_time,
|
||||
</if>
|
||||
@@ -363,9 +340,6 @@
|
||||
<if test="productAttributeCategoryId != null">
|
||||
#{productAttributeCategoryId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="flashPromotionId != null">
|
||||
#{flashPromotionId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@@ -447,15 +421,6 @@
|
||||
<if test="detailTitle != null">
|
||||
#{detailTitle,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="flashPromotionPrice != null">
|
||||
#{flashPromotionPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="flashPromotionCount != null">
|
||||
#{flashPromotionCount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="flashPromotionSort != null">
|
||||
#{flashPromotionSort,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="promotionStartTime != null">
|
||||
#{promotionStartTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
@@ -512,9 +477,6 @@
|
||||
<if test="record.productAttributeCategoryId != null">
|
||||
product_attribute_category_id = #{record.productAttributeCategoryId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.flashPromotionId != null">
|
||||
flash_promotion_id = #{record.flashPromotionId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@@ -596,15 +558,6 @@
|
||||
<if test="record.detailTitle != null">
|
||||
detail_title = #{record.detailTitle,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.flashPromotionPrice != null">
|
||||
flash_promotion_price = #{record.flashPromotionPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="record.flashPromotionCount != null">
|
||||
flash_promotion_count = #{record.flashPromotionCount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.flashPromotionSort != null">
|
||||
flash_promotion_sort = #{record.flashPromotionSort,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.promotionStartTime != null">
|
||||
promotion_start_time = #{record.promotionStartTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
@@ -647,7 +600,6 @@
|
||||
product_category_id = #{record.productCategoryId,jdbcType=BIGINT},
|
||||
feight_template_id = #{record.feightTemplateId,jdbcType=BIGINT},
|
||||
product_attribute_category_id = #{record.productAttributeCategoryId,jdbcType=BIGINT},
|
||||
flash_promotion_id = #{record.flashPromotionId,jdbcType=INTEGER},
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
pic = #{record.pic,jdbcType=VARCHAR},
|
||||
product_sn = #{record.productSn,jdbcType=VARCHAR},
|
||||
@@ -675,9 +627,6 @@
|
||||
note = #{record.note,jdbcType=VARCHAR},
|
||||
album_pics = #{record.albumPics,jdbcType=VARCHAR},
|
||||
detail_title = #{record.detailTitle,jdbcType=VARCHAR},
|
||||
flash_promotion_price = #{record.flashPromotionPrice,jdbcType=DECIMAL},
|
||||
flash_promotion_count = #{record.flashPromotionCount,jdbcType=INTEGER},
|
||||
flash_promotion_sort = #{record.flashPromotionSort,jdbcType=INTEGER},
|
||||
promotion_start_time = #{record.promotionStartTime,jdbcType=TIMESTAMP},
|
||||
promotion_end_time = #{record.promotionEndTime,jdbcType=TIMESTAMP},
|
||||
promotion_per_limit = #{record.promotionPerLimit,jdbcType=INTEGER},
|
||||
@@ -699,7 +648,6 @@
|
||||
product_category_id = #{record.productCategoryId,jdbcType=BIGINT},
|
||||
feight_template_id = #{record.feightTemplateId,jdbcType=BIGINT},
|
||||
product_attribute_category_id = #{record.productAttributeCategoryId,jdbcType=BIGINT},
|
||||
flash_promotion_id = #{record.flashPromotionId,jdbcType=INTEGER},
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
pic = #{record.pic,jdbcType=VARCHAR},
|
||||
product_sn = #{record.productSn,jdbcType=VARCHAR},
|
||||
@@ -727,9 +675,6 @@
|
||||
note = #{record.note,jdbcType=VARCHAR},
|
||||
album_pics = #{record.albumPics,jdbcType=VARCHAR},
|
||||
detail_title = #{record.detailTitle,jdbcType=VARCHAR},
|
||||
flash_promotion_price = #{record.flashPromotionPrice,jdbcType=DECIMAL},
|
||||
flash_promotion_count = #{record.flashPromotionCount,jdbcType=INTEGER},
|
||||
flash_promotion_sort = #{record.flashPromotionSort,jdbcType=INTEGER},
|
||||
promotion_start_time = #{record.promotionStartTime,jdbcType=TIMESTAMP},
|
||||
promotion_end_time = #{record.promotionEndTime,jdbcType=TIMESTAMP},
|
||||
promotion_per_limit = #{record.promotionPerLimit,jdbcType=INTEGER},
|
||||
@@ -755,9 +700,6 @@
|
||||
<if test="productAttributeCategoryId != null">
|
||||
product_attribute_category_id = #{productAttributeCategoryId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="flashPromotionId != null">
|
||||
flash_promotion_id = #{flashPromotionId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@@ -839,15 +781,6 @@
|
||||
<if test="detailTitle != null">
|
||||
detail_title = #{detailTitle,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="flashPromotionPrice != null">
|
||||
flash_promotion_price = #{flashPromotionPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="flashPromotionCount != null">
|
||||
flash_promotion_count = #{flashPromotionCount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="flashPromotionSort != null">
|
||||
flash_promotion_sort = #{flashPromotionSort,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="promotionStartTime != null">
|
||||
promotion_start_time = #{promotionStartTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
@@ -887,7 +820,6 @@
|
||||
product_category_id = #{productCategoryId,jdbcType=BIGINT},
|
||||
feight_template_id = #{feightTemplateId,jdbcType=BIGINT},
|
||||
product_attribute_category_id = #{productAttributeCategoryId,jdbcType=BIGINT},
|
||||
flash_promotion_id = #{flashPromotionId,jdbcType=INTEGER},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
pic = #{pic,jdbcType=VARCHAR},
|
||||
product_sn = #{productSn,jdbcType=VARCHAR},
|
||||
@@ -915,9 +847,6 @@
|
||||
note = #{note,jdbcType=VARCHAR},
|
||||
album_pics = #{albumPics,jdbcType=VARCHAR},
|
||||
detail_title = #{detailTitle,jdbcType=VARCHAR},
|
||||
flash_promotion_price = #{flashPromotionPrice,jdbcType=DECIMAL},
|
||||
flash_promotion_count = #{flashPromotionCount,jdbcType=INTEGER},
|
||||
flash_promotion_sort = #{flashPromotionSort,jdbcType=INTEGER},
|
||||
promotion_start_time = #{promotionStartTime,jdbcType=TIMESTAMP},
|
||||
promotion_end_time = #{promotionEndTime,jdbcType=TIMESTAMP},
|
||||
promotion_per_limit = #{promotionPerLimit,jdbcType=INTEGER},
|
||||
@@ -936,7 +865,6 @@
|
||||
product_category_id = #{productCategoryId,jdbcType=BIGINT},
|
||||
feight_template_id = #{feightTemplateId,jdbcType=BIGINT},
|
||||
product_attribute_category_id = #{productAttributeCategoryId,jdbcType=BIGINT},
|
||||
flash_promotion_id = #{flashPromotionId,jdbcType=INTEGER},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
pic = #{pic,jdbcType=VARCHAR},
|
||||
product_sn = #{productSn,jdbcType=VARCHAR},
|
||||
@@ -964,9 +892,6 @@
|
||||
note = #{note,jdbcType=VARCHAR},
|
||||
album_pics = #{albumPics,jdbcType=VARCHAR},
|
||||
detail_title = #{detailTitle,jdbcType=VARCHAR},
|
||||
flash_promotion_price = #{flashPromotionPrice,jdbcType=DECIMAL},
|
||||
flash_promotion_count = #{flashPromotionCount,jdbcType=INTEGER},
|
||||
flash_promotion_sort = #{flashPromotionSort,jdbcType=INTEGER},
|
||||
promotion_start_time = #{promotionStartTime,jdbcType=TIMESTAMP},
|
||||
promotion_end_time = #{promotionEndTime,jdbcType=TIMESTAMP},
|
||||
promotion_per_limit = #{promotionPerLimit,jdbcType=INTEGER},
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.macro.mall.mapper.SmsFlashPromotionMapper">
|
||||
<resultMap id="BaseResultMap" type="com.macro.mall.model.SmsFlashPromotion">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="title" jdbcType="VARCHAR" property="title" />
|
||||
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
|
||||
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
|
||||
<result column="start_date" jdbcType="DATE" property="startDate" />
|
||||
<result column="end_date" jdbcType="DATE" property="endDate" />
|
||||
<result column="status" jdbcType="INTEGER" property="status" />
|
||||
<result column="time_name" jdbcType="VARCHAR" property="timeName" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
@@ -68,7 +68,7 @@
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, title, start_time, end_time, status, time_name
|
||||
id, title, start_date, end_date, status, create_time
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.macro.mall.model.SmsFlashPromotionExample" resultMap="BaseResultMap">
|
||||
select
|
||||
@@ -84,15 +84,15 @@
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from sms_flash_promotion
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from sms_flash_promotion
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.macro.mall.model.SmsFlashPromotionExample">
|
||||
delete from sms_flash_promotion
|
||||
@@ -101,16 +101,16 @@
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.macro.mall.model.SmsFlashPromotion">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into sms_flash_promotion (title, start_time, end_time,
|
||||
status, time_name)
|
||||
values (#{title,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
|
||||
#{status,jdbcType=INTEGER}, #{timeName,jdbcType=VARCHAR})
|
||||
insert into sms_flash_promotion (title, start_date, end_date,
|
||||
status, create_time)
|
||||
values (#{title,jdbcType=VARCHAR}, #{startDate,jdbcType=DATE}, #{endDate,jdbcType=DATE},
|
||||
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.macro.mall.model.SmsFlashPromotion">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into sms_flash_promotion
|
||||
@@ -118,34 +118,34 @@
|
||||
<if test="title != null">
|
||||
title,
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
start_time,
|
||||
<if test="startDate != null">
|
||||
start_date,
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
end_time,
|
||||
<if test="endDate != null">
|
||||
end_date,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="timeName != null">
|
||||
time_name,
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="title != null">
|
||||
#{title,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
#{startTime,jdbcType=TIMESTAMP},
|
||||
<if test="startDate != null">
|
||||
#{startDate,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
#{endTime,jdbcType=TIMESTAMP},
|
||||
<if test="endDate != null">
|
||||
#{endDate,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="timeName != null">
|
||||
#{timeName,jdbcType=VARCHAR},
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
@@ -159,22 +159,22 @@
|
||||
update sms_flash_promotion
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=INTEGER},
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.title != null">
|
||||
title = #{record.title,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.startTime != null">
|
||||
start_time = #{record.startTime,jdbcType=TIMESTAMP},
|
||||
<if test="record.startDate != null">
|
||||
start_date = #{record.startDate,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="record.endTime != null">
|
||||
end_time = #{record.endTime,jdbcType=TIMESTAMP},
|
||||
<if test="record.endDate != null">
|
||||
end_date = #{record.endDate,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
status = #{record.status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.timeName != null">
|
||||
time_name = #{record.timeName,jdbcType=VARCHAR},
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
@@ -183,12 +183,12 @@
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update sms_flash_promotion
|
||||
set id = #{record.id,jdbcType=INTEGER},
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
title = #{record.title,jdbcType=VARCHAR},
|
||||
start_time = #{record.startTime,jdbcType=TIMESTAMP},
|
||||
end_time = #{record.endTime,jdbcType=TIMESTAMP},
|
||||
start_date = #{record.startDate,jdbcType=DATE},
|
||||
end_date = #{record.endDate,jdbcType=DATE},
|
||||
status = #{record.status,jdbcType=INTEGER},
|
||||
time_name = #{record.timeName,jdbcType=VARCHAR}
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
@@ -199,28 +199,28 @@
|
||||
<if test="title != null">
|
||||
title = #{title,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
start_time = #{startTime,jdbcType=TIMESTAMP},
|
||||
<if test="startDate != null">
|
||||
start_date = #{startDate,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
end_time = #{endTime,jdbcType=TIMESTAMP},
|
||||
<if test="endDate != null">
|
||||
end_date = #{endDate,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="timeName != null">
|
||||
time_name = #{timeName,jdbcType=VARCHAR},
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.macro.mall.model.SmsFlashPromotion">
|
||||
update sms_flash_promotion
|
||||
set title = #{title,jdbcType=VARCHAR},
|
||||
start_time = #{startTime,jdbcType=TIMESTAMP},
|
||||
end_time = #{endTime,jdbcType=TIMESTAMP},
|
||||
start_date = #{startDate,jdbcType=DATE},
|
||||
end_date = #{endDate,jdbcType=DATE},
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
time_name = #{timeName,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,259 @@
|
||||
<?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.macro.mall.mapper.SmsFlashPromotionProductRelationMapper">
|
||||
<resultMap id="BaseResultMap" type="com.macro.mall.model.SmsFlashPromotionProductRelation">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="flash_promotion_id" jdbcType="BIGINT" property="flashPromotionId" />
|
||||
<result column="flash_promotion_session_id" jdbcType="BIGINT" property="flashPromotionSessionId" />
|
||||
<result column="product_id" jdbcType="BIGINT" property="productId" />
|
||||
<result column="flash_promotion_price" jdbcType="DECIMAL" property="flashPromotionPrice" />
|
||||
<result column="flash_promotion_count" jdbcType="INTEGER" property="flashPromotionCount" />
|
||||
<result column="flash_promotion_limit" jdbcType="INTEGER" property="flashPromotionLimit" />
|
||||
<result column="sort" jdbcType="INTEGER" property="sort" />
|
||||
</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, flash_promotion_id, flash_promotion_session_id, product_id, flash_promotion_price,
|
||||
flash_promotion_count, flash_promotion_limit, sort
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.macro.mall.model.SmsFlashPromotionProductRelationExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from sms_flash_promotion_product_relation
|
||||
<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.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from sms_flash_promotion_product_relation
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from sms_flash_promotion_product_relation
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.macro.mall.model.SmsFlashPromotionProductRelationExample">
|
||||
delete from sms_flash_promotion_product_relation
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.macro.mall.model.SmsFlashPromotionProductRelation">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into sms_flash_promotion_product_relation (flash_promotion_id, flash_promotion_session_id,
|
||||
product_id, flash_promotion_price, flash_promotion_count,
|
||||
flash_promotion_limit, sort)
|
||||
values (#{flashPromotionId,jdbcType=BIGINT}, #{flashPromotionSessionId,jdbcType=BIGINT},
|
||||
#{productId,jdbcType=BIGINT}, #{flashPromotionPrice,jdbcType=DECIMAL}, #{flashPromotionCount,jdbcType=INTEGER},
|
||||
#{flashPromotionLimit,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.macro.mall.model.SmsFlashPromotionProductRelation">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into sms_flash_promotion_product_relation
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="flashPromotionId != null">
|
||||
flash_promotion_id,
|
||||
</if>
|
||||
<if test="flashPromotionSessionId != null">
|
||||
flash_promotion_session_id,
|
||||
</if>
|
||||
<if test="productId != null">
|
||||
product_id,
|
||||
</if>
|
||||
<if test="flashPromotionPrice != null">
|
||||
flash_promotion_price,
|
||||
</if>
|
||||
<if test="flashPromotionCount != null">
|
||||
flash_promotion_count,
|
||||
</if>
|
||||
<if test="flashPromotionLimit != null">
|
||||
flash_promotion_limit,
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
sort,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="flashPromotionId != null">
|
||||
#{flashPromotionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="flashPromotionSessionId != null">
|
||||
#{flashPromotionSessionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="productId != null">
|
||||
#{productId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="flashPromotionPrice != null">
|
||||
#{flashPromotionPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="flashPromotionCount != null">
|
||||
#{flashPromotionCount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="flashPromotionLimit != null">
|
||||
#{flashPromotionLimit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
#{sort,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.macro.mall.model.SmsFlashPromotionProductRelationExample" resultType="java.lang.Integer">
|
||||
select count(*) from sms_flash_promotion_product_relation
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update sms_flash_promotion_product_relation
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.flashPromotionId != null">
|
||||
flash_promotion_id = #{record.flashPromotionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.flashPromotionSessionId != null">
|
||||
flash_promotion_session_id = #{record.flashPromotionSessionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.productId != null">
|
||||
product_id = #{record.productId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.flashPromotionPrice != null">
|
||||
flash_promotion_price = #{record.flashPromotionPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="record.flashPromotionCount != null">
|
||||
flash_promotion_count = #{record.flashPromotionCount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.flashPromotionLimit != null">
|
||||
flash_promotion_limit = #{record.flashPromotionLimit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.sort != null">
|
||||
sort = #{record.sort,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update sms_flash_promotion_product_relation
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
flash_promotion_id = #{record.flashPromotionId,jdbcType=BIGINT},
|
||||
flash_promotion_session_id = #{record.flashPromotionSessionId,jdbcType=BIGINT},
|
||||
product_id = #{record.productId,jdbcType=BIGINT},
|
||||
flash_promotion_price = #{record.flashPromotionPrice,jdbcType=DECIMAL},
|
||||
flash_promotion_count = #{record.flashPromotionCount,jdbcType=INTEGER},
|
||||
flash_promotion_limit = #{record.flashPromotionLimit,jdbcType=INTEGER},
|
||||
sort = #{record.sort,jdbcType=INTEGER}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.macro.mall.model.SmsFlashPromotionProductRelation">
|
||||
update sms_flash_promotion_product_relation
|
||||
<set>
|
||||
<if test="flashPromotionId != null">
|
||||
flash_promotion_id = #{flashPromotionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="flashPromotionSessionId != null">
|
||||
flash_promotion_session_id = #{flashPromotionSessionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="productId != null">
|
||||
product_id = #{productId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="flashPromotionPrice != null">
|
||||
flash_promotion_price = #{flashPromotionPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="flashPromotionCount != null">
|
||||
flash_promotion_count = #{flashPromotionCount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="flashPromotionLimit != null">
|
||||
flash_promotion_limit = #{flashPromotionLimit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
sort = #{sort,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.macro.mall.model.SmsFlashPromotionProductRelation">
|
||||
update sms_flash_promotion_product_relation
|
||||
set flash_promotion_id = #{flashPromotionId,jdbcType=BIGINT},
|
||||
flash_promotion_session_id = #{flashPromotionSessionId,jdbcType=BIGINT},
|
||||
product_id = #{productId,jdbcType=BIGINT},
|
||||
flash_promotion_price = #{flashPromotionPrice,jdbcType=DECIMAL},
|
||||
flash_promotion_count = #{flashPromotionCount,jdbcType=INTEGER},
|
||||
flash_promotion_limit = #{flashPromotionLimit,jdbcType=INTEGER},
|
||||
sort = #{sort,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,226 @@
|
||||
<?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.macro.mall.mapper.SmsFlashPromotionSessionMapper">
|
||||
<resultMap id="BaseResultMap" type="com.macro.mall.model.SmsFlashPromotionSession">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="start_time" jdbcType="TIME" property="startTime" />
|
||||
<result column="end_time" jdbcType="TIME" property="endTime" />
|
||||
<result column="status" jdbcType="INTEGER" property="status" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</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, name, start_time, end_time, status, create_time
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.macro.mall.model.SmsFlashPromotionSessionExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from sms_flash_promotion_session
|
||||
<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.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from sms_flash_promotion_session
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from sms_flash_promotion_session
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.macro.mall.model.SmsFlashPromotionSessionExample">
|
||||
delete from sms_flash_promotion_session
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.macro.mall.model.SmsFlashPromotionSession">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into sms_flash_promotion_session (name, start_time, end_time,
|
||||
status, create_time)
|
||||
values (#{name,jdbcType=VARCHAR}, #{startTime,jdbcType=TIME}, #{endTime,jdbcType=TIME},
|
||||
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.macro.mall.model.SmsFlashPromotionSession">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into sms_flash_promotion_session
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
start_time,
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
end_time,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
#{startTime,jdbcType=TIME},
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
#{endTime,jdbcType=TIME},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.macro.mall.model.SmsFlashPromotionSessionExample" resultType="java.lang.Integer">
|
||||
select count(*) from sms_flash_promotion_session
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update sms_flash_promotion_session
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.startTime != null">
|
||||
start_time = #{record.startTime,jdbcType=TIME},
|
||||
</if>
|
||||
<if test="record.endTime != null">
|
||||
end_time = #{record.endTime,jdbcType=TIME},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
status = #{record.status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update sms_flash_promotion_session
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
start_time = #{record.startTime,jdbcType=TIME},
|
||||
end_time = #{record.endTime,jdbcType=TIME},
|
||||
status = #{record.status,jdbcType=INTEGER},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.macro.mall.model.SmsFlashPromotionSession">
|
||||
update sms_flash_promotion_session
|
||||
<set>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
start_time = #{startTime,jdbcType=TIME},
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
end_time = #{endTime,jdbcType=TIME},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.macro.mall.model.SmsFlashPromotionSession">
|
||||
update sms_flash_promotion_session
|
||||
set name = #{name,jdbcType=VARCHAR},
|
||||
start_time = #{startTime,jdbcType=TIME},
|
||||
end_time = #{endTime,jdbcType=TIME},
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user