mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-11 05:19:00 +08:00
🎨 改进结构和代码格式。 更新无用代码和不规范代码
This commit is contained in:
1 parent
24021e6c6d
commit
5cb53c3e3b
5 files changed
+10
-10
No files matched your search
@@ -173,7 +173,7 @@ public class PigxTokenEndpoint {
|
||||
redisTemplate.setValueSerializer(new JdkSerializationRedisSerializer());
|
||||
Page result = new Page(MapUtil.getInt(params, PaginationConstants.CURRENT), MapUtil.getInt(params, PaginationConstants.SIZE));
|
||||
result.setRecords(redisTemplate.opsForValue().multiGet(pages));
|
||||
result.setTotal(Long.valueOf(redisTemplate.keys(key).size()));
|
||||
result.setTotal((long) redisTemplate.keys(key).size());
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ public class JarTaskInvok implements ITaskInvok {
|
||||
}
|
||||
processBuilder.command(commands);
|
||||
try {
|
||||
Process process = processBuilder.start();
|
||||
processBuilder.start();
|
||||
} catch (IOException e) {
|
||||
log.error("定时任务jar反射执行异常,执行任务:{}", sysJob.getExecutePath());
|
||||
throw new TaskException("定时任务jar反射执行异常,执行任务:" + sysJob.getExecutePath());
|
||||
|
||||
+4
-4
@@ -37,10 +37,10 @@ import java.lang.reflect.Method;
|
||||
public class JavaClassTaskInvok implements ITaskInvok {
|
||||
@Override
|
||||
public void invokMethod(SysJob sysJob) throws TaskException {
|
||||
Object obj = null;
|
||||
Class clazz = null;
|
||||
Method method = null;
|
||||
Object returnValue = null;
|
||||
Object obj;
|
||||
Class clazz;
|
||||
Method method;
|
||||
Object returnValue;
|
||||
try {
|
||||
if (StrUtil.isNotEmpty(sysJob.getMethodParamsValue())) {
|
||||
clazz = Class.forName(sysJob.getClassName());
|
||||
|
||||
+3
-3
@@ -40,9 +40,9 @@ import java.lang.reflect.Method;
|
||||
public class SpringBeanTaskInvok implements ITaskInvok {
|
||||
@Override
|
||||
public void invokMethod(SysJob sysJob) throws TaskException {
|
||||
Object target = null;
|
||||
Method method = null;
|
||||
Object returnValue = null;
|
||||
Object target;
|
||||
Method method;
|
||||
Object returnValue;
|
||||
//通过Spring上下文去找 也有可能找不到
|
||||
target = SpringContextHolder.getBean(sysJob.getClassName());
|
||||
try {
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ public class ModelInfoManager {
|
||||
|
||||
|
||||
private static ModelInfoManager manager = null;
|
||||
private List<ModelInfo> modelInfos = new CopyOnWriteArrayList<ModelInfo>();
|
||||
private List<ModelInfo> modelInfos = new CopyOnWriteArrayList<>();
|
||||
|
||||
public static ModelInfoManager getInstance() {
|
||||
if (manager == null) {
|
||||
|
||||
Reference in new issue
Block a user