Browse Source

菜品mapper代码回滚

zhangchen 1 week ago
parent
commit
f8341653c9
1 changed files with 13 additions and 0 deletions
  1. 13 0
      alien-entity/src/main/java/shop/alien/mapper/StoreMenuMapper.java

+ 13 - 0
alien-entity/src/main/java/shop/alien/mapper/StoreMenuMapper.java

@@ -33,6 +33,19 @@ public interface StoreMenuMapper extends BaseMapper<StoreMenu> {
             "and (if(#{dishMenuType} is null, 1 = 1, a.dish_menu_type = #{dishMenuType}))")
     List<StoreMenuVo> getStoreMenuList(@Param("storeId") Integer storeId, @Param("dishType") Integer dishType, @Param("dishMenuType") Integer dishMenuType);
 
+    /**
+     * 获取菜单
+     *
+     * @param storeId  门店id
+     * @param dishType 菜品类型, 0:菜单, 1:推荐
+     * @return List<StoreMenuVo>
+     */
+    //"图片类型, 0:其他, 1:入口图, 2:相册, 3:菜品, 4:环境, 5:价目表, 6:推荐菜, 7:菜单, 8:用户评论, 9:商家申诉, 10:商家头像, 11:店铺轮播图"
+    @Select("select a.*, b.img_url, b.img_sort, b.img_description from store_menu a " +
+            "left join store_img b on a.img_id = b.id where a.delete_flag = 0 and b.delete_flag = 0 " +
+            "and a.store_id = #{storeId} AND (if(#{dishType} is null, 1 = 1, a.dish_type = #{dishType}))")
+    List<StoreMenuVo> getStoreMenuList(@Param("storeId") Integer storeId, @Param("dishType") Integer dishType);
+
     @Select("select a.*, b.img_url, b.img_sort, b.img_description from store_menu a " +
             "left join store_img b on a.img_id = b.id where a.delete_flag = 0 and b.delete_flag = 0 " +
             "and a.id = #{id}")