商品分类修改完善
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
package com.macro.mall.controller;
|
||||
|
||||
import com.macro.mall.dto.CommonResult;
|
||||
import com.macro.mall.dto.PmsProductAttributeCategoryItem;
|
||||
import com.macro.mall.model.PmsProductAttributeCategory;
|
||||
import com.macro.mall.service.PmsProductAttributeCategoryService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -18,7 +17,7 @@ import java.util.List;
|
||||
* Created by macro on 2018/4/26.
|
||||
*/
|
||||
@Controller
|
||||
@Api(tags = "PmsProductAttributeCategoryController",description = "商品属性分类管理")
|
||||
@Api(tags = "PmsProductAttributeCategoryController", description = "商品属性分类管理")
|
||||
@RequestMapping("/productAttribute/category")
|
||||
public class PmsProductAttributeCategoryController {
|
||||
@Autowired
|
||||
@@ -71,8 +70,16 @@ public class PmsProductAttributeCategoryController {
|
||||
@ApiOperation("分页获取所有商品属性分类")
|
||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object getList(@RequestParam(defaultValue = "5") Integer pageSize,@RequestParam(defaultValue = "1") Integer pageNum) {
|
||||
List<PmsProductAttributeCategory> productAttributeCategoryList = productAttributeCategoryService.getList(pageSize,pageNum);
|
||||
public Object getList(@RequestParam(defaultValue = "5") Integer pageSize, @RequestParam(defaultValue = "1") Integer pageNum) {
|
||||
List<PmsProductAttributeCategory> productAttributeCategoryList = productAttributeCategoryService.getList(pageSize, pageNum);
|
||||
return new CommonResult().pageSuccess(productAttributeCategoryList);
|
||||
}
|
||||
|
||||
@ApiOperation("获取所有商品属性分类及其下属性")
|
||||
@RequestMapping(value = "/list/withAttr", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object getListWithAttr() {
|
||||
List<PmsProductAttributeCategoryItem> productAttributeCategoryResultList = productAttributeCategoryService.getListWithAttr();
|
||||
return new CommonResult().success(productAttributeCategoryResultList);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user