|
|
@@ -5,7 +5,7 @@
|
|
|
<mapper namespace="com.poyee.mapper.SpuCategoryMapper">
|
|
|
|
|
|
<sql id="spuCategoryQuery">
|
|
|
- select id,category_name categoryName,is_cascade isCascade, sub_label subLabel,sort,parent_id parentId from spu_category
|
|
|
+ select id,category_name categoryName,is_cascade isCascade, sub_label subLabel,sort,parent_id parentId,icon_url iconUrl,status,create_time createTime,update_time updateTime from spu_category
|
|
|
</sql>
|
|
|
<select id="querySpuCategory" resultType="spuCategoryDto">
|
|
|
<include refid="spuCategoryQuery"></include>
|
|
|
@@ -17,8 +17,8 @@
|
|
|
</where>
|
|
|
</select>
|
|
|
<insert id="createCategory" parameterType="com.poyee.domain.SpuCategory">
|
|
|
- insert into spu_category (category_name,is_cascade,sub_label,sort,parent_id)
|
|
|
- values (#{categoryName},#{isCascade},#{subLabel},#{sort},#{parentId})
|
|
|
+ insert into spu_category (category_name,is_cascade,sub_label,sort,parent_id,icon_url,status,create_time,update_time)
|
|
|
+ values (#{categoryName},#{isCascade},#{subLabel},#{sort},#{parentId},#{iconUrl},#{status},#{createTime},#{updateTime})
|
|
|
</insert>
|
|
|
|
|
|
<update id="updateCategory">
|
|
|
@@ -39,6 +39,15 @@
|
|
|
<if test="parentId!=null">
|
|
|
parent_id=#{parentId},
|
|
|
</if>
|
|
|
+ <if test="iconUrl!=null and iconUrl!=''">
|
|
|
+ icon_url=#{iconUrl},
|
|
|
+ </if>
|
|
|
+ <if test="status!=null">
|
|
|
+ status=#{status},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime!=null">
|
|
|
+ update_time=#{updateTime},
|
|
|
+ </if>
|
|
|
|
|
|
</trim>
|
|
|
where id=#{id}
|