diff --git a/src/main/java/com/peanut/modules/book/controller/PointController.java b/src/main/java/com/peanut/modules/book/controller/PointController.java index 6c5fd7e7..0f2a9b26 100644 --- a/src/main/java/com/peanut/modules/book/controller/PointController.java +++ b/src/main/java/com/peanut/modules/book/controller/PointController.java @@ -185,11 +185,22 @@ public class PointController { Date parse = simpleDateFormat.parse(date); List> flag = new ArrayList<>(); for (int i=0;i<24;i+=2){ + Map ff = new HashMap<>(); Calendar instance = Calendar.getInstance(); instance.setTime(parse); + int i1 = instance.get(Calendar.HOUR_OF_DAY); + if(i1==23){ + instance.add(Calendar.DAY_OF_MONTH,1); + } + if(i1==23&&i==0){ + ff.put("now",true); + } else if (i1=i-1) { + ff.put("now",true); + }else { + ff.put("now",false); + } instance.set(Calendar.HOUR_OF_DAY,i); Date time = instance.getTime(); - Map ff = new HashMap<>(); ff.put("zwlz",pointService.ZWLZ(time)); ff.put("lgbf",pointService.LGBF(time)); ff.put("ftbf",pointService.FTBF(time)); diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 455b5ac4..8ff1d83d 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -2,7 +2,7 @@ spring: redis: open: false # 是否开启redis缓存 true开启 false关闭 database: 0 - host: 59.110.212.44 + host: 47.93.127.115 port: 6379 password: Jgll2015 # 密码(默认为空) timeout: 6000000ms # 连接超时时长(毫秒) @@ -52,7 +52,7 @@ spring: initSQL: SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci rabbitmq: - host: 39.106.36.183 + host: 47.93.127.115 port: 5672 username: admin password: 751019 @@ -88,5 +88,5 @@ wxpay: privateKeyUrl: D:/hs/nuttyreading-java/src/main/resources/cent/apiclient_key.pem -redisAddress: redis://39.106.36.183:6379 +redisAddress: redis://47.93.127.115:6379 redisPassword: Jgll2015 \ No newline at end of file