升级:1、增加界面夜间模式

2、qtask 功能交互升级
     3、mysql连接管理增加心跳保活
     4、其他修改
This commit is contained in:
2024-03-31 00:34:26 +08:00
parent 8cc55c2c4b
commit 4dcebf32de
37 changed files with 1136 additions and 301 deletions

View File

@@ -1,11 +1,15 @@
package net.tccn.base;
import org.redkale.annotation.Resource;
import org.redkale.convert.json.JsonConvert;
import org.redkale.service.RetResult;
import org.redkale.service.Service;
import org.redkale.source.CacheMemorySource;
import org.redkale.source.DataSource;
import org.redkale.util.Sheet;
import javax.annotation.Resource;
import java.io.File;
import java.util.List;
import java.util.Properties;
import java.util.function.Supplier;
import java.util.logging.Logger;
@@ -29,12 +33,33 @@ public class BaseService implements Service {
@Resource(name = "APP_HOME")
protected File APP_HOME;
@Resource(name = "meta")
protected DataSource metaSource;
protected static Properties prop = new Properties();
protected static TplKit tplKit = TplKit.use(true);
private static boolean tplInit = false;
protected final static RetResult RET_SUCCESS = RetResult.success();
protected final static RetResult RET_EMPTY_SHEET = RetResult.success(new Sheet<>(0, List.of()));
protected final static RetResult RET_EMPTY_LIST = RetResult.success(List.of());
protected RetResult retError(String info) {
return new RetResult<>(100, info);
}
protected RetResult retError(int code, String info) {
return new RetResult<>(code, info);
}
protected <T> RetResult<T> render(T obj) {
return new RetResult<>(obj);
}
protected RetResult render() {
return RET_SUCCESS;
}
protected <T> T getT(String key, Class<T> clazz, Supplier<T> supplier) {
Object obj = cacheSource.getAndRefresh(key, 1000 * 60 * 3, clazz);
if (obj != null) {