店铺分类维护信息错误问题处理。
This commit is contained in:
parent
d93e11b302
commit
b0b9420a8e
@ -408,7 +408,7 @@ public enum ResultCode {
|
||||
*/
|
||||
OSS_NOT_EXIST(80101, "OSS未配置"),
|
||||
OSS_EXCEPTION_ERROR(80102, "文件上传失败,请稍后重试"),
|
||||
OSS_DELETE_ERROR(80102, "图片删除失败"),
|
||||
OSS_DELETE_ERROR(80103, "图片删除失败"),
|
||||
|
||||
/**
|
||||
* 验证码
|
||||
|
@ -8,6 +8,8 @@ import lombok.Data;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
@ -28,12 +30,16 @@ public class StoreGoodsLabel extends BaseEntity {
|
||||
@ApiModelProperty("店铺ID")
|
||||
private String storeId;
|
||||
|
||||
@NotEmpty(message = "店铺商品分类名称不能为空")
|
||||
@ApiModelProperty("店铺商品分类名称")
|
||||
private String labelName;
|
||||
|
||||
|
||||
@NotNull(message = "店铺商品分类排序不能为空")
|
||||
@ApiModelProperty("店铺商品分类排序")
|
||||
private BigDecimal sortOrder;
|
||||
|
||||
@NotNull(message = "父节点不能为空,需设定根节点或者某节点的子节点")
|
||||
@ApiModelProperty(value = "父id, 根节点为0")
|
||||
private String parentId;
|
||||
|
||||
|
@ -126,6 +126,6 @@ public class StoreGoodsLabelServiceImpl extends ServiceImpl<StoreGoodsLabelMappe
|
||||
* 清除缓存
|
||||
*/
|
||||
private void removeCache(String storeId) {
|
||||
cache.remove(CachePrefix.CATEGORY.getPrefix() + storeId + "tree");
|
||||
cache.remove(CachePrefix.STORE_CATEGORY.getPrefix() + storeId + "tree");
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,7 @@
|
||||
package cn.lili.controller.goods;
|
||||
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.store.entity.dos.StoreGoodsLabel;
|
||||
import cn.lili.modules.store.entity.vos.StoreGoodsLabelVO;
|
||||
@ -11,6 +10,7 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
@ -48,13 +48,13 @@ public class GoodsLabelStoreController {
|
||||
|
||||
@ApiOperation(value = "添加店铺商品分类")
|
||||
@PostMapping
|
||||
public ResultMessage<StoreGoodsLabel> add(StoreGoodsLabel storeGoodsLabel) {
|
||||
public ResultMessage<StoreGoodsLabel> add(@Validated StoreGoodsLabel storeGoodsLabel) {
|
||||
return ResultUtil.data(storeGoodsLabelService.addStoreGoodsLabel(storeGoodsLabel));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改店铺商品分类")
|
||||
@PutMapping
|
||||
public ResultMessage<StoreGoodsLabel> edit(StoreGoodsLabel storeGoodsLabel) {
|
||||
public ResultMessage<StoreGoodsLabel> edit(@Validated StoreGoodsLabel storeGoodsLabel) {
|
||||
return ResultUtil.data(storeGoodsLabelService.editStoreGoodsLabel(storeGoodsLabel));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user