...
|
...
|
@@ -22,6 +22,8 @@ |
|
|
<result column="key_words" jdbcType="VARCHAR" property="keyWords" />
|
|
|
<result column="del_status" jdbcType="INTEGER" property="delStatus" />
|
|
|
<result column="age_level" jdbcType="VARCHAR" property="ageLevel" />
|
|
|
<result column="is_syn_calender" jdbcType="INTEGER" property="isSynCalender" />
|
|
|
<result column="offer_price" jdbcType="DECIMAL" property="offerPrice" />
|
|
|
</resultMap>
|
|
|
|
|
|
<insert id="insert" parameterType="com.yoho.ufo.dal.model.Product" useGeneratedKeys="true" keyProperty="id" >
|
...
|
...
|
@@ -31,14 +33,15 @@ |
|
|
min_price, max_price, create_time,
|
|
|
update_time, shelve_time, edit_time,
|
|
|
shelve_status, storage, key_words,
|
|
|
del_status, age_level)
|
|
|
del_status, age_level, is_syn_calender, offer_price)
|
|
|
values (#{id,jdbcType=INTEGER}, #{productName,jdbcType=VARCHAR}, #{productCode,jdbcType=VARCHAR},
|
|
|
#{maxSortId,jdbcType=INTEGER}, #{midSortId,jdbcType=INTEGER}, #{brandId,jdbcType=INTEGER},
|
|
|
#{seriesId,jdbcType=INTEGER}, #{gender,jdbcType=CHAR}, #{saleTime,jdbcType=INTEGER},
|
|
|
#{minPrice,jdbcType=DECIMAL}, #{maxPrice,jdbcType=DECIMAL}, #{createTime,jdbcType=INTEGER},
|
|
|
#{updateTime,jdbcType=INTEGER}, #{shelveTime,jdbcType=INTEGER}, #{editTime,jdbcType=INTEGER},
|
|
|
#{shelveStatus,jdbcType=INTEGER}, #{storage,jdbcType=INTEGER}, #{keyWords,jdbcType=VARCHAR},
|
|
|
#{delStatus,jdbcType=INTEGER}, #{ageLevel,jdbcType=VARCHAR})
|
|
|
#{delStatus,jdbcType=INTEGER}, #{ageLevel,jdbcType=VARCHAR},
|
|
|
#{isSynCalender,jdbcType=INTEGER}, #{offerPrice,jdbcType=DECIMAL})
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.yoho.ufo.dal.model.Product">
|
|
|
update product
|
...
|
...
|
@@ -55,27 +58,29 @@ |
|
|
update_time = unix_timestamp(),
|
|
|
edit_time = unix_timestamp(),
|
|
|
age_level = #{ageLevel,jdbcType=VARCHAR},
|
|
|
key_words = #{keyWords,jdbcType=VARCHAR}
|
|
|
key_words = #{keyWords,jdbcType=VARCHAR},
|
|
|
is_syn_calender = #{isSynCalender,jdbcType=INTEGER},
|
|
|
offer_price = #{offerPrice,jdbcType=DECIMAL}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
select id, product_name, product_code, max_sort_id, mid_sort_id, brand_id, series_id,
|
|
|
gender, sale_time, min_price, max_price, create_time, update_time, shelve_time, edit_time,
|
|
|
shelve_status, storage, key_words, del_status, age_level
|
|
|
shelve_status, storage, key_words, del_status, age_level, is_syn_calender, offer_price
|
|
|
from product
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
<select id="selectAll" resultMap="BaseResultMap">
|
|
|
select id, product_name, product_code, max_sort_id, mid_sort_id, brand_id, series_id,
|
|
|
gender, sale_time, min_price, max_price, create_time, update_time, shelve_time, edit_time,
|
|
|
shelve_status, storage, key_words, del_status, age_level
|
|
|
shelve_status, storage, key_words, del_status, age_level, is_syn_calender, offer_price
|
|
|
from product
|
|
|
</select>
|
|
|
|
|
|
<select id="selectPage" resultMap="BaseResultMap">
|
|
|
select id, product_name, product_code, max_sort_id, mid_sort_id, brand_id, series_id,
|
|
|
gender, sale_time, min_price, max_price, create_time, update_time, shelve_time, edit_time,
|
|
|
shelve_status, storage, key_words, del_status, age_level
|
|
|
shelve_status, storage, key_words, del_status, age_level, is_syn_calender, offer_price
|
|
|
from product where del_status=0 <include refid="pageCondition" /> order by product.id desc limit #{start},#{rows}
|
|
|
</select>
|
|
|
<select id="selectCount" resultType="java.lang.Integer">
|
...
|
...
|
@@ -162,7 +167,7 @@ |
|
|
<select id="selectProductListByIds" resultMap="BaseResultMap">
|
|
|
select id, product_name, product_code, max_sort_id, mid_sort_id, brand_id, series_id,
|
|
|
gender, sale_time, min_price, max_price, create_time, update_time, shelve_time, edit_time,
|
|
|
shelve_status, storage, key_words, del_status, age_level
|
|
|
shelve_status, storage, key_words, del_status, age_level, is_syn_calender, offer_price
|
|
|
from product where id in
|
|
|
<foreach item="item" index="index" collection="productIdList" open="(" separator="," close=")">
|
|
|
#{item}
|
...
|
...
|
|