|
@@ -21,23 +21,9 @@ public class AssertUtil {
|
|
|
* @param: message
|
|
|
**/
|
|
|
public static void isNotBlank(Object object,String message){
|
|
|
- if (object == null) {
|
|
|
+ if(!isNotBlank(object)){
|
|
|
throw new BizException(message,R.ERR_CODE);
|
|
|
}
|
|
|
- else if (object instanceof Collection) {
|
|
|
- if(CollUtil.isEmpty((Collection)object)){
|
|
|
- throw new BizException(message,R.ERR_CODE);
|
|
|
- }
|
|
|
- }
|
|
|
- else if (object instanceof Map) {
|
|
|
- if(CollUtil.isEmpty((Map)object)){
|
|
|
- throw new BizException(message,R.ERR_CODE);
|
|
|
- }
|
|
|
- }else {
|
|
|
- if (StrUtil.isBlank(object.toString())) {
|
|
|
- throw new BizException(message,R.ERR_CODE);
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
/**
|
|
|
* @description:至少有一个不能为空
|