|
@@ -41,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="isShow != null "> and is_show = #{isShow}</if>
|
|
<if test="isShow != null "> and is_show = #{isShow}</if>
|
|
|
<if test="sales != null "> and sales = #{sales}</if>
|
|
<if test="sales != null "> and sales = #{sales}</if>
|
|
|
</where>
|
|
</where>
|
|
|
|
|
+ order by sort
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectLiveGoodsByGoodsId" parameterType="Long" resultMap="LiveGoodsResult">
|
|
<select id="selectLiveGoodsByGoodsId" parameterType="Long" resultMap="LiveGoodsResult">
|
|
@@ -170,7 +171,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
<select id="selectProductListByLiveId" parameterType="LiveGoods" resultType="com.fs.live.vo.LiveGoodsVo">
|
|
<select id="selectProductListByLiveId" parameterType="LiveGoods" resultType="com.fs.live.vo.LiveGoodsVo">
|
|
|
|
|
|
|
|
- select lg.goods_id,sp.image as img_url,sp.product_name,sp.price,sp.stock,lg.sales,lg.status,sp.product_id,sp.ot_price,case when lg.is_show = 1 then true else false end as is_show
|
|
|
|
|
|
|
+ select lg.goods_id,lg.sort ,sp.image as img_url,sp.product_name,sp.price,sp.stock,lg.sales,lg.status,sp.product_id,sp.ot_price,case when lg.is_show = 1 then true else false end as is_show
|
|
|
<if test="companyUserId != null "> ,if(uf.favorite_id is not null, true, false) is_favorite </if>
|
|
<if test="companyUserId != null "> ,if(uf.favorite_id is not null, true, false) is_favorite </if>
|
|
|
|
|
|
|
|
from live_goods lg
|
|
from live_goods lg
|
|
@@ -193,11 +194,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
and sp.product_name like concat('%',#{keywords},'%')
|
|
and sp.product_name like concat('%',#{keywords},'%')
|
|
|
</if>
|
|
</if>
|
|
|
</where>
|
|
</where>
|
|
|
|
|
+
|
|
|
|
|
+ order by lg.sort
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectProductListByLiveIdAll" parameterType="LiveGoods" resultType="com.fs.live.vo.LiveGoodsVo">
|
|
<select id="selectProductListByLiveIdAll" parameterType="LiveGoods" resultType="com.fs.live.vo.LiveGoodsVo">
|
|
|
|
|
|
|
|
- select lg.goods_id,sp.image as img_url,sp.product_name,sp.price,lg.stock,lg.sales,lg.status,sp.product_id,sp.ot_price,case when lg.is_show = 1 then true else false end as is_show,sp.is_show as fs_status
|
|
|
|
|
|
|
+ select lg.goods_id,lg.sort,sp.image as img_url,sp.product_name,sp.price,lg.stock,lg.sales,lg.status,sp.product_id,sp.ot_price,case when lg.is_show = 1 then true else false end as is_show,sp.is_show as fs_status
|
|
|
from live_goods lg
|
|
from live_goods lg
|
|
|
left join fs_store_product sp
|
|
left join fs_store_product sp
|
|
|
ON lg.product_id = sp.product_id
|
|
ON lg.product_id = sp.product_id
|
|
@@ -213,6 +216,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
and sp.product_name like concat('%',#{keywords},'%')
|
|
and sp.product_name like concat('%',#{keywords},'%')
|
|
|
</if>
|
|
</if>
|
|
|
</where>
|
|
</where>
|
|
|
|
|
+ order by lg.sort
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectLiveGoodsVoByGoodsId" resultType="com.fs.live.vo.LiveGoodsVo">
|
|
<select id="selectLiveGoodsVoByGoodsId" resultType="com.fs.live.vo.LiveGoodsVo">
|
|
@@ -276,6 +280,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
where g.status = 1
|
|
where g.status = 1
|
|
|
<if test="params.productName != null "> and p.product_name like concat('%',#{params.productName},'%')</if>
|
|
<if test="params.productName != null "> and p.product_name like concat('%',#{params.productName},'%')</if>
|
|
|
<if test="params.liveId != null "> and g.live_id = #{params.liveId}</if>
|
|
<if test="params.liveId != null "> and g.live_id = #{params.liveId}</if>
|
|
|
|
|
+ order by g.sort
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<update id="handleShelfOrUnAdmin" parameterType="com.fs.live.vo.LiveGoodsListVo">
|
|
<update id="handleShelfOrUnAdmin" parameterType="com.fs.live.vo.LiveGoodsListVo">
|