From 4977417540fb9b5b263cdaabd1dc650ee377c30e Mon Sep 17 00:00:00 2001 From: nicky <3623307211@qq.com> Date: Sun, 28 Oct 2018 16:05:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B8=80=E4=B8=8B=E5=95=86?= =?UTF-8?q?=E5=93=81=E5=93=81=E7=9B=AE=E4=BF=A1=E6=81=AF=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../portal/ItemCategoryController.java | 18 ++- .../web/controller/user/UserController.java | 3 +- .../main/resources/templates/header_nav.html | 32 ------ .../templates/item/item_category.html | 106 +----------------- .../resources/templates/item/item_detail.html | 30 ++--- .../muses/taoshop/item/entity/ItemDetail.java | 2 +- .../entity/{ItemVo.java => ItemList.java} | 23 ++-- .../item/service/IItemCategoryService.java | 5 +- .../item/mapper/ItemCategoryMapper.java | 5 +- .../item/service/ItemCategoryServiceImpl.java | 5 +- .../resources/mybatis/ItemCategoryMapper.xml | 15 +-- 11 files changed, 58 insertions(+), 186 deletions(-) rename src/taoshop-provider-api/taoshop-provider-api-item/src/main/java/com/muses/taoshop/item/entity/{ItemVo.java => ItemList.java} (60%) diff --git a/src/taoshop-portal/src/main/java/com/muses/taoshop/web/controller/portal/ItemCategoryController.java b/src/taoshop-portal/src/main/java/com/muses/taoshop/web/controller/portal/ItemCategoryController.java index a848382..7589dc9 100644 --- a/src/taoshop-portal/src/main/java/com/muses/taoshop/web/controller/portal/ItemCategoryController.java +++ b/src/taoshop-portal/src/main/java/com/muses/taoshop/web/controller/portal/ItemCategoryController.java @@ -1,12 +1,11 @@ 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; /** *
- *  商品类别控制类
+ *  商品品类控制类
  * 
* * @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 items = iItemCategoryService.listItemByCategoryId(categoryId); + List items = iItemCategoryService.listItemByCategoryId(categoryId); mv.addObject("items", items); return mv; } + + } diff --git a/src/taoshop-portal/src/main/java/com/muses/taoshop/web/controller/user/UserController.java b/src/taoshop-portal/src/main/java/com/muses/taoshop/web/controller/user/UserController.java index 6d7dc19..d3cd1f6 100644 --- a/src/taoshop-portal/src/main/java/com/muses/taoshop/web/controller/user/UserController.java +++ b/src/taoshop-portal/src/main/java/com/muses/taoshop/web/controller/user/UserController.java @@ -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 */ - @RequestMapping("/toUserCenter") + @GetMapping("/toUserCenter") public ModelAndView toUserCenter(){ ModelAndView mv = this.getModelAndView(); mv.setViewName("user/portal_user_center"); diff --git a/src/taoshop-portal/src/main/resources/templates/header_nav.html b/src/taoshop-portal/src/main/resources/templates/header_nav.html index da6eb86..b51cac9 100644 --- a/src/taoshop-portal/src/main/resources/templates/header_nav.html +++ b/src/taoshop-portal/src/main/resources/templates/header_nav.html @@ -14,38 +14,6 @@

更多 -
-

手机套91折起

-

- 银联充值 - 易充值 -

- 更多 -
-
-

手机配件

-

- 2000元起 - 3000元起 -

- 更多 -
-
-

杯子照片91折起

-

- 银联充值 - 易充值 -

- 更多 -
-
-

优惠促销

-

- 话费服务 - 话费服务 -

- 更多 -