'限制演示站点部分功能'
This commit is contained in:
parent
29f73eaaa1
commit
e78ea60644
@ -1,5 +1,6 @@
|
||||
package cn.lili.controller.goods;
|
||||
|
||||
import cn.lili.common.aop.annotation.DemoSite;
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.exception.ServiceException;
|
||||
@ -58,6 +59,7 @@ public class CategoryManagerController {
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@DemoSite
|
||||
@ApiOperation(value = "添加商品分类")
|
||||
public ResultMessage<Category> saveCategory(@Valid Category category) {
|
||||
//非顶级分类
|
||||
@ -77,6 +79,7 @@ public class CategoryManagerController {
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@DemoSite
|
||||
@ApiOperation(value = "修改商品分类")
|
||||
public ResultMessage<Category> updateCategory(@Valid CategoryVO category) {
|
||||
Category catTemp = categoryService.getById(category.getId());
|
||||
@ -89,6 +92,7 @@ public class CategoryManagerController {
|
||||
}
|
||||
|
||||
@DeleteMapping(value = "/{id}")
|
||||
@DemoSite
|
||||
@ApiImplicitParam(name = "id", value = "分类ID", required = true, paramType = "path", dataType = "String")
|
||||
@ApiOperation(value = "通过id删除分类")
|
||||
public ResultMessage<Category> delAllByIds(@NotNull @PathVariable String id) {
|
||||
@ -112,6 +116,7 @@ public class CategoryManagerController {
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "goodsId", value = "分类ID", required = true, paramType = "path", dataType = "String")
|
||||
})
|
||||
@DemoSite
|
||||
@ApiOperation(value = "后台 禁用/启用 分类")
|
||||
public ResultMessage<Object> disable(@PathVariable String id, @RequestParam Boolean enableOperations) {
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.lili.controller.goods;
|
||||
|
||||
import cn.lili.common.aop.annotation.DemoSite;
|
||||
import cn.lili.common.aop.annotation.PreventDuplicateSubmissions;
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
@ -71,6 +72,7 @@ public class GoodsManagerController {
|
||||
@ApiImplicitParam(name = "goodsId", value = "商品ID", required = true, paramType = "query", allowMultiple = true),
|
||||
@ApiImplicitParam(name = "reason", value = "下架理由", required = true, paramType = "query")
|
||||
})
|
||||
@DemoSite
|
||||
@PutMapping(value = "/{goodsId}/under")
|
||||
public ResultMessage<Object> underGoods(@PathVariable String goodsId, @NotEmpty(message = "下架原因不能为空") @RequestParam String reason) {
|
||||
List<String> goodsIds = Arrays.asList(goodsId.split(","));
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.lili.controller.goods;
|
||||
|
||||
import cn.lili.common.aop.annotation.DemoSite;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.security.OperationalJudgment;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
@ -113,6 +114,7 @@ public class GoodsStoreController {
|
||||
return ResultUtil.success();
|
||||
}
|
||||
|
||||
@DemoSite
|
||||
@ApiOperation(value = "下架商品", notes = "下架商品时使用")
|
||||
@ApiImplicitParam(name = "goodsId", value = "商品ID", required = true, paramType = "query", allowMultiple = true)
|
||||
@PutMapping(value = "/under")
|
||||
@ -130,6 +132,7 @@ public class GoodsStoreController {
|
||||
return ResultUtil.success();
|
||||
}
|
||||
|
||||
@DemoSite
|
||||
@ApiOperation(value = "删除商品")
|
||||
@PutMapping(value = "/delete")
|
||||
@ApiImplicitParam(name = "goodsId", value = "商品ID", required = true, paramType = "query", allowMultiple = true)
|
||||
|
Loading…
x
Reference in New Issue
Block a user