瀏覽代碼

feat: 添加明星产品和今日折扣

xdd 1 月之前
父節點
當前提交
0f8ee872c7

+ 9 - 9
fs-service-system/src/main/java/com/fs/store/mapper/FsStoreProductRelationMapper.java

@@ -10,15 +10,15 @@ import org.apache.ibatis.annotations.Select;
 
 /**
  * 商品点赞和收藏Mapper接口
- * 
+ *
  * @author fs
  * @date 2022-03-15
  */
-public interface FsStoreProductRelationMapper 
+public interface FsStoreProductRelationMapper
 {
     /**
      * 查询商品点赞和收藏
-     * 
+     *
      * @param id 商品点赞和收藏ID
      * @return 商品点赞和收藏
      */
@@ -26,7 +26,7 @@ public interface FsStoreProductRelationMapper
 
     /**
      * 查询商品点赞和收藏列表
-     * 
+     *
      * @param fsStoreProductRelation 商品点赞和收藏
      * @return 商品点赞和收藏集合
      */
@@ -34,7 +34,7 @@ public interface FsStoreProductRelationMapper
 
     /**
      * 新增商品点赞和收藏
-     * 
+     *
      * @param fsStoreProductRelation 商品点赞和收藏
      * @return 结果
      */
@@ -42,7 +42,7 @@ public interface FsStoreProductRelationMapper
 
     /**
      * 修改商品点赞和收藏
-     * 
+     *
      * @param fsStoreProductRelation 商品点赞和收藏
      * @return 结果
      */
@@ -50,7 +50,7 @@ public interface FsStoreProductRelationMapper
 
     /**
      * 删除商品点赞和收藏
-     * 
+     *
      * @param id 商品点赞和收藏ID
      * @return 结果
      */
@@ -58,7 +58,7 @@ public interface FsStoreProductRelationMapper
 
     /**
      * 批量删除商品点赞和收藏
-     * 
+     *
      * @param ids 需要删除的数据ID
      * @return 结果
      */
@@ -76,7 +76,7 @@ public interface FsStoreProductRelationMapper
             "</script>"})
     List<FsStoreProductRelationQueryVO> selectFsStoreProductRelationListVOQuery(@Param("maps") FsStoreProductRelationQueryParam param);
     @Select({"<script> " +
-            "select p.image,p.product_name,p.price,r.*,u.nickname,u.phone   from fs_store_product_relation r left join  fs_store_product p  on p.product_id=r.product_id left join fs_user u on u.user_id=r.user_id   " +
+            "select p.image,p.product_name,p.price,r.*,u.nickname,u.phone   from fs_store_product_relation r inner join  fs_store_product p  on p.product_id=r.product_id inner join fs_user u on u.user_id=r.user_id   " +
             "where r.is_del=0 " +
             "<if test = 'maps.userId != null    '> " +
             "and r.user_id =#{maps.userId} " +

+ 2 - 2
fs-service-system/src/main/resources/mapper/store/FsStoreProductMapper.xml

@@ -256,8 +256,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="tuiCateId != null">tui_cate_id = #{tuiCateId},</if>
             <if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
             <if test="warehouseCode != null">warehouse_code = #{warehouseCode},</if>
-            <if test="isStar">is_star = #{isStar},</if>
-            <if test="isDiscountToday">is_discount_today = #{isDiscountToday},</if>
+            <if test="isStar != null">is_star = #{isStar},</if>
+            <if test="isDiscountToday != null">is_discount_today = #{isDiscountToday},</if>
         </trim>
         where product_id = #{productId}
     </update>