小程序主页接口修改

This commit is contained in:
张松
2025-03-10 17:30:41 +08:00
parent 7c374f46a5
commit 9893d5ecb0
3 changed files with 4 additions and 3 deletions

View File

@@ -3,6 +3,7 @@ package com.czg.account.vo.home;
import com.czg.account.entity.PlatformDict; import com.czg.account.entity.PlatformDict;
import com.czg.account.entity.SysDict; import com.czg.account.entity.SysDict;
import com.czg.product.entity.Product; import com.czg.product.entity.Product;
import com.czg.product.vo.RecommendProVO;
import lombok.Data; import lombok.Data;
import java.util.List; import java.util.List;
@@ -32,7 +33,7 @@ public class HomePageVO {
/** /**
* 今日上新商品信息 * 今日上新商品信息
*/ */
private List<Product> todayProInfo; private List<RecommendProVO> todayProInfo;
/** /**
* 菜单列表 * 菜单列表

View File

@@ -43,6 +43,6 @@ public interface ProductMapper extends BaseMapper<Product> {
@Param("classify") Integer classify, @Param("orderType") Integer orderType, @Param("classify") Integer classify, @Param("orderType") Integer orderType,
@Param("distanceType") Integer distanceType, @Param("name") String name); @Param("distanceType") Integer distanceType, @Param("name") String name);
List<Product> getTodayProInfo(); List<RecommendProVO> getTodayProInfo();
} }

View File

@@ -199,7 +199,7 @@
</if> </if>
</select> </select>
<select id="getTodayProInfo" resultType="com.czg.product.entity.Product"> <select id="getTodayProInfo" resultType="com.czg.product.vo.RecommendProVO">
select 1000 AS distance, select 1000 AS distance,
c.name, a.origin_price, a.sale_price, b.shop_name, b.districts, c.cover_img, b.logo, c.id, c.name, a.origin_price, a.sale_price, b.shop_name, b.districts, c.cover_img, b.logo, c.id,
a.real_sales_number saleNum, round(a.sale_price / a.origin_price, 2) discount, a.real_sales_number saleNum, round(a.sale_price / a.origin_price, 2) discount,