小程序主页接口修改
This commit is contained in:
parent
643cbccae9
commit
80e958d9ba
|
|
@ -33,7 +33,7 @@ public class HomePageVO {
|
||||||
/**
|
/**
|
||||||
* 今日上新商品信息
|
* 今日上新商品信息
|
||||||
*/
|
*/
|
||||||
private List<RecommendProVO> todayProInfo;
|
private HotRankingVO todayProInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 菜单列表
|
* 菜单列表
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ public class RecommendProVO {
|
||||||
/**
|
/**
|
||||||
* 折扣
|
* 折扣
|
||||||
*/
|
*/
|
||||||
private float discount;
|
private Integer discount;
|
||||||
@Column(ignore = true)
|
@Column(ignore = true)
|
||||||
private Long endTime = 1741391999999L;
|
private Long endTime = 1741391999999L;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,11 @@ public class HomePageServiceImpl implements HomePageService {
|
||||||
}
|
}
|
||||||
homeUpVO.setMenuList(sysDictList);
|
homeUpVO.setMenuList(sysDictList);
|
||||||
|
|
||||||
homeUpVO.setTodayProInfo(productMapper.getTodayProInfo());
|
HotRankingVO tody = new HotRankingVO();
|
||||||
|
tody.setHotList(productMapper.getTodayProInfo());
|
||||||
|
tody.setName("今日上线");
|
||||||
|
tody.setDate("十点更新");
|
||||||
|
homeUpVO.setTodayProInfo(hotRankingVO);
|
||||||
|
|
||||||
return homeUpVO;
|
return homeUpVO;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,7 @@
|
||||||
|
|
||||||
<select id="selectCouponProBySaleNum" resultType="com.czg.product.vo.RecommendProVO">
|
<select id="selectCouponProBySaleNum" resultType="com.czg.product.vo.RecommendProVO">
|
||||||
SELECT a.name, b.origin_price, b.sale_price, a.cover_img, a.id,
|
SELECT a.name, b.origin_price, b.sale_price, a.cover_img, a.id,
|
||||||
b.real_sales_number saleNum, round(b.sale_price / b.origin_price, 2) discount
|
b.real_sales_number saleNum, round(b.sale_price / b.origin_price, 2) * 10 discount
|
||||||
FROM tb_product AS a
|
FROM tb_product AS a
|
||||||
LEFT JOIN tb_prod_sku AS b ON a.id = b.product_id
|
LEFT JOIN tb_prod_sku AS b ON a.id = b.product_id
|
||||||
WHERE a.type = 'coupon'
|
WHERE a.type = 'coupon'
|
||||||
|
|
@ -166,7 +166,7 @@
|
||||||
select ROUND(
|
select ROUND(
|
||||||
ST_Distance_Sphere(POINT(b.lng, b.lat), POINT(#{lng}, #{lat})) / 1000, 2) AS distance,
|
ST_Distance_Sphere(POINT(b.lng, b.lat), POINT(#{lng}, #{lat})) / 1000, 2) 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) * 10 discount,
|
||||||
c.id productId, a.id skuId, b.id shopId
|
c.id productId, a.id skuId, b.id shopId
|
||||||
from tb_prod_sku as a
|
from tb_prod_sku as a
|
||||||
left join tb_product c on c.id=a.product_id
|
left join tb_product c on c.id=a.product_id
|
||||||
|
|
@ -204,7 +204,7 @@
|
||||||
<select id="getTodayProInfo" resultType="com.czg.product.vo.RecommendProVO">
|
<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) * 10 discount,
|
||||||
c.id productId, a.id skuId, b.id shopId
|
c.id productId, a.id skuId, b.id shopId
|
||||||
from tb_prod_sku as a
|
from tb_prod_sku as a
|
||||||
left join tb_product c on c.id=a.product_id
|
left join tb_product c on c.id=a.product_id
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue