.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
package net.tccn.service;
|
||||
|
||||
import com.arangodb.Predicate;
|
||||
import net.tccn.base.MetaKit;
|
||||
import net.tccn.base.TplKit;
|
||||
import net.tccn.base.X;
|
||||
import org.redkale.convert.json.JsonConvert;
|
||||
import org.redkale.net.http.RestMapping;
|
||||
import org.redkale.service.Service;
|
||||
@@ -13,9 +13,6 @@ import javax.annotation.Resource;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.logging.Logger;
|
||||
@@ -30,23 +27,8 @@ public class BaseService implements Service {
|
||||
@Resource(name = "SERVER_ROOT")
|
||||
protected File webroot;
|
||||
|
||||
|
||||
public Logger logger = Logger.getLogger(this.getClass().getSimpleName());
|
||||
|
||||
public static Predicate isEmpty = (x) -> {
|
||||
if (x == null)
|
||||
return true;
|
||||
if (x instanceof List)
|
||||
return ((List) x).isEmpty();
|
||||
if (x instanceof String)
|
||||
return ((String) x).isEmpty();
|
||||
if (x instanceof Map)
|
||||
return ((Map) x).isEmpty();
|
||||
if (x instanceof Collection)
|
||||
return ((Collection) x).isEmpty();
|
||||
return false;
|
||||
};
|
||||
|
||||
public static boolean isWinos = System.getProperty("os.name").contains("Window");
|
||||
|
||||
@Resource(name = "cacheSource")
|
||||
@@ -110,4 +92,7 @@ public class BaseService implements Service {
|
||||
return MetaKit.getPlatId(token);
|
||||
}
|
||||
|
||||
public boolean isEmpty(Object obj) {
|
||||
return X.isEmpty(obj);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user