积分赠送以及返还问题处理。

积分购买时预校验,以免下单后取消订单,积分返还无效操作
额外的一些代码完善问题处理
This commit is contained in:
Chopper 2021-09-24 18:15:29 +08:00
parent ff24c95d02
commit d9b1d78c61
12 changed files with 95 additions and 212 deletions

View File

@ -17,6 +17,7 @@ import cn.lili.modules.order.order.entity.dos.Order;
import cn.lili.modules.order.order.entity.dto.OrderMessage; import cn.lili.modules.order.order.entity.dto.OrderMessage;
import cn.lili.modules.order.order.entity.enums.OrderPromotionTypeEnum; import cn.lili.modules.order.order.entity.enums.OrderPromotionTypeEnum;
import cn.lili.modules.order.order.entity.enums.OrderStatusEnum; import cn.lili.modules.order.order.entity.enums.OrderStatusEnum;
import cn.lili.modules.order.order.entity.enums.PayStatusEnum;
import cn.lili.modules.order.order.service.OrderService; import cn.lili.modules.order.order.service.OrderService;
import cn.lili.modules.order.trade.entity.enums.AfterSaleStatusEnum; import cn.lili.modules.order.trade.entity.enums.AfterSaleStatusEnum;
import cn.lili.modules.system.entity.dos.Setting; import cn.lili.modules.system.entity.dos.Setting;
@ -62,7 +63,7 @@ public class MemberPointExecute implements MemberRegisterEvent, GoodsCommentComp
//获取积分设置 //获取积分设置
PointSetting pointSetting = getPointSetting(); PointSetting pointSetting = getPointSetting();
//赠送会员积分 //赠送会员积分
memberService.updateMemberPoint(Long.valueOf(pointSetting.getRegister().longValue()), PointTypeEnum.INCREASE.name(), member.getId(), "会员注册,赠送积分" + pointSetting.getRegister() + ""); memberService.updateMemberPoint(pointSetting.getRegister().longValue(), PointTypeEnum.INCREASE.name(), member.getId(), "会员注册,赠送积分" + pointSetting.getRegister() + "");
} }
/** /**
@ -75,7 +76,7 @@ public class MemberPointExecute implements MemberRegisterEvent, GoodsCommentComp
//获取积分设置 //获取积分设置
PointSetting pointSetting = getPointSetting(); PointSetting pointSetting = getPointSetting();
//赠送会员积分 //赠送会员积分
memberService.updateMemberPoint(Long.valueOf(pointSetting.getComment().longValue()), PointTypeEnum.INCREASE.name(), memberEvaluation.getMemberId(), "会员评价,赠送积分" + pointSetting.getComment() + ""); memberService.updateMemberPoint(pointSetting.getComment().longValue(), PointTypeEnum.INCREASE.name(), memberEvaluation.getMemberId(), "会员评价,赠送积分" + pointSetting.getComment() + "");
} }
/** /**
@ -86,30 +87,43 @@ public class MemberPointExecute implements MemberRegisterEvent, GoodsCommentComp
@Override @Override
public void orderChange(OrderMessage orderMessage) { public void orderChange(OrderMessage orderMessage) {
if (orderMessage.getNewStatus().equals(OrderStatusEnum.COMPLETED)) { switch (orderMessage.getNewStatus()) {
Order order = orderService.getBySn(orderMessage.getOrderSn()); case CANCELLED: {
//根据订单编号获取订单数据,如果订单促销类型不为空并且订单促销类型为积分订单 则直接返回 Order order = orderService.getBySn(orderMessage.getOrderSn());
if (StringUtils.isNotEmpty(order.getOrderPromotionType()) && order.getOrderPromotionType().equals(OrderPromotionTypeEnum.POINTS.name())) { Long point = order.getPriceDetailDTO().getPayPoint();
return; if (point <= 0) {
return;
}
//如果未付款则不去要退回相关代码执行
if (order.getPayStatus().equals(PayStatusEnum.UNPAID.name())) {
return;
}
String content = "订单取消,积分返还:" + point + "";
//赠送会员积分
memberService.updateMemberPoint(point, PointTypeEnum.INCREASE.name(), order.getMemberId(), content);
break;
} }
//获取积分设置 case COMPLETED: {
PointSetting pointSetting = getPointSetting(); Order order = orderService.getBySn(orderMessage.getOrderSn());
//计算赠送积分数量 //根据订单编号获取订单数据,如果订单促销类型不为空并且订单促销类型为积分订单 则直接返回
Double point = CurrencyUtil.mul(pointSetting.getMoney(), order.getFlowPrice(), 0); if (StringUtils.isNotEmpty(order.getOrderPromotionType()) && order.getOrderPromotionType().equals(OrderPromotionTypeEnum.POINTS.name())) {
//赠送会员积分 return;
memberService.updateMemberPoint(point.longValue(), PointTypeEnum.INCREASE.name(), order.getMemberId(), "会员下单,赠送积分" + point + ""); }
//取消订单恢复积分 //获取积分设置
} else if (orderMessage.getNewStatus().equals(OrderStatusEnum.CANCELLED)) { PointSetting pointSetting = getPointSetting();
//根据订单编号获取订单数据,如果为积分订单则跳回 //计算赠送积分数量
Order order = orderService.getBySn(orderMessage.getOrderSn()); Double point = CurrencyUtil.mul(pointSetting.getMoney(), order.getFlowPrice(), 0);
//增加对积分订单的判定如果积分支付取消订单则退还用户积分 //赠送会员积分
if (StringUtils.isNotEmpty(order.getOrderPromotionType()) && memberService.updateMemberPoint(point.longValue(), PointTypeEnum.INCREASE.name(), order.getMemberId(), "会员下单,赠送积分" + point + "");
order.getOrderPromotionType().equals(OrderPromotionTypeEnum.POINTS.name()) && order.getPriceDetailDTO().getPayPoint() != null) { break;
memberService.updateMemberPoint(Convert.toLong(order.getPriceDetailDTO().getPayPoint()), PointTypeEnum.INCREASE.name(), order.getMemberId(), "订单取消,恢复积分:" + order.getPriceDetailDTO().getPayPoint() + "");
} }
default:
break;
} }
} }
/** /**
* 提交售后后扣除积分 * 提交售后后扣除积分
* *

View File

@ -1,57 +0,0 @@
package cn.lili.event.impl;
import cn.lili.event.OrderStatusChangeEvent;
import cn.lili.modules.member.entity.enums.PointTypeEnum;
import cn.lili.modules.member.service.MemberService;
import cn.lili.modules.order.order.entity.dos.Order;
import cn.lili.modules.order.order.entity.dto.OrderMessage;
import cn.lili.modules.order.order.entity.enums.PayStatusEnum;
import cn.lili.modules.order.order.service.OrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 积分
*
* @author Chopper
* @since 2021-03-13 16:58
*/
@Slf4j
@Service
public class PointExecute implements OrderStatusChangeEvent {
@Autowired
private MemberService memberService;
@Autowired
private OrderService orderService;
@Override
public void orderChange(OrderMessage orderMessage) {
switch (orderMessage.getNewStatus()) {
case CANCELLED:
Order order = orderService.getBySn(orderMessage.getOrderSn());
Long point = order.getPriceDetailDTO().getPayPoint();
if (point <= 0) {
return;
}
//如果未付款则不去要退回相关代码执行
if (order.getPayStatus().equals(PayStatusEnum.UNPAID.name())) {
return;
}
//如果他不处于连续赠送阶段则只赠送签到积分数
String content = "订单取消,积分返还:" + point + "";
//赠送会员积分
memberService.updateMemberPoint(point, PointTypeEnum.INCREASE.name(), order.getMemberId(), content);
break;
default:
break;
}
}
}

