Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
cee572f2
Commit
cee572f2
authored
Jul 19, 2020
by
RuoYi
Browse files
若依 3.0
parent
0d341f1a
Changes
279
Hide whitespace changes
Inline
Side-by-side
ruoyi/src/main/java/com/ruoyi/
common/utils/job
/JobInvokeUtil.java
→
ruoyi
-quartz
/src/main/java/com/ruoyi/
quartz/util
/JobInvokeUtil.java
View file @
cee572f2
package
com.ruoyi.
common.utils.job
;
import
java.lang.reflect.InvocationTargetException
;
import
java.lang.reflect.Method
;
import
java.util.LinkedList
;
import
java.util.List
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.common.utils.spring.SpringUtils
;
import
com.ruoyi.
project.monitor
.domain.SysJob
;
/**
* 任务执行工具
*
* @author ruoyi
*/
public
class
JobInvokeUtil
{
/**
* 执行方法
*
* @param sysJob 系统任务
*/
public
static
void
invokeMethod
(
SysJob
sysJob
)
throws
Exception
{
String
invokeTarget
=
sysJob
.
getInvokeTarget
();
String
beanName
=
getBeanName
(
invokeTarget
);
String
methodName
=
getMethodName
(
invokeTarget
);
List
<
Object
[]>
methodParams
=
getMethodParams
(
invokeTarget
);
if
(!
isValidClassName
(
beanName
))
{
Object
bean
=
SpringUtils
.
getBean
(
beanName
);
invokeMethod
(
bean
,
methodName
,
methodParams
);
}
else
{
Object
bean
=
Class
.
forName
(
beanName
).
newInstance
();
invokeMethod
(
bean
,
methodName
,
methodParams
);
}
}
/**
* 调用任务方法
*
* @param bean 目标对象
* @param methodName 方法名称
* @param methodParams 方法参数
*/
private
static
void
invokeMethod
(
Object
bean
,
String
methodName
,
List
<
Object
[]>
methodParams
)
throws
NoSuchMethodException
,
SecurityException
,
IllegalAccessException
,
IllegalArgumentException
,
InvocationTargetException
{
if
(
StringUtils
.
isNotNull
(
methodParams
)
&&
methodParams
.
size
()
>
0
)
{
Method
method
=
bean
.
getClass
().
getDeclaredMethod
(
methodName
,
getMethodParamsType
(
methodParams
));
method
.
invoke
(
bean
,
getMethodParamsValue
(
methodParams
));
}
else
{
Method
method
=
bean
.
getClass
().
getDeclaredMethod
(
methodName
);
method
.
invoke
(
bean
);
}
}
/**
* 校验是否为为class包名
*
* @param str 名称
* @return true是 false否
*/
public
static
boolean
isValidClassName
(
String
invokeTarget
)
{
return
StringUtils
.
countMatches
(
invokeTarget
,
"."
)
>
1
;
}
/**
* 获取bean名称
*
* @param invokeTarget 目标字符串
* @return bean名称
*/
public
static
String
getBeanName
(
String
invokeTarget
)
{
String
beanName
=
StringUtils
.
substringBefore
(
invokeTarget
,
"("
);
return
StringUtils
.
substringBeforeLast
(
beanName
,
"."
);
}
/**
* 获取bean方法
*
* @param invokeTarget 目标字符串
* @return method方法
*/
public
static
String
getMethodName
(
String
invokeTarget
)
{
String
methodName
=
StringUtils
.
substringBefore
(
invokeTarget
,
"("
);
return
StringUtils
.
substringAfterLast
(
methodName
,
"."
);
}
/**
* 获取method方法参数相关列表
*
* @param invokeTarget 目标字符串
* @return method方法相关参数列表
*/
public
static
List
<
Object
[]>
getMethodParams
(
String
invokeTarget
)
{
String
methodStr
=
StringUtils
.
substringBetween
(
invokeTarget
,
"("
,
")"
);
if
(
StringUtils
.
isEmpty
(
methodStr
))
{
return
null
;
}
String
[]
methodParams
=
methodStr
.
split
(
","
);
List
<
Object
[]>
classs
=
new
LinkedList
<>();
for
(
int
i
=
0
;
i
<
methodParams
.
length
;
i
++)
{
String
str
=
StringUtils
.
trimToEmpty
(
methodParams
[
i
]);
// String字符串类型,包含'
if
(
StringUtils
.
contains
(
str
,
"'"
))
{
classs
.
add
(
new
Object
[]
{
StringUtils
.
replace
(
str
,
"'"
,
""
),
String
.
class
});
}
// boolean布尔类型,等于true或者false
else
if
(
StringUtils
.
equals
(
str
,
"true"
)
||
StringUtils
.
equalsIgnoreCase
(
str
,
"false"
))
{
classs
.
add
(
new
Object
[]
{
Boolean
.
valueOf
(
str
),
Boolean
.
class
});
}
// long长整形,包含L
else
if
(
StringUtils
.
containsIgnoreCase
(
str
,
"L"
))
{
classs
.
add
(
new
Object
[]
{
Long
.
valueOf
(
StringUtils
.
replaceIgnoreCase
(
str
,
"L"
,
""
)),
Long
.
class
});
}
// double浮点类型,包含D
else
if
(
StringUtils
.
containsIgnoreCase
(
str
,
"D"
))
{
classs
.
add
(
new
Object
[]
{
Double
.
valueOf
(
StringUtils
.
replaceIgnoreCase
(
str
,
"D"
,
""
)),
Double
.
class
});
}
// 其他类型归类为整形
else
{
classs
.
add
(
new
Object
[]
{
Integer
.
valueOf
(
str
),
Integer
.
class
});
}
}
return
classs
;
}
/**
* 获取参数类型
*
* @param methodParams 参数相关列表
* @return 参数类型列表
*/
public
static
Class
<?>[]
getMethodParamsType
(
List
<
Object
[]>
methodParams
)
{
Class
<?>[]
classs
=
new
Class
<?>[
methodParams
.
size
()];
int
index
=
0
;
for
(
Object
[]
os
:
methodParams
)
{
classs
[
index
]
=
(
Class
<?>)
os
[
1
];
index
++;
}
return
classs
;
}
/**
* 获取参数值
*
* @param methodParams 参数相关列表
* @return 参数值列表
*/
public
static
Object
[]
getMethodParamsValue
(
List
<
Object
[]>
methodParams
)
{
Object
[]
classs
=
new
Object
[
methodParams
.
size
()];
int
index
=
0
;
for
(
Object
[]
os
:
methodParams
)
{
classs
[
index
]
=
(
Object
)
os
[
0
];
index
++;
}
return
classs
;
}
}
package
com.ruoyi.
quartz.util
;
import
java.lang.reflect.InvocationTargetException
;
import
java.lang.reflect.Method
;
import
java.util.LinkedList
;
import
java.util.List
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.common.utils.spring.SpringUtils
;
import
com.ruoyi.
quartz
.domain.SysJob
;
/**
* 任务执行工具
*
* @author ruoyi
*/
public
class
JobInvokeUtil
{
/**
* 执行方法
*
* @param sysJob 系统任务
*/
public
static
void
invokeMethod
(
SysJob
sysJob
)
throws
Exception
{
String
invokeTarget
=
sysJob
.
getInvokeTarget
();
String
beanName
=
getBeanName
(
invokeTarget
);
String
methodName
=
getMethodName
(
invokeTarget
);
List
<
Object
[]>
methodParams
=
getMethodParams
(
invokeTarget
);
if
(!
isValidClassName
(
beanName
))
{
Object
bean
=
SpringUtils
.
getBean
(
beanName
);
invokeMethod
(
bean
,
methodName
,
methodParams
);
}
else
{
Object
bean
=
Class
.
forName
(
beanName
).
newInstance
();
invokeMethod
(
bean
,
methodName
,
methodParams
);
}
}
/**
* 调用任务方法
*
* @param bean 目标对象
* @param methodName 方法名称
* @param methodParams 方法参数
*/
private
static
void
invokeMethod
(
Object
bean
,
String
methodName
,
List
<
Object
[]>
methodParams
)
throws
NoSuchMethodException
,
SecurityException
,
IllegalAccessException
,
IllegalArgumentException
,
InvocationTargetException
{
if
(
StringUtils
.
isNotNull
(
methodParams
)
&&
methodParams
.
size
()
>
0
)
{
Method
method
=
bean
.
getClass
().
getDeclaredMethod
(
methodName
,
getMethodParamsType
(
methodParams
));
method
.
invoke
(
bean
,
getMethodParamsValue
(
methodParams
));
}
else
{
Method
method
=
bean
.
getClass
().
getDeclaredMethod
(
methodName
);
method
.
invoke
(
bean
);
}
}
/**
* 校验是否为为class包名
*
* @param str 名称
* @return true是 false否
*/
public
static
boolean
isValidClassName
(
String
invokeTarget
)
{
return
StringUtils
.
countMatches
(
invokeTarget
,
"."
)
>
1
;
}
/**
* 获取bean名称
*
* @param invokeTarget 目标字符串
* @return bean名称
*/
public
static
String
getBeanName
(
String
invokeTarget
)
{
String
beanName
=
StringUtils
.
substringBefore
(
invokeTarget
,
"("
);
return
StringUtils
.
substringBeforeLast
(
beanName
,
"."
);
}
/**
* 获取bean方法
*
* @param invokeTarget 目标字符串
* @return method方法
*/
public
static
String
getMethodName
(
String
invokeTarget
)
{
String
methodName
=
StringUtils
.
substringBefore
(
invokeTarget
,
"("
);
return
StringUtils
.
substringAfterLast
(
methodName
,
"."
);
}
/**
* 获取method方法参数相关列表
*
* @param invokeTarget 目标字符串
* @return method方法相关参数列表
*/
public
static
List
<
Object
[]>
getMethodParams
(
String
invokeTarget
)
{
String
methodStr
=
StringUtils
.
substringBetween
(
invokeTarget
,
"("
,
")"
);
if
(
StringUtils
.
isEmpty
(
methodStr
))
{
return
null
;
}
String
[]
methodParams
=
methodStr
.
split
(
","
);
List
<
Object
[]>
classs
=
new
LinkedList
<>();
for
(
int
i
=
0
;
i
<
methodParams
.
length
;
i
++)
{
String
str
=
StringUtils
.
trimToEmpty
(
methodParams
[
i
]);
// String字符串类型,包含'
if
(
StringUtils
.
contains
(
str
,
"'"
))
{
classs
.
add
(
new
Object
[]
{
StringUtils
.
replace
(
str
,
"'"
,
""
),
String
.
class
});
}
// boolean布尔类型,等于true或者false
else
if
(
StringUtils
.
equals
(
str
,
"true"
)
||
StringUtils
.
equalsIgnoreCase
(
str
,
"false"
))
{
classs
.
add
(
new
Object
[]
{
Boolean
.
valueOf
(
str
),
Boolean
.
class
});
}
// long长整形,包含L
else
if
(
StringUtils
.
containsIgnoreCase
(
str
,
"L"
))
{
classs
.
add
(
new
Object
[]
{
Long
.
valueOf
(
StringUtils
.
replaceIgnoreCase
(
str
,
"L"
,
""
)),
Long
.
class
});
}
// double浮点类型,包含D
else
if
(
StringUtils
.
containsIgnoreCase
(
str
,
"D"
))
{
classs
.
add
(
new
Object
[]
{
Double
.
valueOf
(
StringUtils
.
replaceIgnoreCase
(
str
,
"D"
,
""
)),
Double
.
class
});
}
// 其他类型归类为整形
else
{
classs
.
add
(
new
Object
[]
{
Integer
.
valueOf
(
str
),
Integer
.
class
});
}
}
return
classs
;
}
/**
* 获取参数类型
*
* @param methodParams 参数相关列表
* @return 参数类型列表
*/
public
static
Class
<?>[]
getMethodParamsType
(
List
<
Object
[]>
methodParams
)
{
Class
<?>[]
classs
=
new
Class
<?>[
methodParams
.
size
()];
int
index
=
0
;
for
(
Object
[]
os
:
methodParams
)
{
classs
[
index
]
=
(
Class
<?>)
os
[
1
];
index
++;
}
return
classs
;
}
/**
* 获取参数值
*
* @param methodParams 参数相关列表
* @return 参数值列表
*/
public
static
Object
[]
getMethodParamsValue
(
List
<
Object
[]>
methodParams
)
{
Object
[]
classs
=
new
Object
[
methodParams
.
size
()];
int
index
=
0
;
for
(
Object
[]
os
:
methodParams
)
{
classs
[
index
]
=
(
Object
)
os
[
0
];
index
++;
}
return
classs
;
}
}
ruoyi/src/main/java/com/ruoyi/
common/utils/job
/QuartzDisallowConcurrentExecution.java
→
ruoyi
-quartz
/src/main/java/com/ruoyi/
quartz/util
/QuartzDisallowConcurrentExecution.java
View file @
cee572f2
package
com.ruoyi.
common.utils.job
;
import
org.quartz.DisallowConcurrentExecution
;
import
org.quartz.JobExecutionContext
;
import
com.ruoyi.
project.monitor
.domain.SysJob
;
/**
* 定时任务处理(禁止并发执行)
*
* @author ruoyi
*
*/
@DisallowConcurrentExecution
public
class
QuartzDisallowConcurrentExecution
extends
AbstractQuartzJob
{
@Override
protected
void
doExecute
(
JobExecutionContext
context
,
SysJob
sysJob
)
throws
Exception
{
JobInvokeUtil
.
invokeMethod
(
sysJob
);
}
}
package
com.ruoyi.
quartz.util
;
import
org.quartz.DisallowConcurrentExecution
;
import
org.quartz.JobExecutionContext
;
import
com.ruoyi.
quartz
.domain.SysJob
;
/**
* 定时任务处理(禁止并发执行)
*
* @author ruoyi
*
*/
@DisallowConcurrentExecution
public
class
QuartzDisallowConcurrentExecution
extends
AbstractQuartzJob
{
@Override
protected
void
doExecute
(
JobExecutionContext
context
,
SysJob
sysJob
)
throws
Exception
{
JobInvokeUtil
.
invokeMethod
(
sysJob
);
}
}
ruoyi/src/main/java/com/ruoyi/
common/utils/job
/QuartzJobExecution.java
→
ruoyi
-quartz
/src/main/java/com/ruoyi/
quartz/util
/QuartzJobExecution.java
View file @
cee572f2
package
com.ruoyi.
common.utils.job
;
import
org.quartz.JobExecutionContext
;
import
com.ruoyi.
project.monitor
.domain.SysJob
;
/**
* 定时任务处理(允许并发执行)
*
* @author ruoyi
*
*/
public
class
QuartzJobExecution
extends
AbstractQuartzJob
{
@Override
protected
void
doExecute
(
JobExecutionContext
context
,
SysJob
sysJob
)
throws
Exception
{
JobInvokeUtil
.
invokeMethod
(
sysJob
);
}
}
package
com.ruoyi.
quartz.util
;
import
org.quartz.JobExecutionContext
;
import
com.ruoyi.
quartz
.domain.SysJob
;
/**
* 定时任务处理(允许并发执行)
*
* @author ruoyi
*
*/
public
class
QuartzJobExecution
extends
AbstractQuartzJob
{
@Override
protected
void
doExecute
(
JobExecutionContext
context
,
SysJob
sysJob
)
throws
Exception
{
JobInvokeUtil
.
invokeMethod
(
sysJob
);
}
}
ruoyi/src/main/java/com/ruoyi/
common/utils/job
/ScheduleUtils.java
→
ruoyi
-quartz
/src/main/java/com/ruoyi/
quartz/util
/ScheduleUtils.java
View file @
cee572f2
package
com.ruoyi.common.utils.job
;
import
org.quartz.CronScheduleBuilder
;
import
org.quartz.CronTrigger
;
import
org.quartz.Job
;
import
org.quartz.JobBuilder
;
import
org.quartz.JobDetail
;
import
org.quartz.JobKey
;
import
org.quartz.Scheduler
;
import
org.quartz.SchedulerException
;
import
org.quartz.TriggerBuilder
;
import
org.quartz.TriggerKey
;
import
com.ruoyi.common.constant.ScheduleConstants
;
import
com.ruoyi.common.exception.job.TaskException
;
import
com.ruoyi.common.exception.job.TaskException.Code
;
import
com.ruoyi.project.monitor.domain.SysJob
;
/**
* 定时任务工具类
*
* @author ruoyi
*
*/
public
class
ScheduleUtils
{
/**
* 得到quartz任务类
*
* @param sysJob 执行计划
* @return 具体执行任务类
*/
private
static
Class
<?
extends
Job
>
getQuartzJobClass
(
SysJob
sysJob
)
{
boolean
isConcurrent
=
"0"
.
equals
(
sysJob
.
getConcurrent
());
return
isConcurrent
?
QuartzJobExecution
.
class
:
QuartzDisallowConcurrentExecution
.
class
;
}
/**
* 构建任务触发对象
*/
public
static
TriggerKey
getTriggerKey
(
Long
jobId
,
String
jobGroup
)
{
return
TriggerKey
.
triggerKey
(
ScheduleConstants
.
TASK_CLASS_NAME
+
jobId
,
jobGroup
);
}
/**
* 构建任务键对象
*/
public
static
JobKey
getJobKey
(
Long
jobId
,
String
jobGroup
)
{
return
JobKey
.
jobKey
(
ScheduleConstants
.
TASK_CLASS_NAME
+
jobId
,
jobGroup
);
}
/**
* 创建定时任务
*/
public
static
void
createScheduleJob
(
Scheduler
scheduler
,
SysJob
job
)
throws
SchedulerException
,
TaskException
{
Class
<?
extends
Job
>
jobClass
=
getQuartzJobClass
(
job
);
// 构建job信息
Long
jobId
=
job
.
getJobId
();
String
jobGroup
=
job
.
getJobGroup
();
JobDetail
jobDetail
=
JobBuilder
.
newJob
(
jobClass
).
withIdentity
(
getJobKey
(
jobId
,
jobGroup
)).
build
();
// 表达式调度构建器
CronScheduleBuilder
cronScheduleBuilder
=
CronScheduleBuilder
.
cronSchedule
(
job
.
getCronExpression
());
cronScheduleBuilder
=
handleCronScheduleMisfirePolicy
(
job
,
cronScheduleBuilder
);
// 按新的cronExpression表达式构建一个新的trigger
CronTrigger
trigger
=
TriggerBuilder
.
newTrigger
().
withIdentity
(
getTriggerKey
(
jobId
,
jobGroup
))
.
withSchedule
(
cronScheduleBuilder
).
build
();
// 放入参数,运行时的方法可以获取
jobDetail
.
getJobDataMap
().
put
(
ScheduleConstants
.
TASK_PROPERTIES
,
job
);
// 判断是否存在
if
(
scheduler
.
checkExists
(
getJobKey
(
jobId
,
jobGroup
)))
{
// 防止创建时存在数据问题 先移除,然后在执行创建操作
scheduler
.
deleteJob
(
getJobKey
(
jobId
,
jobGroup
));
}
scheduler
.
scheduleJob
(
jobDetail
,
trigger
);
// 暂停任务
if
(
job
.
getStatus
().
equals
(
ScheduleConstants
.
Status
.
PAUSE
.
getValue
()))
{
scheduler
.
pauseJob
(
ScheduleUtils
.
getJobKey
(
jobId
,
jobGroup
));
}
}
/**
* 设置定时任务策略
*/
public
static
CronScheduleBuilder
handleCronScheduleMisfirePolicy
(
SysJob
job
,
CronScheduleBuilder
cb
)
throws
TaskException
{
switch
(
job
.
getMisfirePolicy
())
{
case
ScheduleConstants
.
MISFIRE_DEFAULT
:
return
cb
;
case
ScheduleConstants
.
MISFIRE_IGNORE_MISFIRES
:
return
cb
.
withMisfireHandlingInstructionIgnoreMisfires
();
case
ScheduleConstants
.
MISFIRE_FIRE_AND_PROCEED
:
return
cb
.
withMisfireHandlingInstructionFireAndProceed
();
case
ScheduleConstants
.
MISFIRE_DO_NOTHING
:
return
cb
.
withMisfireHandlingInstructionDoNothing
();
default
:
throw
new
TaskException
(
"The task misfire policy '"
+
job
.
getMisfirePolicy
()
+
"' cannot be used in cron schedule tasks"
,
Code
.
CONFIG_ERROR
);
}
}
}
\ No newline at end of file
package
com.ruoyi.quartz.util
;
import
org.quartz.CronScheduleBuilder
;
import
org.quartz.CronTrigger
;
import
org.quartz.Job
;
import
org.quartz.JobBuilder
;
import
org.quartz.JobDetail
;
import
org.quartz.JobKey
;
import
org.quartz.Scheduler
;
import
org.quartz.SchedulerException
;
import
org.quartz.TriggerBuilder
;
import
org.quartz.TriggerKey
;
import
com.ruoyi.common.constant.ScheduleConstants
;
import
com.ruoyi.common.exception.job.TaskException
;
import
com.ruoyi.common.exception.job.TaskException.Code
;
import
com.ruoyi.quartz.domain.SysJob
;
/**
* 定时任务工具类
*
* @author ruoyi
*
*/
public
class
ScheduleUtils
{
/**
* 得到quartz任务类
*
* @param sysJob 执行计划
* @return 具体执行任务类
*/
private
static
Class
<?
extends
Job
>
getQuartzJobClass
(
SysJob
sysJob
)
{
boolean
isConcurrent
=
"0"
.
equals
(
sysJob
.
getConcurrent
());
return
isConcurrent
?
QuartzJobExecution
.
class
:
QuartzDisallowConcurrentExecution
.
class
;
}
/**
* 构建任务触发对象
*/
public
static
TriggerKey
getTriggerKey
(
Long
jobId
,
String
jobGroup
)
{
return
TriggerKey
.
triggerKey
(
ScheduleConstants
.
TASK_CLASS_NAME
+
jobId
,
jobGroup
);
}
/**
* 构建任务键对象
*/
public
static
JobKey
getJobKey
(
Long
jobId
,
String
jobGroup
)
{
return
JobKey
.
jobKey
(
ScheduleConstants
.
TASK_CLASS_NAME
+
jobId
,
jobGroup
);
}
/**
* 创建定时任务
*/
public
static
void
createScheduleJob
(
Scheduler
scheduler
,
SysJob
job
)
throws
SchedulerException
,
TaskException
{
Class
<?
extends
Job
>
jobClass
=
getQuartzJobClass
(
job
);
// 构建job信息
Long
jobId
=
job
.
getJobId
();
String
jobGroup
=
job
.
getJobGroup
();
JobDetail
jobDetail
=
JobBuilder
.
newJob
(
jobClass
).
withIdentity
(
getJobKey
(
jobId
,
jobGroup
)).
build
();
// 表达式调度构建器
CronScheduleBuilder
cronScheduleBuilder
=
CronScheduleBuilder
.
cronSchedule
(
job
.
getCronExpression
());
cronScheduleBuilder
=
handleCronScheduleMisfirePolicy
(
job
,
cronScheduleBuilder
);
// 按新的cronExpression表达式构建一个新的trigger
CronTrigger
trigger
=
TriggerBuilder
.
newTrigger
().
withIdentity
(
getTriggerKey
(
jobId
,
jobGroup
))
.
withSchedule
(
cronScheduleBuilder
).
build
();
// 放入参数,运行时的方法可以获取
jobDetail
.
getJobDataMap
().
put
(
ScheduleConstants
.
TASK_PROPERTIES
,
job
);
// 判断是否存在
if
(
scheduler
.
checkExists
(
getJobKey
(
jobId
,
jobGroup
)))
{
// 防止创建时存在数据问题 先移除,然后在执行创建操作
scheduler
.
deleteJob
(
getJobKey
(
jobId
,
jobGroup
));
}
scheduler
.
scheduleJob
(
jobDetail
,
trigger
);
// 暂停任务
if
(
job
.
getStatus
().
equals
(
ScheduleConstants
.
Status
.
PAUSE
.
getValue
()))
{
scheduler
.
pauseJob
(
ScheduleUtils
.
getJobKey
(
jobId
,
jobGroup
));
}
}
/**
* 设置定时任务策略
*/
public
static
CronScheduleBuilder
handleCronScheduleMisfirePolicy
(
SysJob
job
,
CronScheduleBuilder
cb
)
throws
TaskException
{
switch
(
job
.
getMisfirePolicy
())
{
case
ScheduleConstants
.
MISFIRE_DEFAULT
:
return
cb
;
case
ScheduleConstants
.
MISFIRE_IGNORE_MISFIRES
:
return
cb
.
withMisfireHandlingInstructionIgnoreMisfires
();
case
ScheduleConstants
.
MISFIRE_FIRE_AND_PROCEED
:
return
cb
.
withMisfireHandlingInstructionFireAndProceed
();
case
ScheduleConstants
.
MISFIRE_DO_NOTHING
:
return
cb
.
withMisfireHandlingInstructionDoNothing
();
default
:
throw
new
TaskException
(
"The task misfire policy '"
+
job
.
getMisfirePolicy
()
+
"' cannot be used in cron schedule tasks"
,
Code
.
CONFIG_ERROR
);
}
}
}
ruoyi/src/main/resources/m
ybatis/system
/SysJobLogMapper.xml
→
ruoyi
-quartz
/src/main/resources/m
apper/quartz
/SysJobLogMapper.xml
View file @
cee572f2
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.ruoyi.
project.monitor
.mapper.SysJobLogMapper"
>
<resultMap
type=
"SysJobLog"
id=
"SysJobLogResult"
>
<id
property=
"jobLogId"
column=
"job_log_id"
/>
<result
property=
"jobName"
column=
"job_name"
/>
<result
property=
"jobGroup"
column=
"job_group"
/>
<result
property=
"invokeTarget"
column=
"invoke_target"
/>
<result
property=
"jobMessage"
column=
"job_message"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"exceptionInfo"
column=
"exception_info"
/>
<result
property=
"createTime"
column=
"create_time"
/>
</resultMap>
<sql
id=
"selectJobLogVo"
>
select job_log_id, job_name, job_group, invoke_target, job_message, status, exception_info, create_time
from sys_job_log
</sql>
<select
id=
"selectJobLogList"
parameterType=
"SysJobLog"
resultMap=
"SysJobLogResult"
>
<include
refid=
"selectJobLogVo"
/>
<where>
<if
test=
"jobName != null and jobName != ''"
>
AND job_name like concat('%', #{jobName}, '%')
</if>
<if
test=
"jobGroup != null and jobGroup != ''"
>
AND job_group = #{jobGroup}
</if>
<if
test=
"status != null and status != ''"
>
AND status = #{status}
</if>
<if
test=
"invokeTarget != null and invokeTarget != ''"
>
AND invoke_target like concat('%', #{invokeTarget}, '%')
</if>
<if
test=
"beginTime != null and beginTime != ''"
>
<!-- 开始时间检索 -->
and date_format(create_time,'%y%m%d')
>
= date_format(#{beginTime},'%y%m%d')
</if>
<if
test=
"endTime != null and endTime != ''"
>
<!-- 结束时间检索 -->
and date_format(create_time,'%y%m%d')
<
= date_format(#{endTime},'%y%m%d')
</if>
</where>
</select>
<select
id=
"selectJobLogAll"
resultMap=
"SysJobLogResult"
>
<include
refid=
"selectJobLogVo"
/>
</select>
<select
id=
"selectJobLogById"
parameterType=
"Long"
resultMap=
"SysJobLogResult"
>
<include
refid=
"selectJobLogVo"
/>
where job_log_id = #{jobLogId}
</select>
<delete
id=
"deleteJobLogById"
parameterType=
"Long"
>
delete from sys_job_log where job_log_id = #{jobLogId}
</delete>
<delete
id=
"deleteJobLogByIds"
parameterType=
"Long"
>
delete from sys_job_log where job_log_id in
<foreach
collection=
"array"
item=
"jobLogId"
open=
"("
separator=
","
close=
")"
>
#{jobLogId}
</foreach>
</delete>
<update
id=
"cleanJobLog"
>
truncate table sys_job_log
</update>
<insert
id=
"insertJobLog"
parameterType=
"SysJobLog"
>
insert into sys_job_log(
<if
test=
"jobLogId != null and jobLogId != 0"
>
job_log_id,
</if>
<if
test=
"jobName != null and jobName != ''"
>
job_name,
</if>
<if
test=
"jobGroup != null and jobGroup != ''"
>
job_group,
</if>
<if
test=
"invokeTarget != null and invokeTarget != ''"
>
invoke_target,
</if>
<if
test=
"jobMessage != null and jobMessage != ''"
>
job_message,
</if>
<if
test=
"status != null and status != ''"
>
status,
</if>
<if
test=
"exceptionInfo != null and exceptionInfo != ''"
>
exception_info,
</if>
create_time
)values(
<if
test=
"jobLogId != null and jobLogId != 0"
>
#{jobLogId},
</if>
<if
test=
"jobName != null and jobName != ''"
>
#{jobName},
</if>
<if
test=
"jobGroup != null and jobGroup != ''"
>
#{jobGroup},
</if>
<if
test=
"invokeTarget != null and invokeTarget != ''"
>
#{invokeTarget},
</if>
<if
test=
"jobMessage != null and jobMessage != ''"
>
#{jobMessage},
</if>
<if
test=
"status != null and status != ''"
>
#{status},
</if>
<if
test=
"exceptionInfo != null and exceptionInfo != ''"
>
#{exceptionInfo},
</if>
sysdate()
)
</insert>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.ruoyi.
quartz
.mapper.SysJobLogMapper"
>
<resultMap
type=
"SysJobLog"
id=
"SysJobLogResult"
>
<id
property=
"jobLogId"
column=
"job_log_id"
/>
<result
property=
"jobName"
column=
"job_name"
/>
<result
property=
"jobGroup"
column=
"job_group"
/>
<result
property=
"invokeTarget"
column=
"invoke_target"
/>
<result
property=
"jobMessage"
column=
"job_message"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"exceptionInfo"
column=
"exception_info"
/>
<result
property=
"createTime"
column=
"create_time"
/>
</resultMap>
<sql
id=
"selectJobLogVo"
>
select job_log_id, job_name, job_group, invoke_target, job_message, status, exception_info, create_time
from sys_job_log
</sql>
<select
id=
"selectJobLogList"
parameterType=
"SysJobLog"
resultMap=
"SysJobLogResult"
>
<include
refid=
"selectJobLogVo"
/>
<where>
<if
test=
"jobName != null and jobName != ''"
>
AND job_name like concat('%', #{jobName}, '%')
</if>
<if
test=
"jobGroup != null and jobGroup != ''"
>
AND job_group = #{jobGroup}
</if>
<if
test=
"status != null and status != ''"
>
AND status = #{status}
</if>
<if
test=
"invokeTarget != null and invokeTarget != ''"
>
AND invoke_target like concat('%', #{invokeTarget}, '%')
</if>
<if
test=
"beginTime != null and beginTime != ''"
>
<!-- 开始时间检索 -->
and date_format(create_time,'%y%m%d')
>
= date_format(#{beginTime},'%y%m%d')
</if>
<if
test=
"endTime != null and endTime != ''"
>
<!-- 结束时间检索 -->
and date_format(create_time,'%y%m%d')
<
= date_format(#{endTime},'%y%m%d')
</if>
</where>
</select>
<select
id=
"selectJobLogAll"
resultMap=
"SysJobLogResult"
>
<include
refid=
"selectJobLogVo"
/>
</select>
<select
id=
"selectJobLogById"
parameterType=
"Long"
resultMap=
"SysJobLogResult"
>
<include
refid=
"selectJobLogVo"
/>
where job_log_id = #{jobLogId}
</select>
<delete
id=
"deleteJobLogById"
parameterType=
"Long"
>
delete from sys_job_log where job_log_id = #{jobLogId}
</delete>
<delete
id=
"deleteJobLogByIds"
parameterType=
"Long"
>
delete from sys_job_log where job_log_id in
<foreach
collection=
"array"
item=
"jobLogId"
open=
"("
separator=
","
close=
")"
>
#{jobLogId}
</foreach>
</delete>
<update
id=
"cleanJobLog"
>
truncate table sys_job_log
</update>
<insert
id=
"insertJobLog"
parameterType=
"SysJobLog"
>
insert into sys_job_log(
<if
test=
"jobLogId != null and jobLogId != 0"
>
job_log_id,
</if>
<if
test=
"jobName != null and jobName != ''"
>
job_name,
</if>
<if
test=
"jobGroup != null and jobGroup != ''"
>
job_group,
</if>
<if
test=
"invokeTarget != null and invokeTarget != ''"
>
invoke_target,
</if>
<if
test=
"jobMessage != null and jobMessage != ''"
>
job_message,
</if>
<if
test=
"status != null and status != ''"
>
status,
</if>
<if
test=
"exceptionInfo != null and exceptionInfo != ''"
>
exception_info,
</if>
create_time
)values(
<if
test=
"jobLogId != null and jobLogId != 0"
>
#{jobLogId},
</if>
<if
test=
"jobName != null and jobName != ''"
>
#{jobName},
</if>
<if
test=
"jobGroup != null and jobGroup != ''"
>
#{jobGroup},
</if>
<if
test=
"invokeTarget != null and invokeTarget != ''"
>
#{invokeTarget},
</if>
<if
test=
"jobMessage != null and jobMessage != ''"
>
#{jobMessage},
</if>
<if
test=
"status != null and status != ''"
>
#{status},
</if>
<if
test=
"exceptionInfo != null and exceptionInfo != ''"
>
#{exceptionInfo},
</if>
sysdate()
)
</insert>
</mapper>
\ No newline at end of file
ruoyi/src/main/resources/m
ybatis/system
/SysJobMapper.xml
→
ruoyi
-quartz
/src/main/resources/m
apper/quartz
/SysJobMapper.xml
View file @
cee572f2
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.ruoyi.
project.monitor
.mapper.SysJobMapper"
>
<resultMap
type=
"SysJob"
id=
"SysJobResult"
>
<id
property=
"jobId"
column=
"job_id"
/>
<result
property=
"jobName"
column=
"job_name"
/>
<result
property=
"jobGroup"
column=
"job_group"
/>
<result
property=
"invokeTarget"
column=
"invoke_target"
/>
<result
property=
"cronExpression"
column=
"cron_expression"
/>
<result
property=
"misfirePolicy"
column=
"misfire_policy"
/>
<result
property=
"concurrent"
column=
"concurrent"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"remark"
column=
"remark"
/>
</resultMap>
<sql
id=
"selectJobVo"
>
select job_id, job_name, job_group, invoke_target, cron_expression, misfire_policy, concurrent, status, create_by, create_time, remark
from sys_job
</sql>
<select
id=
"selectJobList"
parameterType=
"SysJob"
resultMap=
"SysJobResult"
>
<include
refid=
"selectJobVo"
/>
<where>
<if
test=
"jobName != null and jobName != ''"
>
AND job_name like concat('%', #{jobName}, '%')
</if>
<if
test=
"jobGroup != null and jobGroup != ''"
>
AND job_group = #{jobGroup}
</if>
<if
test=
"status != null and status != ''"
>
AND status = #{status}
</if>
<if
test=
"invokeTarget != null and invokeTarget != ''"
>
AND invoke_target like concat('%', #{invokeTarget}, '%')
</if>
</where>
</select>
<select
id=
"selectJobAll"
resultMap=
"SysJobResult"
>
<include
refid=
"selectJobVo"
/>
</select>
<select
id=
"selectJobById"
parameterType=
"Long"
resultMap=
"SysJobResult"
>
<include
refid=
"selectJobVo"
/>
where job_id = #{jobId}
</select>
<delete
id=
"deleteJobById"
parameterType=
"Long"
>
delete from sys_job where job_id = #{jobId}
</delete>
<delete
id=
"deleteJobByIds"
parameterType=
"Long"
>
delete from sys_job where job_id in
<foreach
collection=
"array"
item=
"jobId"
open=
"("
separator=
","
close=
")"
>
#{jobId}
</foreach>
</delete>
<update
id=
"updateJob"
parameterType=
"SysJob"
>
update sys_job
<set>
<if
test=
"jobName != null and jobName != ''"
>
job_name = #{jobName},
</if>
<if
test=
"jobGroup != null and jobGroup != ''"
>
job_group = #{jobGroup},
</if>
<if
test=
"invokeTarget != null and invokeTarget != ''"
>
invoke_target = #{invokeTarget},
</if>
<if
test=
"cronExpression != null and cronExpression != ''"
>
cron_expression = #{cronExpression},
</if>
<if
test=
"misfirePolicy != null and misfirePolicy != ''"
>
misfire_policy = #{misfirePolicy},
</if>
<if
test=
"concurrent != null and concurrent != ''"
>
concurrent = #{concurrent},
</if>
<if
test=
"status !=null"
>
status = #{status},
</if>
<if
test=
"remark != null and remark != ''"
>
remark = #{remark},
</if>
<if
test=
"updateBy != null and updateBy != ''"
>
update_by = #{updateBy},
</if>
update_time = sysdate()
</set>
where job_id = #{jobId}
</update>
<insert
id=
"insertJob"
parameterType=
"SysJob"
useGeneratedKeys=
"true"
keyProperty=
"jobId"
>
insert into sys_job(
<if
test=
"jobId != null and jobId != 0"
>
job_id,
</if>
<if
test=
"jobName != null and jobName != ''"
>
job_name,
</if>
<if
test=
"jobGroup != null and jobGroup != ''"
>
job_group,
</if>
<if
test=
"invokeTarget != null and invokeTarget != ''"
>
invoke_target,
</if>
<if
test=
"cronExpression != null and cronExpression != ''"
>
cron_expression,
</if>
<if
test=
"misfirePolicy != null and misfirePolicy != ''"
>
misfire_policy,
</if>
<if
test=
"concurrent != null and concurrent != ''"
>
concurrent,
</if>
<if
test=
"status != null and status != ''"
>
status,
</if>
<if
test=
"remark != null and remark != ''"
>
remark,
</if>
<if
test=
"createBy != null and createBy != ''"
>
create_by,
</if>
create_time
)values(
<if
test=
"jobId != null and jobId != 0"
>
#{jobId},
</if>
<if
test=
"jobName != null and jobName != ''"
>
#{jobName},
</if>
<if
test=
"jobGroup != null and jobGroup != ''"
>
#{jobGroup},
</if>
<if
test=
"invokeTarget != null and invokeTarget != ''"
>
#{invokeTarget},
</if>
<if
test=
"cronExpression != null and cronExpression != ''"
>
#{cronExpression},
</if>
<if
test=
"misfirePolicy != null and misfirePolicy != ''"
>
#{misfirePolicy},
</if>
<if
test=
"concurrent != null and concurrent != ''"
>
#{concurrent},
</if>
<if
test=
"status != null and status != ''"
>
#{status},
</if>
<if
test=
"remark != null and remark != ''"
>
#{remark},
</if>
<if
test=
"createBy != null and createBy != ''"
>
#{createBy},
</if>
sysdate()
)
</insert>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.ruoyi.
quartz
.mapper.SysJobMapper"
>
<resultMap
type=
"SysJob"
id=
"SysJobResult"
>
<id
property=
"jobId"
column=
"job_id"
/>
<result
property=
"jobName"
column=
"job_name"
/>
<result
property=
"jobGroup"
column=
"job_group"
/>
<result
property=
"invokeTarget"
column=
"invoke_target"
/>
<result
property=
"cronExpression"
column=
"cron_expression"
/>
<result
property=
"misfirePolicy"
column=
"misfire_policy"
/>
<result
property=
"concurrent"
column=
"concurrent"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"remark"
column=
"remark"
/>
</resultMap>
<sql
id=
"selectJobVo"
>
select job_id, job_name, job_group, invoke_target, cron_expression, misfire_policy, concurrent, status, create_by, create_time, remark
from sys_job
</sql>
<select
id=
"selectJobList"
parameterType=
"SysJob"
resultMap=
"SysJobResult"
>
<include
refid=
"selectJobVo"
/>
<where>
<if
test=
"jobName != null and jobName != ''"
>
AND job_name like concat('%', #{jobName}, '%')
</if>
<if
test=
"jobGroup != null and jobGroup != ''"
>
AND job_group = #{jobGroup}
</if>
<if
test=
"status != null and status != ''"
>
AND status = #{status}
</if>
<if
test=
"invokeTarget != null and invokeTarget != ''"
>
AND invoke_target like concat('%', #{invokeTarget}, '%')
</if>
</where>
</select>
<select
id=
"selectJobAll"
resultMap=
"SysJobResult"
>
<include
refid=
"selectJobVo"
/>
</select>
<select
id=
"selectJobById"
parameterType=
"Long"
resultMap=
"SysJobResult"
>
<include
refid=
"selectJobVo"
/>
where job_id = #{jobId}
</select>
<delete
id=
"deleteJobById"
parameterType=
"Long"
>
delete from sys_job where job_id = #{jobId}
</delete>
<delete
id=
"deleteJobByIds"
parameterType=
"Long"
>
delete from sys_job where job_id in
<foreach
collection=
"array"
item=
"jobId"
open=
"("
separator=
","
close=
")"
>
#{jobId}
</foreach>
</delete>
<update
id=
"updateJob"
parameterType=
"SysJob"
>
update sys_job
<set>
<if
test=
"jobName != null and jobName != ''"
>
job_name = #{jobName},
</if>
<if
test=
"jobGroup != null and jobGroup != ''"
>
job_group = #{jobGroup},
</if>
<if
test=
"invokeTarget != null and invokeTarget != ''"
>
invoke_target = #{invokeTarget},
</if>
<if
test=
"cronExpression != null and cronExpression != ''"
>
cron_expression = #{cronExpression},
</if>
<if
test=
"misfirePolicy != null and misfirePolicy != ''"
>
misfire_policy = #{misfirePolicy},
</if>
<if
test=
"concurrent != null and concurrent != ''"
>
concurrent = #{concurrent},
</if>
<if
test=
"status !=null"
>
status = #{status},
</if>
<if
test=
"remark != null and remark != ''"
>
remark = #{remark},
</if>
<if
test=
"updateBy != null and updateBy != ''"
>
update_by = #{updateBy},
</if>
update_time = sysdate()
</set>
where job_id = #{jobId}
</update>
<insert
id=
"insertJob"
parameterType=
"SysJob"
useGeneratedKeys=
"true"
keyProperty=
"jobId"
>
insert into sys_job(
<if
test=
"jobId != null and jobId != 0"
>
job_id,
</if>
<if
test=
"jobName != null and jobName != ''"
>
job_name,
</if>
<if
test=
"jobGroup != null and jobGroup != ''"
>
job_group,
</if>
<if
test=
"invokeTarget != null and invokeTarget != ''"
>
invoke_target,
</if>
<if
test=
"cronExpression != null and cronExpression != ''"
>
cron_expression,
</if>
<if
test=
"misfirePolicy != null and misfirePolicy != ''"
>
misfire_policy,
</if>
<if
test=
"concurrent != null and concurrent != ''"
>
concurrent,
</if>
<if
test=
"status != null and status != ''"
>
status,
</if>
<if
test=
"remark != null and remark != ''"
>
remark,
</if>
<if
test=
"createBy != null and createBy != ''"
>
create_by,
</if>
create_time
)values(
<if
test=
"jobId != null and jobId != 0"
>
#{jobId},
</if>
<if
test=
"jobName != null and jobName != ''"
>
#{jobName},
</if>
<if
test=
"jobGroup != null and jobGroup != ''"
>
#{jobGroup},
</if>
<if
test=
"invokeTarget != null and invokeTarget != ''"
>
#{invokeTarget},
</if>
<if
test=
"cronExpression != null and cronExpression != ''"
>
#{cronExpression},
</if>
<if
test=
"misfirePolicy != null and misfirePolicy != ''"
>
#{misfirePolicy},
</if>
<if
test=
"concurrent != null and concurrent != ''"
>
#{concurrent},
</if>
<if
test=
"status != null and status != ''"
>
#{status},
</if>
<if
test=
"remark != null and remark != ''"
>
#{remark},
</if>
<if
test=
"createBy != null and createBy != ''"
>
#{createBy},
</if>
sysdate()
)
</insert>
</mapper>
\ No newline at end of file
ruoyi-system/pom.xml
0 → 100644
View file @
cee572f2
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
ruoyi
</artifactId>
<groupId>
com.ruoyi
</groupId>
<version>
3.0.0
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
ruoyi-system
</artifactId>
<description>
system系统模块
</description>
<dependencies>
<!-- 通用工具-->
<dependency>
<groupId>
com.ruoyi
</groupId>
<artifactId>
ruoyi-common
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
ruoyi/src/main/java/com/ruoyi/
project/
system/domain/SysConfig.java
→
ruoyi
-system
/src/main/java/com/ruoyi/system/domain/SysConfig.java
View file @
cee572f2
package
com.ruoyi.
project.
system.domain
;
package
com.ruoyi.system.domain
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.Size
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.
framework.aspectj.lang
.annotation.Excel
;
import
com.ruoyi.
framework.aspectj.lang
.annotation.Excel.ColumnType
;
import
com.ruoyi.
framework.web
.domain.BaseEntity
;
import
com.ruoyi.
common
.annotation.Excel
;
import
com.ruoyi.
common
.annotation.Excel.ColumnType
;
import
com.ruoyi.
common.core
.domain.BaseEntity
;
/**
* 参数配置表 sys_config
...
...
ruoyi/src/main/java/com/ruoyi/
project/monitor
/domain/SysLogininfor.java
→
ruoyi
-system
/src/main/java/com/ruoyi/
system
/domain/SysLogininfor.java
View file @
cee572f2
package
com.ruoyi.
project.monitor
.domain
;
package
com.ruoyi.
system
.domain
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.ruoyi.
framework.aspectj.lang
.annotation.Excel
;
import
com.ruoyi.
framework.aspectj.lang
.annotation.Excel.ColumnType
;
import
com.ruoyi.
framework.web
.domain.BaseEntity
;
import
com.ruoyi.
common
.annotation.Excel
;
import
com.ruoyi.
common
.annotation.Excel.ColumnType
;
import
com.ruoyi.
common.core
.domain.BaseEntity
;
/**
* 系统访问记录表 sys_logininfor
...
...
@@ -141,4 +141,4 @@ public class SysLogininfor extends BaseEntity
{
this
.
loginTime
=
loginTime
;
}
}
\ No newline at end of file
}
ruoyi/src/main/java/com/ruoyi/
project/
system/domain/SysNotice.java
→
ruoyi
-system
/src/main/java/com/ruoyi/system/domain/SysNotice.java
View file @
cee572f2
package
com.ruoyi.
project.
system.domain
;
package
com.ruoyi.system.domain
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.Size
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.
framework.web
.domain.BaseEntity
;
import
com.ruoyi.
common.core
.domain.BaseEntity
;
/**
* 通知公告表 sys_notice
...
...
ruoyi/src/main/java/com/ruoyi/
project/monitor
/domain/SysOperLog.java
→
ruoyi
-system
/src/main/java/com/ruoyi/
system
/domain/SysOperLog.java
View file @
cee572f2
package
com.ruoyi.
project.monitor
.domain
;
package
com.ruoyi.
system
.domain
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.ruoyi.
framework.aspectj.lang
.annotation.Excel
;
import
com.ruoyi.
framework.aspectj.lang
.annotation.Excel.ColumnType
;
import
com.ruoyi.
framework.web
.domain.BaseEntity
;
import
com.ruoyi.
common
.annotation.Excel
;
import
com.ruoyi.
common
.annotation.Excel.ColumnType
;
import
com.ruoyi.
common.core
.domain.BaseEntity
;
/**
* 操作日志记录表 oper_log
...
...
ruoyi/src/main/java/com/ruoyi/
project/
system/domain/SysPost.java
→
ruoyi
-system
/src/main/java/com/ruoyi/system/domain/SysPost.java
View file @
cee572f2
package
com.ruoyi.
project.
system.domain
;
package
com.ruoyi.system.domain
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.Size
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.
framework.aspectj.lang
.annotation.Excel
;
import
com.ruoyi.
framework.aspectj.lang
.annotation.Excel.ColumnType
;
import
com.ruoyi.
framework.web
.domain.BaseEntity
;
import
com.ruoyi.
common
.annotation.Excel
;
import
com.ruoyi.
common
.annotation.Excel.ColumnType
;
import
com.ruoyi.
common.core
.domain.BaseEntity
;
/**
* 岗位表 sys_post
...
...
ruoyi/src/main/java/com/ruoyi/
project/
system/domain/SysRoleDept.java
→
ruoyi
-system
/src/main/java/com/ruoyi/system/domain/SysRoleDept.java
View file @
cee572f2
package
com.ruoyi.
project.
system.domain
;
package
com.ruoyi.system.domain
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
...
...
ruoyi/src/main/java/com/ruoyi/
project/
system/domain/SysRoleMenu.java
→
ruoyi
-system
/src/main/java/com/ruoyi/system/domain/SysRoleMenu.java
View file @
cee572f2
package
com.ruoyi.
project.
system.domain
;
package
com.ruoyi.system.domain
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
...
...
ruoyi/src/main/java/com/ruoyi/
project/monitor
/domain/SysUserOnline.java
→
ruoyi
-system
/src/main/java/com/ruoyi/
system
/domain/SysUserOnline.java
View file @
cee572f2
package
com.ruoyi.
project.monitor
.domain
;
package
com.ruoyi.
system
.domain
;
/**
* 当前在线会话
...
...
ruoyi/src/main/java/com/ruoyi/
project/
system/domain/SysUserPost.java
→
ruoyi
-system
/src/main/java/com/ruoyi/system/domain/SysUserPost.java
View file @
cee572f2
package
com.ruoyi.
project.
system.domain
;
package
com.ruoyi.system.domain
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
...
...
ruoyi/src/main/java/com/ruoyi/
project/
system/domain/SysUserRole.java
→
ruoyi
-system
/src/main/java/com/ruoyi/system/domain/SysUserRole.java
View file @
cee572f2
package
com.ruoyi.
project.
system.domain
;
package
com.ruoyi.system.domain
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
...
...
ruoyi/src/main/java/com/ruoyi/
project/
system/domain/vo/MetaVo.java
→
ruoyi
-system
/src/main/java/com/ruoyi/system/domain/vo/MetaVo.java
View file @
cee572f2
package
com.ruoyi.
project.
system.domain.vo
;
package
com.ruoyi.system.domain.vo
;
/**
* 路由显示信息
...
...
ruoyi/src/main/java/com/ruoyi/
project/
system/domain/vo/RouterVo.java
→
ruoyi
-system
/src/main/java/com/ruoyi/system/domain/vo/RouterVo.java
View file @
cee572f2
package
com.ruoyi.
project.
system.domain.vo
;
package
com.ruoyi.system.domain.vo
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
java.util.List
;
...
...
ruoyi/src/main/java/com/ruoyi/
project/
system/mapper/SysConfigMapper.java
→
ruoyi
-system
/src/main/java/com/ruoyi/system/mapper/SysConfigMapper.java
View file @
cee572f2
package
com.ruoyi.
project.
system.mapper
;
package
com.ruoyi.system.mapper
;
import
java.util.List
;
import
com.ruoyi.
project.
system.domain.SysConfig
;
import
com.ruoyi.system.domain.SysConfig
;
/**
* 参数配置 数据层
...
...
@@ -65,4 +65,4 @@ public interface SysConfigMapper
* @return 结果
*/
public
int
deleteConfigByIds
(
Long
[]
configIds
);
}
\ No newline at end of file
}
Prev
1
…
7
8
9
10
11
12
13
14
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment