From 15bedcc619b1edb6eb987f9288db7670e5b38c46 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期六, 07 五月 2022 19:42:23 +0800 Subject: [PATCH] bug修复 --- app/src/main/java/com/yeshi/makemoney/app/service/impl/goldcorn/GoldCornMakeServiceImpl.java | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/yeshi/makemoney/app/service/impl/goldcorn/GoldCornMakeServiceImpl.java b/app/src/main/java/com/yeshi/makemoney/app/service/impl/goldcorn/GoldCornMakeServiceImpl.java index b5e4d94..e0a27cd 100644 --- a/app/src/main/java/com/yeshi/makemoney/app/service/impl/goldcorn/GoldCornMakeServiceImpl.java +++ b/app/src/main/java/com/yeshi/makemoney/app/service/impl/goldcorn/GoldCornMakeServiceImpl.java @@ -95,9 +95,9 @@ //闂撮殧鍒ゆ柇 if (config.getMinSpaceTime() != null) { List<GoldCornGetRecord> list = goldCornGetRecordService.list(query, 1, 1); - if (list != null && list.size() > 0 && System.currentTimeMillis() - list.get(0).getCreateTime().getTime() < config.getMinSpaceTime() * 1000L) { + if (list != null && list.size() > 0 && time.getTime() - list.get(0).getCreateTime().getTime() < config.getMinSpaceTime() * 1000L) { String msg = String.format("闇�瑕侀棿闅�%s绉掍互涓�", config.getMinSpaceTime()); - throw new GoldCornMakeException(GoldCornMakeException.CODE_GET_FREQUENCY_LIMIT, msg); + throw new GoldCornMakeException(GoldCornMakeException.CODE_GET_FREQUENCY_TIME_LIMIT, msg); } } @@ -127,7 +127,7 @@ Map<GoldCornGetType, Long> countMap = goldCornGetRecordService.sumEventCount(query); if (countMap.get(type) != null && (countMap.get(type) >= config.getLimitCount())) { String msg = String.format("瓒呭嚭%s娆�/%s鐨勯檺鍒�", config.getLimitCount(), config.getTimeUnit().getName()); - throw new GoldCornMakeException(GoldCornMakeException.CODE_GET_FREQUENCY_LIMIT, msg); + throw new GoldCornMakeException(GoldCornMakeException.CODE_GET_FREQUENCY_COUNT_LIMIT, msg); } return config.getLimitCount() - (countMap.get(type) != null ? countMap.get(type) : 0); } -- Gitblit v1.8.0