View File

@ -335,7 +335,8 @@ public enum ResultCode {
* 其他促销 * 其他促销
*/ */
MEMBER_SIGN_REPEAT(47001, "请勿重复签到"), MEMBER_SIGN_REPEAT(47001, "请勿重复签到"),
POINT_GOODS_ACTIVE_STOCK_ERROR(47002, "最低金额不能高于商品金额"), POINT_GOODS_ACTIVE_STOCK_ERROR(47002, "活动库存数量不能高于商品库存"),
POINT_GOODS_ACTIVE_STOCK_INSUFFICIENT(47003, "积分商品库存不足"),
/** /**
* 砍价活动 * 砍价活动

View File

@ -31,7 +31,7 @@ public class DistributionGoodsSearchParams extends PageVO {
public <T> QueryWrapper<T> distributionQueryWrapper() { public <T> QueryWrapper<T> distributionQueryWrapper() {
QueryWrapper<T> queryWrapper = new QueryWrapper<>(); QueryWrapper<T> queryWrapper = new QueryWrapper<>();
queryWrapper.eq(StringUtils.isNotEmpty(goodsName), "dg.goods_name", goodsName); queryWrapper.like(StringUtils.isNotEmpty(goodsName), "dg.goods_name", goodsName);
return queryWrapper; return queryWrapper;
} }

View File

@ -31,9 +31,10 @@ public class DraftGoods extends BaseEntity {
@ApiModelProperty(value = "商品名称") @ApiModelProperty(value = "商品名称")
private String goodsName; private String goodsName;
@Length(max = 30, message = "商品规格编号太长不能超过30个字符") @Max(value = 99999999, message = "价格不能超过99999999")
@ApiModelProperty(value = "商品编号") @ApiModelProperty(value = "商品价格")
private String sn; private Double price;
@ApiModelProperty(value = "品牌id") @ApiModelProperty(value = "品牌id")
private String brandId; private String brandId;
@ -47,9 +48,6 @@ public class DraftGoods extends BaseEntity {
@ApiModelProperty(value = "卖点") @ApiModelProperty(value = "卖点")
private String sellingPoint; private String sellingPoint;
@ApiModelProperty(value = "重量")
@Max(value = 99999999, message = "重量不能超过99999999")
private Double weight;
/** /**
* @see GoodsStatusEnum * @see GoodsStatusEnum
*/ */
@ -63,14 +61,6 @@ public class DraftGoods extends BaseEntity {
@ApiModelProperty(value = "商品移动端详情") @ApiModelProperty(value = "商品移动端详情")
private String mobileIntro; private String mobileIntro;
@Max(value = 99999999, message = "价格不能超过99999999")
@ApiModelProperty(value = "商品价格")
private Double price;
@Max(value = 99999999, message = "成本价格99999999")
@ApiModelProperty(value = "成本价格")
private Double cost;
@ApiModelProperty(value = "购买数量") @ApiModelProperty(value = "购买数量")
private Integer buyCount; private Integer buyCount;
@ -137,7 +127,7 @@ public class DraftGoods extends BaseEntity {
@ApiModelProperty(value = "商品图片JSON") @ApiModelProperty(value = "商品图片JSON")
private String goodsGalleryListJson; private String goodsGalleryListJson;
@ApiModelProperty(value = "sku列表JSON") @ApiModelProperty(value = "sku列表JSON")
private String skuListJson; private String skuListJson;

View File

@ -19,6 +19,9 @@ import lombok.Data;
import org.hibernate.validator.constraints.Length; import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.Max; import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Map; import java.util.Map;
/** /**
@ -33,17 +36,17 @@ import java.util.Map;
public class Goods extends BaseEntity { public class Goods extends BaseEntity {
private static final long serialVersionUID = 370683495251252601L; private static final long serialVersionUID = 370683495251252601L;
/**
* 商品名称
*/
@ApiModelProperty(value = "商品名称") @ApiModelProperty(value = "商品名称")
@NotEmpty(message = "商品名称不能为空")
@Length(max = 100, message = "商品名称提案仓不能超过100个字符")
private String goodsName; private String goodsName;
/**
* 商品编号 @ApiModelProperty(value = "商品价格", required = true)
*/ @NotNull(message = "商品价格不能为空")
@Length(max = 30, message = "商品规格编号太长不能超过30个字符") @Min(value = 0, message = "商品价格不能为负数")
@ApiModelProperty(value = "商品编号") @Max(value = 99999999, message = "商品价格不能超过99999999")
private String sn; private Double price;
@ApiModelProperty(value = "品牌id") @ApiModelProperty(value = "品牌id")
private String brandId; private String brandId;
@ -54,129 +57,69 @@ public class Goods extends BaseEntity {
@ApiModelProperty(value = "计量单位") @ApiModelProperty(value = "计量单位")
private String goodsUnit; private String goodsUnit;
/**
* 卖点 @Length(max = 60, message = "商品卖点太长不能超过60个字符")
*/
@ApiModelProperty(value = "卖点") @ApiModelProperty(value = "卖点")
private String sellingPoint; private String sellingPoint;
/** /**
* 重量
*/
@ApiModelProperty(value = "重量")
@Max(value = 99999999, message = "重量不能超过99999999")
private Double weight;
/**
* 上架状态
*
* @see GoodsStatusEnum * @see GoodsStatusEnum
*/ */
@ApiModelProperty(value = "上架状态") @ApiModelProperty(value = "上架状态")
private String marketEnable; private String marketEnable;
/**
* 详情
*/
@ApiModelProperty(value = "详情") @ApiModelProperty(value = "详情")
private String intro; private String intro;
/**
* 商品价格
*/
@Max(value = 99999999, message = "价格不能超过99999999")
@ApiModelProperty(value = "商品价格")
private Double price;
/**
* 成本价格
*/
@Max(value = 99999999, message = "成本价格99999999")
@ApiModelProperty(value = "成本价格")
private Double cost;
/**
* 购买数量
*/
@ApiModelProperty(value = "购买数量") @ApiModelProperty(value = "购买数量")
private Integer buyCount; private Integer buyCount;
/**
* 库存
*/
@Max(value = 99999999, message = "库存不能超过99999999") @Max(value = 99999999, message = "库存不能超过99999999")
@ApiModelProperty(value = "库存") @ApiModelProperty(value = "库存")
private Integer quantity; private Integer quantity;
/**
* 商品好评率
*/
@ApiModelProperty(value = "商品好评率") @ApiModelProperty(value = "商品好评率")
private Double grade; private Double grade;
/**
* 缩略图路径
*/
@ApiModelProperty(value = "缩略图路径") @ApiModelProperty(value = "缩略图路径")
private String thumbnail; private String thumbnail;
/**
* 小图路径
*/
@ApiModelProperty(value = "小图路径") @ApiModelProperty(value = "小图路径")
private String small; private String small;
/**
* 原图路径
*/
@ApiModelProperty(value = "原图路径") @ApiModelProperty(value = "原图路径")
private String original; private String original;
/**
* 店铺分类id
*/
@ApiModelProperty(value = "店铺分类id") @ApiModelProperty(value = "店铺分类id")
private String storeCategoryPath; private String storeCategoryPath;
/**
* 评论数量
*/
@ApiModelProperty(value = "评论数量") @ApiModelProperty(value = "评论数量")
private Integer commentNum; private Integer commentNum;
/**
* 卖家id
*/
@ApiModelProperty(value = "卖家id") @ApiModelProperty(value = "卖家id")
private String storeId; private String storeId;
/**
* 卖家名字
*/
@ApiModelProperty(value = "卖家名字") @ApiModelProperty(value = "卖家名字")
private String storeName; private String storeName;
/**
* 运费模板id
*/
@ApiModelProperty(value = "运费模板id") @ApiModelProperty(value = "运费模板id")
private String templateId; private String templateId;
/**
* 审核状态
*
* @see GoodsAuthEnum
*/
@ApiModelProperty(value = "审核状态") @ApiModelProperty(value = "审核状态")
private String isAuth; private String isAuth;
/**
* 审核信息
*/
@ApiModelProperty(value = "审核信息") @ApiModelProperty(value = "审核信息")
private String authMessage; private String authMessage;
/**
* 下架原因
*/
@ApiModelProperty(value = "下架原因") @ApiModelProperty(value = "下架原因")
private String underMessage; private String underMessage;
/**
* 是否自营
*/
@ApiModelProperty(value = "是否自营") @ApiModelProperty(value = "是否自营")
private Boolean selfOperated; private Boolean selfOperated;
/**
* 商品移动端详情
*/
@ApiModelProperty(value = "商品移动端详情") @ApiModelProperty(value = "商品移动端详情")
private String mobileIntro; private String mobileIntro;
/**
* 商品视频
*/
@ApiModelProperty(value = "商品视频") @ApiModelProperty(value = "商品视频")
private String goodsVideo; private String goodsVideo;
@ -207,9 +150,6 @@ public class Goods extends BaseEntity {
this.categoryPath = goodsOperationDTO.getCategoryPath(); this.categoryPath = goodsOperationDTO.getCategoryPath();
this.storeCategoryPath = goodsOperationDTO.getStoreCategoryPath(); this.storeCategoryPath = goodsOperationDTO.getStoreCategoryPath();
this.brandId = goodsOperationDTO.getBrandId(); this.brandId = goodsOperationDTO.getBrandId();
this.sn = goodsOperationDTO.getSn();
this.price = goodsOperationDTO.getPrice();
this.weight = goodsOperationDTO.getWeight();
this.templateId = goodsOperationDTO.getTemplateId(); this.templateId = goodsOperationDTO.getTemplateId();
this.recommend = goodsOperationDTO.getRecommend(); this.recommend = goodsOperationDTO.getRecommend();
this.sellingPoint = goodsOperationDTO.getSellingPoint(); this.sellingPoint = goodsOperationDTO.getSellingPoint();
@ -217,8 +157,8 @@ public class Goods extends BaseEntity {
this.goodsUnit = goodsOperationDTO.getGoodsUnit(); this.goodsUnit = goodsOperationDTO.getGoodsUnit();
this.intro = goodsOperationDTO.getIntro(); this.intro = goodsOperationDTO.getIntro();
this.mobileIntro = goodsOperationDTO.getMobileIntro(); this.mobileIntro = goodsOperationDTO.getMobileIntro();
this.cost = goodsOperationDTO.getCost();
this.goodsVideo = goodsOperationDTO.getGoodsVideo(); this.goodsVideo = goodsOperationDTO.getGoodsVideo();
this.price = goodsOperationDTO.getPrice();
if (goodsOperationDTO.getGoodsParamsDTOList() != null && goodsOperationDTO.getGoodsParamsDTOList().isEmpty()) { if (goodsOperationDTO.getGoodsParamsDTOList() != null && goodsOperationDTO.getGoodsParamsDTOList().isEmpty()) {
this.params = JSONUtil.toJsonStr(goodsOperationDTO.getGoodsParamsDTOList()); this.params = JSONUtil.toJsonStr(goodsOperationDTO.getGoodsParamsDTOList());
} }

View File

@ -29,6 +29,12 @@ public class GoodsOperationDTO implements Serializable {
@ApiModelProperty(hidden = true) @ApiModelProperty(hidden = true)
private String goodsId; private String goodsId;
@ApiModelProperty(value = "商品价格", required = true)
@NotNull(message = "商品价格不能为空")
@Min(value = 0, message = "商品价格不能为负数")
@Max(value = 99999999, message = "商品价格不能超过99999999")
private Double price;
@ApiModelProperty(value = "分类path") @ApiModelProperty(value = "分类path")
private String categoryPath; private String categoryPath;
@ -45,25 +51,6 @@ public class GoodsOperationDTO implements Serializable {
@NotEmpty(message = "商品名称不能为空") @NotEmpty(message = "商品名称不能为空")
private String goodsName; private String goodsName;
@ApiModelProperty(value = "商品编号", required = true)
@Length(max = 30, message = "商品编号太长不能超过30个字符")
private String sn;
@ApiModelProperty(value = "商品价格", required = true)
@NotNull(message = "商品价格不能为空")
@Min(value = 0, message = "商品价格不能为负数")
@Max(value = 99999999, message = "商品价格不能超过99999999")
private Double price;
@ApiModelProperty(value = "市场价格", required = true)
@NotNull(message = "市场价格不能为空")
private Double cost;
@ApiModelProperty(value = "重量", required = true)
@NotNull(message = "商品重量不能为空")
@Min(value = 0, message = "重量不能为负数")
@Max(value = 99999999, message = "重量不能超过99999999")
private Double weight;
@ApiModelProperty(value = "详情") @ApiModelProperty(value = "详情")
private String intro; private String intro;

View File

@ -26,7 +26,7 @@ public class GoodsSearchParams extends PageVO {
private String goodsName; private String goodsName;
@ApiModelProperty(value = "商品编号") @ApiModelProperty(value = "商品编号")
private String sn; private String id;
@ApiModelProperty(value = "商家ID") @ApiModelProperty(value = "商家ID")
private String storeId; private String storeId;
@ -78,8 +78,8 @@ public class GoodsSearchParams extends PageVO {
if (StringUtils.isNotEmpty(goodsName)) { if (StringUtils.isNotEmpty(goodsName)) {
queryWrapper.like("goods_name", goodsName); queryWrapper.like("goods_name", goodsName);
} }
if (StringUtils.isNotEmpty(sn)) { if (StringUtils.isNotEmpty(id)) {
queryWrapper.eq("sn", sn); queryWrapper.eq("id", id);
} }
if (StringUtils.isNotEmpty(storeId)) { if (StringUtils.isNotEmpty(storeId)) {
queryWrapper.eq("store_id", storeId); queryWrapper.eq("store_id", storeId);

View File

@ -744,6 +744,10 @@ public class CartServiceImpl implements CartService {
PointsGoodsVO pointsGoodsVO = pointsGoodsService.getPointsGoodsVOByMongo(cartSkuVO.getGoodsSku().getId()); PointsGoodsVO pointsGoodsVO = pointsGoodsService.getPointsGoodsVOByMongo(cartSkuVO.getGoodsSku().getId());
if (pointsGoodsVO != null) { if (pointsGoodsVO != null) {
if (pointsGoodsVO.getActiveStock() < 1) {
throw new ServiceException(ResultCode.POINT_GOODS_ACTIVE_STOCK_INSUFFICIENT);
}
cartSkuVO.setPoint(pointsGoodsVO.getPoints()); cartSkuVO.setPoint(pointsGoodsVO.getPoints());
cartSkuVO.setPurchasePrice(0D); cartSkuVO.setPurchasePrice(0D);
cartSkuVO.setPointsId(pointsGoodsVO.getId()); cartSkuVO.setPointsId(pointsGoodsVO.getId());

File diff suppressed because one or more lines are too long

View File

@ -185,7 +185,7 @@ public class KanjiaActivityGoodsServiceImpl extends ServiceImpl<KanJiaActivityGo
} }
//校验活动库存是否超出此sku的库存 //校验活动库存是否超出此sku的库存
if (goodsSku.getQuantity() < kanJiaActivityGoodsDTO.getStock()) { if (goodsSku.getQuantity() < kanJiaActivityGoodsDTO.getStock()) {
throw new ServiceException(ResultCode.POINT_GOODS_ACTIVE_STOCK_ERROR); throw new ServiceException(ResultCode.KANJIA_GOODS_ACTIVE_STOCK_ERROR);
} }
//校验最低购买金额不能高于商品金额 //校验最低购买金额不能高于商品金额
if (goodsSku.getPrice() < kanJiaActivityGoodsDTO.getPurchasePrice()) { if (goodsSku.getPrice() < kanJiaActivityGoodsDTO.getPurchasePrice()) {

View File

@ -5,7 +5,9 @@ import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.Max;
import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.math.BigDecimal; import java.math.BigDecimal;
@ -27,15 +29,17 @@ public class StoreGoodsLabel extends BaseEntity {
private String storeId; private String storeId;
@NotEmpty(message = "店铺商品分类名称不能为空") @NotEmpty(message = "店铺商品分类名称不能为空")
@Length(max = 20,message = "店铺商品分类名称太长")
@ApiModelProperty("店铺商品分类名称") @ApiModelProperty("店铺商品分类名称")
private String labelName; private String labelName;
@NotNull(message = "店铺商品分类排序不能为空") @NotNull(message = "店铺商品分类排序不能为空")
@Max(value = 99999,message = "排序值太大")
@ApiModelProperty("店铺商品分类排序") @ApiModelProperty("店铺商品分类排序")
private BigDecimal sortOrder; private BigDecimal sortOrder;
@NotNull(message = "父节点不能为空,需设定根节点或者某节点的子节点") @NotEmpty(message = "父节点不能为空,需设定根节点或者某节点的子节点")
@ApiModelProperty(value = "父id, 根节点为0") @ApiModelProperty(value = "父id, 根节点为0")
private String parentId; private String parentId;