com.zopen.alipay.exception.AlipayAssert Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zopen-ato-starter Show documentation
Show all versions of zopen-ato-starter Show documentation
Alibaba Tencent And Others For Spring Boot.
package com.zopen.alipay.exception;
import com.zcj.util.UtilString;
import org.springframework.util.CollectionUtils;
import java.util.Map;
public class AlipayAssert {
public static void notNull(Object object, String message) {
if (object == null) {
throw new AlipayException(message);
}
}
public static void notNullAndEmpty(String object, String message) {
if (UtilString.isBlank(object)) {
throw new AlipayException(message);
}
}
public static void checkArgument(boolean expression, String message) {
if (!expression) {
throw new AlipayException(message);
}
}
public static void notEmpty(Map, ?> map, String message) {
if (CollectionUtils.isEmpty(map)) {
throw new AlipayException(message);
}
}
}