Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
smileNicky
taoshop
提交
49774175
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 搜索 >>
提交
49774175
编写于
10月 28, 2018
作者:
N
nicky
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修正一下商品品目信息搜索
上级
675f8169
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
58 addition
and
186 deletion
+58
-186
src/taoshop-portal/src/main/java/com/muses/taoshop/web/controller/portal/ItemCategoryController.java
...taoshop/web/controller/portal/ItemCategoryController.java
+12
-6
src/taoshop-portal/src/main/java/com/muses/taoshop/web/controller/user/UserController.java
...com/muses/taoshop/web/controller/user/UserController.java
+2
-1
src/taoshop-portal/src/main/resources/templates/header_nav.html
...oshop-portal/src/main/resources/templates/header_nav.html
+0
-32
src/taoshop-portal/src/main/resources/templates/item/item_category.html
...rtal/src/main/resources/templates/item/item_category.html
+4
-102
src/taoshop-portal/src/main/resources/templates/item/item_detail.html
...portal/src/main/resources/templates/item/item_detail.html
+15
-15
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
+1
-1
src/taoshop-provider-api/taoshop-provider-api-item/src/main/java/com/muses/taoshop/item/entity/ItemList.java
...src/main/java/com/muses/taoshop/item/entity/ItemList.java
+10
-13
src/taoshop-provider-api/taoshop-provider-api-item/src/main/java/com/muses/taoshop/item/service/IItemCategoryService.java
.../com/muses/taoshop/item/service/IItemCategoryService.java
+2
-3
src/taoshop-provider/taoshop-provider-item/src/main/java/com/muses/taoshop/item/mapper/ItemCategoryMapper.java
...ava/com/muses/taoshop/item/mapper/ItemCategoryMapper.java
+2
-3
src/taoshop-provider/taoshop-provider-item/src/main/java/com/muses/taoshop/item/service/ItemCategoryServiceImpl.java
...m/muses/taoshop/item/service/ItemCategoryServiceImpl.java
+2
-3
src/taoshop-provider/taoshop-provider-item/src/main/resources/mybatis/ItemCategoryMapper.xml
...er-item/src/main/resources/mybatis/ItemCategoryMapper.xml
+8
-7
未找到文件。
src/taoshop-portal/src/main/java/com/muses/taoshop/web/controller/portal/ItemCategoryController.java
浏览文件 @
49774175
package
com.muses.taoshop.web.controller.portal
;
import
com.muses.taoshop.item.entity.ItemCategory
;
import
com.muses.taoshop.item.entity.ItemDto
;
import
com.muses.taoshop.item.entity.ItemVo
;
import
com.muses.taoshop.item.entity.ItemList
;
import
com.muses.taoshop.item.service.IItemCategoryService
;
import
com.muses.taoshop.web.controller.BaseController
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.servlet.ModelAndView
;
...
...
@@ -15,7 +14,7 @@ import java.util.List;
/**
* <pre>
* 商品
类别
控制类
* 商品
品类
控制类
* </pre>
*
* @author nicky
...
...
@@ -32,12 +31,19 @@ public class ItemCategoryController extends BaseController{
@Autowired
IItemCategoryService
iItemCategoryService
;
@RequestMapping
(
value
=
"/toCategoryList/{categoryId}"
)
/**
* 根据品类id检索商品信息
* @param categoryId
* @return
*/
@GetMapping
(
value
=
"/toCategoryList/{categoryId}"
)
public
ModelAndView
toCategoryList
(
@PathVariable
(
"categoryId"
)
int
categoryId
)
{
ModelAndView
mv
=
this
.
getModelAndView
();
mv
.
setViewName
(
"item/item_category"
);
List
<
Item
Vo
>
items
=
iItemCategoryService
.
listItemByCategoryId
(
categoryId
);
List
<
Item
List
>
items
=
iItemCategoryService
.
listItemByCategoryId
(
categoryId
);
mv
.
addObject
(
"items"
,
items
);
return
mv
;
}
}
src/taoshop-portal/src/main/java/com/muses/taoshop/web/controller/user/UserController.java
浏览文件 @
49774175
...
...
@@ -2,6 +2,7 @@ package com.muses.taoshop.web.controller.user;
import
com.muses.taoshop.web.controller.BaseController
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.servlet.ModelAndView
;
...
...
@@ -25,7 +26,7 @@ public class UserController extends BaseController{
* 跳转用户中心
* @return
*/
@
Reques
tMapping
(
"/toUserCenter"
)
@
Ge
tMapping
(
"/toUserCenter"
)
public
ModelAndView
toUserCenter
(){
ModelAndView
mv
=
this
.
getModelAndView
();
mv
.
setViewName
(
"user/portal_user_center"
);
...
...
src/taoshop-portal/src/main/resources/templates/header_nav.html
浏览文件 @
49774175
...
...
@@ -14,38 +14,6 @@
</p>
<a
href=
"#"
class=
"more"
>
更多
</a>
</div>
<div
class=
"all-brands-item"
>
<h3>
手机套
<em>
91折起
</em></h3>
<p>
<a
href=
"#"
>
银联充值
</a>
<a
href=
"#"
>
易充值
</a>
</p>
<a
href=
"#"
class=
"more"
>
更多
</a>
</div>
<div
class=
"all-brands-item"
>
<h3>
手机配件
</h3>
<p>
<a
href=
"#"
>
2000元起
</a>
<a
href=
"#"
>
3000元起
</a>
</p>
<a
href=
"#"
class=
"more"
>
更多
</a>
</div>
<div
class=
"all-brands-item"
>
<h3>
杯子照片
<em>
91折起
</em></h3>
<p>
<a
href=
"#"
>
银联充值
</a>
<a
href=
"#"
>
易充值
</a>
</p>
<a
href=
"#"
class=
"more"
>
更多
</a>
</div>
<div
class=
"all-brands-item"
>
<h3>
优惠促销
</h3>
<p>
<a
href=
"#"
>
话费服务
</a>
<a
href=
"#"
>
话费服务
</a>
</p>
<a
href=
"#"
class=
"more"
>
更多
</a>
</div>
</dd>
</dl>
<script>
...
...
src/taoshop-portal/src/main/resources/templates/item/item_category.html
浏览文件 @
49774175
...
...
@@ -135,115 +135,17 @@
</div>
<!--//排序-->
<!--商品列表-->
<div
class=
"phoneList clearfix m10-b"
>
<div
class=
"phoneList clearfix m10-b"
th:each=
"i : ${items}"
>
<div
class=
"phoneList-wrap"
>
<div
class=
"phoneListItem"
>
<p
class=
"item-img"
>
<a
href=
"#"
><img
th:src=
"
@{/static/picture/img_phoneList_240x240.jpg
}"
/></a>
<a
href=
"#"
><img
th:src=
"
${i.imgPath
}"
/></a>
</p>
<p
class=
"item-name"
>
<a
href=
"#"
>
苹果(APPLE)iPhone 4S 8G版
</a>
<a
href=
"#"
th:text=
"${i.itemName}"
>
苹果(APPLE)iPhone 4S 8G版
</a>
</p>
<p
class=
"item-info"
>
北京电信购机
</p>
<p
class=
"item-price"
>
¥
<em>
2098
</em></p>
<p
class=
"item-btn"
>
<a
href=
"#"
class=
"btn btn-gray"
>
加入购物车
</a>
<a
href=
"#"
class=
"btn btn-red"
>
立即购买
</a>
</p>
</div>
<div
class=
"phoneListItem"
>
<p
class=
"item-img"
>
<a
href=
"#"
><img
th:src=
"@{/static/picture/img_phoneList_240x240.jpg}"
/></a>
</p>
<p
class=
"item-name"
>
<a
href=
"#"
>
苹果(APPLE)iPhone 4S 8G版
</a>
</p>
<p
class=
"item-info"
>
北京电信购机
</p>
<p
class=
"item-price"
>
¥
<em>
2098
</em></p>
<p
class=
"item-btn"
>
<a
href=
"#"
class=
"btn btn-gray"
>
加入购物车
</a>
<a
href=
"#"
class=
"btn btn-red"
>
立即购买
</a>
</p>
</div>
<div
class=
"phoneListItem"
>
<p
class=
"item-img"
>
<a
href=
"#"
><img
th:src=
"@{/static/picture/img_phoneList_240x240.jpg}"
/></a>
</p>
<p
class=
"item-name"
>
<a
href=
"#"
>
苹果(APPLE)iPhone 4S 8G版
</a>
</p>
<p
class=
"item-info"
>
北京电信购机
</p>
<p
class=
"item-price"
>
¥
<em>
2098
</em></p>
<p
class=
"item-btn"
>
<a
href=
"#"
class=
"btn btn-gray"
>
加入购物车
</a>
<a
href=
"#"
class=
"btn btn-red"
>
立即购买
</a>
</p>
</div>
<div
class=
"phoneListItem"
>
<p
class=
"item-img"
>
<a
href=
"#"
><img
th:src=
"@{/static/picture/img_phoneList_240x240.jpg}"
/></a>
</p>
<p
class=
"item-name"
>
<a
href=
"#"
>
苹果(APPLE)iPhone 4S 8G版
</a>
</p>
<p
class=
"item-info"
>
北京电信购机
</p>
<p
class=
"item-price"
>
¥
<em>
2098
</em></p>
<p
class=
"item-btn"
>
<a
href=
"#"
class=
"btn btn-gray"
>
加入购物车
</a>
<a
href=
"#"
class=
"btn btn-red"
>
立即购买
</a>
</p>
</div>
<div
class=
"phoneListItem"
>
<p
class=
"item-img"
>
<a
href=
"#"
><img
th:src=
"@{/static/picture/img_phoneList_240x240.jpg}"
/></a>
</p>
<p
class=
"item-name"
>
<a
href=
"#"
>
苹果(APPLE)iPhone 4S 8G版
</a>
</p>
<p
class=
"item-info"
>
北京电信购机
</p>
<p
class=
"item-price"
>
¥
<em>
2098
</em></p>
<p
class=
"item-btn"
>
<a
href=
"#"
class=
"btn btn-gray"
>
加入购物车
</a>
<a
href=
"#"
class=
"btn btn-red"
>
立即购买
</a>
</p>
</div>
<div
class=
"phoneListItem"
>
<p
class=
"item-img"
>
<a
href=
"#"
><img
th:src=
"@{/static/picture/img_phoneList_240x240.jpg}"
/></a>
</p>
<p
class=
"item-name"
>
<a
href=
"#"
>
苹果(APPLE)iPhone 4S 8G版
</a>
</p>
<p
class=
"item-info"
>
北京电信购机
</p>
<p
class=
"item-price"
>
¥
<em>
2098
</em></p>
<p
class=
"item-btn"
>
<a
href=
"#"
class=
"btn btn-gray"
>
加入购物车
</a>
<a
href=
"#"
class=
"btn btn-red"
>
立即购买
</a>
</p>
</div>
<div
class=
"phoneListItem"
>
<p
class=
"item-img"
>
<a
href=
"#"
><img
th:src=
"@{/static/picture/img_phoneList_240x240.jpg}"
/></a>
</p>
<p
class=
"item-name"
>
<a
href=
"#"
>
苹果(APPLE)iPhone 4S 8G版
</a>
</p>
<p
class=
"item-info"
>
北京电信购机
</p>
<p
class=
"item-price"
>
¥
<em>
2098
</em></p>
<p
class=
"item-btn"
>
<a
href=
"#"
class=
"btn btn-gray"
>
加入购物车
</a>
<a
href=
"#"
class=
"btn btn-red"
>
立即购买
</a>
</p>
</div>
<div
class=
"phoneListItem"
>
<p
class=
"item-img"
>
<a
href=
"#"
><img
th:src=
"@{/static/picture/img_phoneList_240x240.jpg}"
/></a>
</p>
<p
class=
"item-name"
>
<a
href=
"#"
>
苹果(APPLE)iPhone 4S 8G版
</a>
</p>
<p
class=
"item-info"
>
北京电信购机
</p>
<p
class=
"item-price"
>
¥
<em>
2098
</em></p>
<p
class=
"item-price"
th:text=
"${'¥'+i.skuPrice}"
>
¥
<em>
2098
</em></p>
<p
class=
"item-btn"
>
<a
href=
"#"
class=
"btn btn-gray"
>
加入购物车
</a>
<a
href=
"#"
class=
"btn btn-red"
>
立即购买
</a>
...
...
src/taoshop-portal/src/main/resources/templates/item/item_detail.html
浏览文件 @
49774175
...
...
@@ -43,25 +43,25 @@
<a
th:href=
"@{${itemDetail.imgPath}}"
><img
width=
"350"
height=
"350"
th:src=
"@{${itemDetail.imgPath}}"
/></a>
</div>
<div
class=
"img-big"
>
<a
th:href=
"
@{${itemDetail.imgPath}}"
><img
width=
"350"
height=
"350"
th:src=
"@{${itemDetail.imgPath}
}"
/></a>
<a
th:href=
"
${itemDetail.imgPath}"
><img
width=
"350"
height=
"350"
th:src=
"${itemDetail.imgPath
}"
/></a>
</div>
<div
class=
"img-big"
>
<a
th:href=
"
@{${itemDetail.imgPath}}"
><img
width=
"350"
height=
"350"
th:src=
"@{${itemDetail.imgPath}
}"
/></a>
<a
th:href=
"
${itemDetail.imgPath}"
><img
width=
"350"
height=
"350"
th:src=
"${itemDetail.imgPath
}"
/></a>
</div>
<div
class=
"img-big"
>
<a
th:href=
"
@{${itemDetail.imgPath}}"
><img
width=
"350"
height=
"350"
th:src=
"@{${itemDetail.imgPath}
}"
/></a>
<a
th:href=
"
${itemDetail.imgPath}"
><img
width=
"350"
height=
"350"
th:src=
"${itemDetail.imgPath
}"
/></a>
</div>
<div
class=
"img-big"
>
<a
th:href=
"
@{${itemDetail.imgPath}}"
><img
width=
"350"
height=
"350"
th:src=
"@{${itemDetail.imgPath}
}"
/></a>
<a
th:href=
"
${itemDetail.imgPath}"
><img
width=
"350"
height=
"350"
th:src=
"${itemDetail.imgPath
}"
/></a>
</div>
<div
class=
"img-big"
>
<a
th:href=
"
@{${itemDetail.imgPath}}"
><img
width=
"350"
height=
"350"
th:src=
"@{${itemDetail.imgPath}
}"
/></a>
<a
th:href=
"
${itemDetail.imgPath}"
><img
width=
"350"
height=
"350"
th:src=
"${itemDetail.imgPath
}"
/></a>
</div>
<div
class=
"img-big"
>
<a
th:href=
"
@{${itemDetail.imgPath}}"
><img
width=
"350"
height=
"350"
th:src=
"@{${itemDetail.imgPath}
}"
/></a>
<a
th:href=
"
${itemDetail.imgPath}"
><img
width=
"350"
height=
"350"
th:src=
"${itemDetail.imgPath
}"
/></a>
</div>
<div
class=
"img-big"
>
<a
th:href=
"
@{${itemDetail.imgPath}}"
><img
width=
"350"
height=
"350"
th:src=
"@{${itemDetail.imgPath}
}"
/></a>
<a
th:href=
"
${itemDetail.imgPath}"
><img
width=
"350"
height=
"350"
th:src=
"${itemDetail.imgPath
}"
/></a>
</div>
</div>
<!--//图片展示-->
...
...
@@ -69,14 +69,14 @@
<div
class=
"spec-lists"
>
<div
class=
"spec-items"
>
<ul
class=
"clearfix"
id=
"slider"
>
<li
class=
"selected"
><span><img
th:src=
"
@{${itemDetail.imgPath}
}"
/></span></li>
<li><span><img
th:src=
"
@{${itemDetail.imgPath}
}"
/></span></li>
<li><span><img
th:src=
"
@{${itemDetail.imgPath}
}"
/></span></li>
<li><span><img
th:src=
"
@{${itemDetail.imgPath}
}"
/></span></li>
<li><span><img
th:src=
"
@{${itemDetail.imgPath}
}"
/></span></li>
<li><span><img
th:src=
"
@{${itemDetail.imgPath}
}"
/></span></li>
<li><span><img
th:src=
"
@{${itemDetail.imgPath}
}"
/></span></li>
<li><span><img
th:src=
"
@{${itemDetail.imgPath}
}"
/></span></li>
<li
class=
"selected"
><span><img
th:src=
"
${itemDetail.imgPath
}"
/></span></li>
<li><span><img
th:src=
"
${itemDetail.imgPath
}"
/></span></li>
<li><span><img
th:src=
"
${itemDetail.imgPath
}"
/></span></li>
<li><span><img
th:src=
"
${itemDetail.imgPath
}"
/></span></li>
<li><span><img
th:src=
"
${itemDetail.imgPath
}"
/></span></li>
<li><span><img
th:src=
"
${itemDetail.imgPath
}"
/></span></li>
<li><span><img
th:src=
"
${itemDetail.imgPath
}"
/></span></li>
<li><span><img
th:src=
"
${itemDetail.imgPath
}"
/></span></li>
</ul>
</div>
</div>
...
...
src/taoshop-provider-api/taoshop-provider-api-item/src/main/java/com/muses/taoshop/item/entity/ItemDetail.java
浏览文件 @
49774175
...
...
@@ -6,7 +6,7 @@ import java.util.List;
/**
* <pre>
* 商品详情
DT
O类
* 商品详情
V
O类
* </pre>
*
* @author nicky
...
...
src/taoshop-provider-api/taoshop-provider-api-item/src/main/java/com/muses/taoshop/item/entity/Item
Vo
.java
→
src/taoshop-provider-api/taoshop-provider-api-item/src/main/java/com/muses/taoshop/item/entity/Item
List
.java
浏览文件 @
49774175
...
...
@@ -15,29 +15,26 @@ import lombok.Data;
* </pre>
*/
@Data
public
class
Item
Vo
{
public
class
Item
List
{
/**
* spu
编号
* spu
id
*/
private
String
spuCode
;
private
Long
spuId
;
/**
* 商品名称
*/
private
String
itemName
;
/**
* 品类id
*/
private
Long
categoryId
;
/**
* 品牌id
* sku id
*/
private
Long
brand
Id
;
private
Long
sku
Id
;
/**
* 商
家id
* 商
品价钱
*/
private
Long
s
hopId
;
private
Long
s
kuPrice
;
/**
*
品目名称
*
图片路径
*/
private
String
categoryName
;
private
String
imgPath
;
}
src/taoshop-provider-api/taoshop-provider-api-item/src/main/java/com/muses/taoshop/item/service/IItemCategoryService.java
浏览文件 @
49774175
package
com.muses.taoshop.item.service
;
import
com.muses.taoshop.item.entity.ItemCategory
;
import
com.muses.taoshop.item.entity.ItemDto
;
import
com.muses.taoshop.item.entity.ItemVo
;
import
com.muses.taoshop.item.entity.ItemList
;
import
java.util.List
;
...
...
@@ -35,5 +34,5 @@ public interface IItemCategoryService {
* 根据品目id获取商品信息
* @return
*/
List
<
Item
Vo
>
listItemByCategoryId
(
int
categoryId
);
List
<
Item
List
>
listItemByCategoryId
(
int
categoryId
);
}
src/taoshop-provider/taoshop-provider-item/src/main/java/com/muses/taoshop/item/mapper/ItemCategoryMapper.java
浏览文件 @
49774175
package
com.muses.taoshop.item.mapper
;
import
com.muses.taoshop.item.entity.ItemCategory
;
import
com.muses.taoshop.item.entity.ItemDto
;
import
com.muses.taoshop.item.entity.ItemVo
;
import
com.muses.taoshop.item.entity.ItemList
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -14,5 +13,5 @@ public interface ItemCategoryMapper {
List
<
ItemCategory
>
listCategory
();
List
<
Item
Vo
>
listItemByCategoryId
(
@Param
(
"categoryId"
)
int
categoryId
);
List
<
Item
List
>
listItemByCategoryId
(
@Param
(
"categoryId"
)
int
categoryId
);
}
\ No newline at end of file
src/taoshop-provider/taoshop-provider-item/src/main/java/com/muses/taoshop/item/service/ItemCategoryServiceImpl.java
浏览文件 @
49774175
package
com.muses.taoshop.item.service
;
import
com.muses.taoshop.item.entity.ItemCategory
;
import
com.muses.taoshop.item.entity.ItemDto
;
import
com.muses.taoshop.item.entity.ItemVo
;
import
com.muses.taoshop.item.entity.ItemList
;
import
com.muses.taoshop.item.mapper.ItemCategoryMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -52,7 +51,7 @@ public class ItemCategoryServiceImpl implements IItemCategoryService{
* @return
*/
@Override
public
List
<
Item
Vo
>
listItemByCategoryId
(
int
categoryId
)
{
public
List
<
Item
List
>
listItemByCategoryId
(
int
categoryId
)
{
return
itemCategoryMapper
.
listItemByCategoryId
(
categoryId
);
}
...
...
src/taoshop-provider/taoshop-provider-item/src/main/resources/mybatis/ItemCategoryMapper.xml
浏览文件 @
49774175
...
...
@@ -32,16 +32,17 @@
FROM item_category t
</select>
<!-- 根据品目id获取商品信息-->
<select
id=
"listItemByCategoryId"
resultType=
"Item
Vo
"
>
<select
id=
"listItemByCategoryId"
resultType=
"Item
List
"
>
SELECT
spu.spu_code,
spu.item_name,
spu.category_id,
spu.brand_id,
spu.shop_id,
ic.category_name
spu.id AS spuId,
spu.item_name AS itemName,
sku.id AS skuId,
sku.price AS skuPrice,
sku.img_path AS imgPath
FROM
item_spu spu
LEFT JOIN item_sku sku
ON sku.spu_id = spu.id
LEFT JOIN item_category ic
ON ic.id = spu.category_id
WHERE spu.category_id = #{categoryId}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录