From bef91af72baefdc4516e1c3becfdf290a858ffa2 Mon Sep 17 00:00:00 2001 From: 199901012 Date: Sat, 3 Apr 2021 19:37:44 +0800 Subject: [PATCH] =?UTF-8?q?'=E4=BF=AE=E5=A4=8D=E5=AE=9A=E4=BD=8D=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E9=94=99=E8=AF=AF'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/hai/schedule/HighCouponSchedule.java | 2 +- .../src/main/java/com/hai/schedule/HighOrderSchedule.java | 2 +- .../src/main/java/com/hai/schedule/SynchronizeCNPC.java | 2 +- .../src/main/java/com/hai/entity/HighMerchantStore.java | 6 +++--- .../com/hai/service/impl/HighMerchantStoreServiceImpl.java | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hai-schedule/src/main/java/com/hai/schedule/HighCouponSchedule.java b/hai-schedule/src/main/java/com/hai/schedule/HighCouponSchedule.java index 8eaf2bca..921ae58f 100644 --- a/hai-schedule/src/main/java/com/hai/schedule/HighCouponSchedule.java +++ b/hai-schedule/src/main/java/com/hai/schedule/HighCouponSchedule.java @@ -20,7 +20,7 @@ public class HighCouponSchedule { private HighUserCouponService highUserCouponService; // @Scheduled(cron="0 0/1 * * * ?") //每1分钟执行一次 - // @Scheduled(cron = "0 0 0 * * ?") //每天 凌晨0点执行 + @Scheduled(cron = "0 0 0 * * ?") //每天 凌晨0点执行 public void expiredCoupon() { List userCoupons = highUserCouponService.getOverdueCoupon(); for (HighUserCoupon highUserCoupon : userCoupons) { diff --git a/hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java b/hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java index 9f38b305..18fd3aef 100644 --- a/hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java +++ b/hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java @@ -24,7 +24,7 @@ public class HighOrderSchedule { @Resource private HighOrderService highOrderService; - // @Scheduled(cron="0 0/1 * * * ?") //每1分钟执行一次 + @Scheduled(cron="0 0/1 * * * ?") //每1分钟执行一次 public void certification() { List orderList = highOrderService.getCloseOrder(); diff --git a/hai-schedule/src/main/java/com/hai/schedule/SynchronizeCNPC.java b/hai-schedule/src/main/java/com/hai/schedule/SynchronizeCNPC.java index 48bbac9f..ba5bc922 100644 --- a/hai-schedule/src/main/java/com/hai/schedule/SynchronizeCNPC.java +++ b/hai-schedule/src/main/java/com/hai/schedule/SynchronizeCNPC.java @@ -29,7 +29,7 @@ public class SynchronizeCNPC { private static final String[] HEX_DIGITS = {"0" ,"1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"}; - @Scheduled(cron="0 0/1 * * * ?") //每1分钟执行一次 + //@Scheduled(cron="0 0/1 * * * ?") //每1分钟执行一次 public void certification() { Map tokenMap = new HashMap<>(); tokenMap.put("appId", "jsVpwDoHZfR2rrpjhA"); diff --git a/hai-service/src/main/java/com/hai/entity/HighMerchantStore.java b/hai-service/src/main/java/com/hai/entity/HighMerchantStore.java index b4519948..844a3cae 100644 --- a/hai-service/src/main/java/com/hai/entity/HighMerchantStore.java +++ b/hai-service/src/main/java/com/hai/entity/HighMerchantStore.java @@ -104,15 +104,15 @@ public class HighMerchantStore implements Serializable { private String ext3; - private String distance; + private Double distance; private static final long serialVersionUID = 1L; - public String getDistance() { + public Double getDistance() { return distance; } - public void setDistance(String distance) { + public void setDistance(Double distance) { this.distance = distance; } diff --git a/hai-service/src/main/java/com/hai/service/impl/HighMerchantStoreServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighMerchantStoreServiceImpl.java index bec7c23e..561d9bc0 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighMerchantStoreServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighMerchantStoreServiceImpl.java @@ -163,7 +163,7 @@ public class HighMerchantStoreServiceImpl implements HighMerchantStoreService { List storeList = getMerchantStoreList(map); for (HighMerchantStore store : storeList) { double distance = CoordCommonUtil.getDistance(Double.valueOf(store.getLatitude()), Double.valueOf(store.getLongitude()), Double.valueOf(map.get("latitude").toString()), Double.valueOf(map.get("longitude").toString())); - store.setDistance(String.valueOf( Math.round(distance/100d)/10d)); + store.setDistance(Math.round(distance/100d)/10d); } List collect = storeList.stream().sorted(Comparator.comparing(HighMerchantStore::getDistance)).collect(Collectors.toList()); return collect;