mall - trade - 新增 TradeDeliveryPriceCalculator

This commit is contained in:
jason
2023-06-03 17:16:18 +08:00
parent 73a781cbbe
commit f1fa8eadd2
8 changed files with 271 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
package cn.iocoder.yudao.module.trade.enums.delivery;
import cn.hutool.core.util.ArrayUtil;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
@@ -35,4 +36,8 @@ public enum DeliveryExpressChargeModeEnum implements IntArrayValuable {
return ARRAYS;
}
public static DeliveryExpressChargeModeEnum valueOf(Integer value) {
return ArrayUtil.firstMatch(chargeMode -> chargeMode.getType().equals(value), DeliveryExpressChargeModeEnum.values());
}
}