@@ -50,6 +50,9 @@ public class ScheduleTask {
log.info("定时方法执行时间 :" + new Date());
}
+ /**
+ * 各项目经营分析每月1日上午4点自动插入数据库
+ */
@Scheduled(cron = "0 0 4 1 * ?")
void insertAnalysisList(){
timerService.insertAnalysisList();
@@ -372,8 +372,8 @@ public class TimerServiceImpl implements TimerService {
" net_margin " +
"FROM " +
" lanyun_project_analysis " +
- " WHERE " +
- " `month` = \""+month+"\"" ;
+ " WHERE 1=1" +
+ " AND `month` = \""+month+"\"" ;
// Class.forName(driver);
// Connection connection = DriverManager.getConnection(url, username, password);