diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/BrandController.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/BrandController.java index 5658fc22d..0702d206c 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/BrandController.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/BrandController.java @@ -1,30 +1,28 @@ package cn.iocoder.yudao.module.product.controller.admin.brand; -import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; -import org.springframework.validation.annotation.Validated; -import org.springframework.security.access.prepost.PreAuthorize; -import io.swagger.annotations.*; - -import javax.validation.constraints.*; -import javax.validation.*; -import javax.servlet.http.*; -import java.util.*; -import java.io.IOException; - -import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; - +import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; - import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; - import cn.iocoder.yudao.module.product.controller.admin.brand.vo.*; -import cn.iocoder.yudao.module.product.dal.dataobject.brand.BrandDO; import cn.iocoder.yudao.module.product.convert.brand.BrandConvert; +import cn.iocoder.yudao.module.product.dal.dataobject.brand.BrandDO; import cn.iocoder.yudao.module.product.service.brand.BrandService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; +import java.io.IOException; +import java.util.List; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api(tags = "管理后台 - 品牌") @RestController @@ -68,16 +66,6 @@ public class BrandController { return success(BrandConvert.INSTANCE.convert(brand)); } - // TODO @JeromeSoar:这个接口,是不是没用哈 - @GetMapping("/list") - @ApiOperation("获得品牌列表") - @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) - @PreAuthorize("@ss.hasPermission('product:brand:query')") - public CommonResult> getBrandList(@RequestParam("ids") Collection ids) { - List list = brandService.getBrandList(ids); - return success(BrandConvert.INSTANCE.convertList(list)); - } - @GetMapping("/page") @ApiOperation("获得品牌分页") @PreAuthorize("@ss.hasPermission('product:brand:query')") diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/CategoryController.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/CategoryController.java index 522c5fec7..12408ac28 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/CategoryController.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/CategoryController.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.product.controller.admin.category; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.product.controller.admin.category.vo.*; @@ -19,7 +18,6 @@ import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; import java.io.IOException; -import java.util.Collection; import java.util.Comparator; import java.util.List; @@ -68,16 +66,8 @@ public class CategoryController { return success(CategoryConvert.INSTANCE.convert(category)); } - // TODO @JeromeSoar:这个接口,是不是没用哈 - @GetMapping("/listByIds") - @ApiOperation("获得商品分类列表") - @PreAuthorize("@ss.hasPermission('product:category:query')") - public CommonResult> getCategoryList(@RequestParam("ids") Collection ids) { - List list = categoryService.getCategoryList(ids); - return success(CategoryConvert.INSTANCE.convertList(list)); - } - // TODO @JeromeSoar:这应该是个 app 的接口,提供商品分类的树结构。这个调整下,后端只返回列表,前端构建 tree。注意,不需要返回创建时间、是否开启等无关字段。 + // TODO @YunaiV: 这个是在管理端展示了一个类似菜单的分类树列表, treeListReqVO 只是查询参数的封装命名,返给前端的是列表数据。PS: 这里 /page 接口没有使用到。 @GetMapping("/listByQuery") @ApiOperation("获得商品分类列表") @PreAuthorize("@ss.hasPermission('product:category:query')") @@ -86,15 +76,7 @@ public class CategoryController { list.sort(Comparator.comparing(CategoryDO::getSort)); return success(CategoryConvert.INSTANCE.convertList(list)); } - - @GetMapping("/page") - @ApiOperation("获得商品分类分页") - @PreAuthorize("@ss.hasPermission('product:category:query')") - public CommonResult> getCategoryPage(@Valid CategoryPageReqVO pageVO) { - PageResult pageResult = categoryService.getCategoryPage(pageVO); - return success(CategoryConvert.INSTANCE.convertPage(pageResult)); - } - + @GetMapping("/export-excel") @ApiOperation("导出商品分类 Excel") @PreAuthorize("@ss.hasPermission('product:category:export')")