订单:介入 TradeOrderHandler#cancelOrder

This commit is contained in:
puhui999
2023-10-07 16:58:40 +08:00
parent c485c6e04d
commit 89b240c1f9
6 changed files with 57 additions and 15 deletions

View File

@ -1,5 +1,6 @@
package cn.iocoder.yudao.module.trade.enums.order;
import cn.hutool.core.util.ObjectUtil;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@ -37,4 +38,20 @@ public enum TradeOrderTypeEnum implements IntArrayValuable {
return ARRAYS;
}
public static boolean isNormal(Integer type) {
return ObjectUtil.equal(type, NORMAL.getType());
}
public static boolean isSeckill(Integer type) {
return ObjectUtil.equal(type, SECKILL.getType());
}
public static boolean isBargain(Integer type) {
return ObjectUtil.equal(type, BARGAIN.getType());
}
public static boolean isCombination(Integer type) {
return ObjectUtil.equal(type, COMBINATION.getType());
}
}