Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
smileNicky
taoshop
提交
0fafc8c6
T
taoshop
项目概览
smileNicky
/
taoshop
通知
4
Star
1
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
4
列表
看板
标记
里程碑
合并请求
2
Wiki
1
Wiki
分析
仓库
DevOps
项目成员
Pages
T
taoshop
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
4
Issue
4
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
1
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
0fafc8c6
编写于
7月 24, 2018
作者:
N
Nicky
提交者:
u014427391
7月 24, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
商品详情功能完善
上级
c3aef86c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
33 addition
and
11 deletion
+33
-11
src/taoshop-portal/src/main/resources/templates/item/item_detail.html
...portal/src/main/resources/templates/item/item_detail.html
+8
-8
src/taoshop-provider-api/taoshop-provider-api-item/src/main/java/com/muses/taoshop/item/entity/ItemDetail.java
...c/main/java/com/muses/taoshop/item/entity/ItemDetail.java
+15
-0
src/taoshop-provider/taoshop-provider-item/src/main/resources/mybatis/ItemMapper.xml
...p-provider-item/src/main/resources/mybatis/ItemMapper.xml
+10
-3
未找到文件。
src/taoshop-portal/src/main/resources/templates/item/item_detail.html
浏览文件 @
0fafc8c6
...
...
@@ -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=
"${i
temDetail
.itemName}"
>
苹果(APPLE)iPhone 5s 16G版 3G手机(金色)WCDMA/GSM
</span>
<span
class=
"span01"
>
商品卖点显示在商品名称之后字体字
号粗细同商品名称,字体颜色为红色。卖点最多为50个字符。每行最多显示50字符,超出换行。
</span>
</li>
<li>
<span
class=
"sp_l"
>
商
城
价:
</span>
<div
class=
"fl-l"
>
<del
th:text=
"'¥'+${i.price}"
>
¥
</del>
<del
th:text=
"'¥'+${i
temDetail
.price}"
>
¥
</del>
</div>
</li>
<li>
<span
class=
"sp_l"
>
活
动
价:
</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=
"'¥'+${i
temDetail
.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>
<!--已选择-->
...
...
src/taoshop-provider-api/taoshop-provider-api-item/src/main/java/com/muses/taoshop/item/entity/ItemDetail.java
浏览文件 @
0fafc8c6
...
...
@@ -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
;
}
src/taoshop-provider/taoshop-provider-item/src/main/resources/mybatis/ItemMapper.xml
浏览文件 @
0fafc8c6
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录