Commit 851fd3f5 authored by “dujiuxin”'s avatar “dujiuxin”

修改

parent 61ea0ad2
......@@ -635,6 +635,22 @@ public class DateUtil {
return true;
}
public static boolean isSurveyTradeDayForChangeRemind(){
Calendar cal = Calendar.getInstance();
int year = cal.get(Calendar.YEAR);
int day = cal.get(Calendar.DATE);
int month = cal.get(Calendar.MONTH) + 1;
int dow = cal.get(Calendar.DAY_OF_WEEK);
int hour = cal.get(Calendar.HOUR_OF_DAY);
int minute = cal.get(Calendar.MINUTE);
//log.info("当前时间认证: day=" + day + " month=" + month + "hour="+ hour + "min=" + minute);
if(hour < 6 || hour > 22)
return false;
return true;
}
public static boolean isTradeDayForCal(){
Calendar cal = Calendar.getInstance();
int year = cal.get(Calendar.YEAR);
......
......@@ -65,7 +65,7 @@ public class SurveyStockPriceTask implements ApplicationRunner {
ExecutorService executorServiceSurvey = Executors.newFixedThreadPool(100);
CompletableFuture.runAsync(() -> {
while (true) {
if (DateUtil.isTradeDayForChangeRemind()) {
if (DateUtil.isSurveyTradeDayForChangeRemind()) {
// if (true) {
AtomicReference<Integer> pageNo = new AtomicReference<>(1);
Integer pageSize = 50;
......
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