提交 0fafc8c6 编写于 作者: N Nicky 提交者: u014427391

商品详情功能完善

上级 c3aef86c
......@@ -324,28 +324,28 @@
<!--商品说明右侧 开始-->
<div class="fl-l product_property">
<!--属性-->
<div class="pro_meta" th:each="i : ${itemDetail}">
<div class="pro_meta" >
<ul class="clearfix">
<li class="name border-b">
<span th:text="${i.itemName}">苹果(APPLE)iPhone 5s 16G版 3G手机(金色)WCDMA/GSM</span> <span class="span01">商品卖点显示在商品名称之后字体字
<span th:text="${itemDetail.itemName}">苹果(APPLE)iPhone 5s 16G版 3G手机(金色)WCDMA/GSM</span> <span class="span01">商品卖点显示在商品名称之后字体字
号粗细同商品名称,字体颜色为红色。卖点最多为50个字符。每行最多显示50字符,超出换行。</span>
</li>
<li>
<span class="sp_l">&nbsp;&nbsp;价:</span>
<div class="fl-l">
<del th:text="'¥'+${i.price}">¥</del>
<del th:text="'¥'+${itemDetail.price}">¥</del>
</div>
</li>
<li>
<span class="sp_l">&nbsp;&nbsp;价:</span>
<div class="fl-l">
<strong><em class="tb-rmb-num" th:text="'¥'+${i.promotionPrice}">¥3558</em></strong>
<strong><em class="tb-rmb-num" th:text="'¥'+${itemDetail.promotionPrice}">¥3558</em></strong>
</div>
</li>
<li>
<span class="sp_l">促销信息:</span>
<span class="sp_l">品牌信息:</span>
<div class="fl-l">
<span class="span02">促销优惠</span> <em class="em01">天翼专享优惠促销</em> <a class="to-detail" href="#">详情说明</a>
<span class="span02" th:text="${itemDetail.brandName}"></span> <a class="to-detail" href="#">详情说明</a>
</div>
</li>
<li>
......@@ -369,7 +369,7 @@
<li>
<span class="sp_l">库  存:</span>
<div class="fl-l">
<span>现货</span>
<span th:text="${itemDetail.stock}">现货</span>
</div>
</li>
</ul>
......@@ -389,7 +389,7 @@
<!--phone_key-->
<!--已选择-->
<div class="phone_choosed">
<span>此商品由 <a href="#" class="f-big f-orange1">上海万虎光大通信设备有限公司</a> 负责销售及发货</span>
<span>此商品由 <a href="#" class="f-big f-orange1" th:text="${itemDetail.shopName}"></a> 负责销售及发货</span>
<div class="add_btn"><a href="#" class="btn btn-red">立即购买</a><a href="#" class="btn btn-coffee">加入购物车</a>请移步购物车选择合约套餐</div>
</div>
<!--已选择-->
......
......@@ -21,6 +21,11 @@ public class ItemDetail {
*/
private String brandName;
/**
* 商铺名称
*/
private String shopName;
/**
* 商品名称
*/
......@@ -35,4 +40,14 @@ public class ItemDetail {
* 促销售价
*/
private long promotionPrice;
/**
* 图片路径
*/
private String imgPath;
/**
* 商品库存(SKU)
*/
private int stock;
}
......@@ -34,22 +34,29 @@
GROUP BY s.spu_id) sku
ON spu.id = sku.spu_id
</select>
<!-- 商品详情-->
<select id="getItemDetail" resultType="ItemDetail">
SELECT
itb.brand_name AS brandName,
s.shop_name AS shopName,
spu.item_name AS itemName,
sku.price,
sku.promotion_price AS promotionPrice
sku.promotion_price AS promotionPrice,
sku.img_path AS imgPath,
sku.stock
FROM
item_spu spu
RIGHT JOIN item_brand itb
ON itb.id = spu.brand_id
RIGHT JOIN shop_info s
ON s.id = spu.shop_id
LEFT JOIN
(SELECT
s.price,
s.promotion_price,
s.spu_id
s.spu_id,
s.img_path,
s.stock
FROM
item_sku s
GROUP BY s.spu_id) sku
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册