package com.glxp.api.util; import cn.hutool.core.util.StrUtil; public class IntUtil { public static int value(Integer value) { if (value == null) return 0; else return value.intValue(); } public static long value(Long value) { if (value == null) return 0l; else return value.longValue(); } public static boolean value(Boolean value) { if (value == null) return false; else return value; } public static int value(String value) { if (StrUtil.isEmpty(value)) return 0; else return Integer.parseInt(value); } }