feat:增加搜索美食接口

This commit is contained in:
2026-02-12 17:26:37 +08:00
parent fb4ec4a50f
commit 1b56f33a02
5 changed files with 31 additions and 5 deletions

View File

@@ -119,6 +119,16 @@
ORDER BY a.create_time DESC
</select>
<select id="searchFoodSummary" resultMap="foodSummaryResultMap">
SELECT a.id AS id,
a.name AS name,
a.category AS category,
a.recommend_rate AS recommendRate
FROM food_recipe a
WHERE a.name = #{name}
ORDER BY a.create_time DESC
</select>
<select id="queryFoodStats" resultType="com.cxx.home.dto.food.FoodStatsDto">
SELECT COUNT(DISTINCT a.name) AS recipeCount,
COUNT(DISTINCT a.category) AS categoryCount,