1
This commit is contained in:
@@ -24,6 +24,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="brand" column="brand" />
|
||||
<result property="lastUsedTime" column="last_used_time"/>
|
||||
<result property="useCount" column="use_count" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="productStatus" column="product_status"/>
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
@@ -32,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select id, skuid, product_name, shop_name, shop_id, product_url, product_image,
|
||||
price, commission_info, is_top, sort_weight, remark, create_user_id,
|
||||
create_user_name, erp_product_ids, category, brand, last_used_time,
|
||||
use_count, create_time, update_time
|
||||
use_count, product_id, product_status, create_time, update_time
|
||||
from favorite_product
|
||||
</sql>
|
||||
|
||||
@@ -94,6 +96,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="brand != null and brand != ''">brand,</if>
|
||||
<if test="lastUsedTime != null and lastUsedTime != ''">last_used_time,</if>
|
||||
<if test="useCount != null">use_count,</if>
|
||||
<if test="productId != null and productId != ''">product_id,</if>
|
||||
<if test="productStatus != null">product_status,</if>
|
||||
create_time,
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
@@ -115,6 +119,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="brand != null and brand != ''">#{brand},</if>
|
||||
<if test="lastUsedTime != null and lastUsedTime != ''">#{lastUsedTime},</if>
|
||||
<if test="useCount != null">#{useCount},</if>
|
||||
<if test="productId != null and productId != ''">#{productId},</if>
|
||||
<if test="productStatus != null">#{productStatus},</if>
|
||||
sysdate(),
|
||||
</trim>
|
||||
</insert>
|
||||
@@ -140,6 +146,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="brand != null and brand != ''">brand = #{brand},</if>
|
||||
<if test="lastUsedTime != null and lastUsedTime != ''">last_used_time = #{lastUsedTime},</if>
|
||||
<if test="useCount != null">use_count = #{useCount},</if>
|
||||
<if test="productId != null and productId != ''">product_id = #{productId},</if>
|
||||
<if test="productStatus != null">product_status = #{productStatus},</if>
|
||||
update_time = sysdate(),
|
||||
</trim>
|
||||
where id = #{id}
|
||||
@@ -172,4 +180,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateProductInfo" parameterType="FavoriteProduct">
|
||||
update favorite_product
|
||||
set product_id = #{productId},
|
||||
product_status = #{productStatus},
|
||||
update_time = sysdate()
|
||||
where skuid = #{skuid}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user