Commit f811f54c authored by cq990612's avatar cq990612

优化代码结构

parent 18581f97
...@@ -20,10 +20,10 @@ ...@@ -20,10 +20,10 @@
<!-- 通用查询结果列 --> <!-- 通用查询结果列 -->
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, user_id, work_day, total_time, status,reject_time, create_time, modify_time, id, user_id, work_day, total_time, status,reject_time,create_time,modify_time
</sql> </sql>
<sql id="cols_exclude_id"> <sql id="cols_exclude_id">
user_id, work_day, total_time, status,reject_time, create_time, modify_time user_id, work_day, total_time, status,reject_time,create_time,modify_time
</sql> </sql>
<sql id="table"> <sql id="table">
......
...@@ -104,10 +104,9 @@ public class WorkCollectServiceImpl implements WorkCollectService { ...@@ -104,10 +104,9 @@ public class WorkCollectServiceImpl implements WorkCollectService {
int modifyTime = 1; int modifyTime = 1;
Date date = new Date(); Date date = new Date();
WorkSubmitAdopt submitAdopt = workSubmitAdoptService.getById(1); WorkSubmitAdopt submitAdopt = workSubmitAdoptService.getById(1);
if (3 == workCollect.getStatus()) { if (null != workCollect.getRejectTime()) {
Date rejectTime = workCollect.getRejectTime(); Date rejectTime = workCollect.getRejectTime();
rejectTime = DateUtil.convertStrToDate(DateUtil.convertDateToStr(rejectTime, "yyyy-MM-dd"), "yyyy-MM-dd"); rejectTime = DateUtil.convertStrToDate(DateUtil.convertDateToStr(rejectTime, "yyyy-MM-dd"), "yyyy-MM-dd");
System.out.println(modifyTime);
if (date.getTime() - rejectTime.getTime() > submitAdopt.getSubmitTime() * 24 * 60 * 60 * 1000) { if (date.getTime() - rejectTime.getTime() > submitAdopt.getSubmitTime() * 24 * 60 * 60 * 1000) {
modifyTime = 0; modifyTime = 0;
} }
......
...@@ -61,7 +61,7 @@ public class Trigger implements SchedulingConfigurer { ...@@ -61,7 +61,7 @@ public class Trigger implements SchedulingConfigurer {
, triggerContext -> { , triggerContext -> {
Integer autoAdopt = workSubmitAdoptService.getById(1).getAutoAdopt(); Integer autoAdopt = workSubmitAdoptService.getById(1).getAutoAdopt();
String time = "0 30 17 */" + autoAdopt + " * ?"; String time = "0 0 0 */" + autoAdopt + " * ?";
//返回执行的周期 //返回执行的周期
return new CronTrigger(time).nextExecutionTime(triggerContext); return new CronTrigger(time).nextExecutionTime(triggerContext);
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment