删除 delete 枚举
This commit is contained in:
@@ -3,7 +3,7 @@ package com.czg.controller.admin;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.czg.BaseQueryParam;
|
||||
import com.czg.annotation.SaAdminCheckPermission;
|
||||
import com.czg.enums.DeleteEnum;
|
||||
import com.czg.constants.SystemConstants;
|
||||
import com.czg.exception.CzgException;
|
||||
import com.czg.market.dto.MkPointsGoodsDTO;
|
||||
import com.czg.market.entity.MkPointsGoods;
|
||||
@@ -62,7 +62,7 @@ public class PointsGoodsController {
|
||||
dto.setShopId(StpKit.USER.getShopId());
|
||||
if (dto.getCouponId() != null) {
|
||||
ShopCoupon coupon = shopCouponService.getById(dto.getCouponId());
|
||||
if (coupon == null || coupon.getIsDel() == DeleteEnum.DELETED.value() || coupon.getStatus() != 1) {
|
||||
if (coupon == null || coupon.getIsDel() == SystemConstants.OneZero.ONE || coupon.getStatus() != 1) {
|
||||
throw new CzgException("操作失败,优惠券已删除或未启用");
|
||||
}
|
||||
if ("custom".equals(coupon.getValidType())) {
|
||||
@@ -88,7 +88,7 @@ public class PointsGoodsController {
|
||||
@SaAdminCheckPermission(parentName = "积分相关", value = "points:goods:delete", name = "积分-商品-删除")
|
||||
public CzgResult<Void> deletePointsGoodsSetting(@PathVariable("id") Long id) {
|
||||
MkPointsGoods entity = pointsGoodsSettingService.getById(id);
|
||||
entity.setDelFlag(DeleteEnum.DELETED.value());
|
||||
entity.setDelFlag(SystemConstants.OneZero.ONE);
|
||||
pointsGoodsSettingService.updateById(entity);
|
||||
return CzgResult.success();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user