From d99a4d2d50321aeea1fb60e9cb1eb660cc51d117 Mon Sep 17 00:00:00 2001 From: Chopper Date: Fri, 25 Jun 2021 10:35:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E5=8F=82=E6=95=B0=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GoodsParameterManagerController.java | 42 ------------------- .../goods/ParameterManagerController.java | 6 --- 2 files changed, 48 deletions(-) delete mode 100644 manager-api/src/main/java/cn/lili/controller/goods/GoodsParameterManagerController.java diff --git a/manager-api/src/main/java/cn/lili/controller/goods/GoodsParameterManagerController.java b/manager-api/src/main/java/cn/lili/controller/goods/GoodsParameterManagerController.java deleted file mode 100644 index c80bbb4d0..000000000 --- a/manager-api/src/main/java/cn/lili/controller/goods/GoodsParameterManagerController.java +++ /dev/null @@ -1,42 +0,0 @@ -package cn.lili.controller.goods; - -import cn.lili.common.enums.ResultUtil; -import cn.lili.common.vo.ResultMessage; -import cn.lili.modules.goods.entity.vos.GoodsParamsGroupVO; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiImplicitParams; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -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.bind.annotation.RestController; - -import java.util.List; - -/** - * 管理端,商品关联参数管理接口 - * - * @author pikachu - * @date 2020-02-18 15:18:56 - */ -@RestController -@Api(tags = "管理端,商品关联参数管理接口") -@RequestMapping("/manager/goods/parameters") -public class GoodsParameterManagerController { - - @Autowired - private GoodsParamsService goodsParamsService; - - @ApiImplicitParams({ - @ApiImplicitParam(name = "goodsId", value = "商品ID", required = true, paramType = "path", dataType = "String"), - @ApiImplicitParam(name = "categoryId", value = "分类ID", required = true, paramType = "path", dataType = "String") - }) - @ApiOperation(value = "通过商品id和分类id查询参数信息") - @GetMapping(value = "/{goodsId}/{categoryId}") - public ResultMessage> getGoodsParameters(@PathVariable String goodsId, @PathVariable String categoryId) { - return ResultUtil.data(this.goodsParamsService.queryGoodsParams(goodsId, categoryId)); - } - -} diff --git a/manager-api/src/main/java/cn/lili/controller/goods/ParameterManagerController.java b/manager-api/src/main/java/cn/lili/controller/goods/ParameterManagerController.java index 6d16dadb6..78d7a0e5f 100644 --- a/manager-api/src/main/java/cn/lili/controller/goods/ParameterManagerController.java +++ b/manager-api/src/main/java/cn/lili/controller/goods/ParameterManagerController.java @@ -28,8 +28,6 @@ public class ParameterManagerController { @Autowired private ParametersService parametersService; - @Autowired - private GoodsParamsService goodsParamsService; @ApiOperation(value = "添加参数") @PostMapping @@ -47,9 +45,6 @@ public ResultMessage save(@Valid Parameters parameters) { public ResultMessage update(@Valid Parameters parameters) { if (parametersService.updateById(parameters)) { - if (parameters.getIsIndex() != null) { - goodsParamsService.updateParametersIsIndex(parameters.getId(), parameters.getIsIndex()); - } return ResultUtil.data(parameters); } throw new ServiceException(ResultCode.PARAMETER_UPDATE_ERROR); @@ -60,7 +55,6 @@ public ResultMessage update(@Valid Parameters parameters) { @DeleteMapping(value = "/{id}") public ResultMessage delById(@PathVariable String id) { parametersService.removeById(id); - goodsParamsService.deleteByParamId(id); return ResultUtil.success(); }