From 5f262bb891bbd864891264d1b1ebd7fd9f80379d Mon Sep 17 00:00:00 2001 From: "eason.qian" Date: Sun, 21 Jan 2018 16:32:58 +1100 Subject: [PATCH 1/8] fix --- .../management/clearing/core/impl/CleanServiceImpl.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/management/clearing/core/impl/CleanServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/management/clearing/core/impl/CleanServiceImpl.java index e00826762..23056f7e3 100644 --- a/src/main/java/au/com/royalpay/payment/manage/management/clearing/core/impl/CleanServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/management/clearing/core/impl/CleanServiceImpl.java @@ -947,7 +947,14 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider return JSON.parseObject(reportItem.getString("result")); } } - return paymentApi.validTransactions(dt, fix); + JSONObject report = paymentApi.validTransactions(dt, fix); + JSONObject log = new JSONObject(); + log.put("valid_date", dt); + log.put("create_time", new Date()); + log.put("result", report.toJSONString()); + validationLogMapper.removeByDate(dt); + validationLogMapper.save(log); + return report; } private byte[] getZipByteArr(List fileByteArrWithName) throws IOException { From d93951a95c8aa1e4c88a2384092fe7165a363c89 Mon Sep 17 00:00:00 2001 From: "eason.qian" Date: Sun, 21 Jan 2018 17:03:23 +1100 Subject: [PATCH 2/8] fix --- .../manage/mappers/customers/CustomerMembershipMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/customers/CustomerMembershipMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/customers/CustomerMembershipMapper.xml index df98c4b89..63477ee9d 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/mappers/customers/CustomerMembershipMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/customers/CustomerMembershipMapper.xml @@ -54,7 +54,7 @@ 0 + AND sm.role & 10000001 > 0 and sm.is_valid=1 ]]> \ No newline at end of file From 6d727a4b7aaa9d92e4116e393427f135fa21cb81 Mon Sep 17 00:00:00 2001 From: wangning <164851225@qq.com> Date: Wed, 24 Jan 2018 07:48:04 +0800 Subject: [PATCH 3/8] update --- src/main/resources/templates/reports/week_report.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/templates/reports/week_report.html b/src/main/resources/templates/reports/week_report.html index 77151318c..f46d9c15d 100644 --- a/src/main/resources/templates/reports/week_report.html +++ b/src/main/resources/templates/reports/week_report.html @@ -186,10 +186,10 @@
From 95e23309261bce90981b3861e62e525093c318aa Mon Sep 17 00:00:00 2001 From: wangning <164851225@qq.com> Date: Wed, 24 Jan 2018 22:23:52 +1100 Subject: [PATCH 4/8] fixbug weekReport --- .../manage/task/WeekReportGenerationTask.java | 31 +++++++++++++++++++ .../templates/reports/week_report.html | 8 ++--- 2 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 src/main/java/au/com/royalpay/payment/manage/task/WeekReportGenerationTask.java diff --git a/src/main/java/au/com/royalpay/payment/manage/task/WeekReportGenerationTask.java b/src/main/java/au/com/royalpay/payment/manage/task/WeekReportGenerationTask.java new file mode 100644 index 000000000..4964aa5d2 --- /dev/null +++ b/src/main/java/au/com/royalpay/payment/manage/task/WeekReportGenerationTask.java @@ -0,0 +1,31 @@ +package au.com.royalpay.payment.manage.task; + +import au.com.royalpay.payment.manage.analysis.core.WeekReporter; + +import org.apache.commons.lang3.time.DateFormatUtils; +import org.apache.commons.lang3.time.DateUtils; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +import java.util.Date; + +import javax.annotation.Resource; + +/** + * Created by wangning on 24/01/2018. + */ +@Component +@ConditionalOnProperty(value = "app.run-tasks", havingValue = "true") +public class WeekReportGenerationTask { + + @Resource + private WeekReporter weekReporter; + + @Scheduled(cron = "0 0 2 * * 1") + public void autoGenerateReport() { + Date lastweek = new Date(); + lastweek = DateUtils.addDays(lastweek, -7); + weekReporter.generateReport(DateFormatUtils.format(lastweek, "yyyy-MM-dd"), true); + } +} diff --git a/src/main/resources/templates/reports/week_report.html b/src/main/resources/templates/reports/week_report.html index f46d9c15d..138826f51 100644 --- a/src/main/resources/templates/reports/week_report.html +++ b/src/main/resources/templates/reports/week_report.html @@ -185,11 +185,11 @@
- +
From ed75226b061cd5d21dbd64e5e76db4e9d84297cb Mon Sep 17 00:00:00 2001 From: wangning <164851225@qq.com> Date: Mon, 29 Jan 2018 09:47:16 +0800 Subject: [PATCH 5/8] fixbug --- src/main/resources/templates/reports/week_report.html | 4 ++-- .../resources/templates/reports/week_report_partners.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/resources/templates/reports/week_report.html b/src/main/resources/templates/reports/week_report.html index 138826f51..2f49bdeed 100644 --- a/src/main/resources/templates/reports/week_report.html +++ b/src/main/resources/templates/reports/week_report.html @@ -186,10 +186,10 @@
diff --git a/src/main/resources/templates/reports/week_report_partners.html b/src/main/resources/templates/reports/week_report_partners.html index bf801747b..bbf5e4415 100644 --- a/src/main/resources/templates/reports/week_report_partners.html +++ b/src/main/resources/templates/reports/week_report_partners.html @@ -36,8 +36,8 @@
较上周比较
- - + +
From 25eb4cc11b6d874b8f641f56519e3b19747301db Mon Sep 17 00:00:00 2001 From: wangning <164851225@qq.com> Date: Mon, 29 Jan 2018 10:05:35 +0800 Subject: [PATCH 6/8] fixbug --- src/main/resources/templates/reports/week_report_partners.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/templates/reports/week_report_partners.html b/src/main/resources/templates/reports/week_report_partners.html index bbf5e4415..19b2e3ae6 100644 --- a/src/main/resources/templates/reports/week_report_partners.html +++ b/src/main/resources/templates/reports/week_report_partners.html @@ -32,7 +32,7 @@
-
+
较上周比较
From 57b2dba12b1afb4c7a8523691dc3a0b1da5a80ff Mon Sep 17 00:00:00 2001 From: wangning <164851225@qq.com> Date: Mon, 29 Jan 2018 11:19:04 +0800 Subject: [PATCH 7/8] fixbug --- .../manage/signin/core/impls/SignInAccountServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/signin/core/impls/SignInAccountServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/signin/core/impls/SignInAccountServiceImpl.java index d7363a34a..b6a861943 100644 --- a/src/main/java/au/com/royalpay/payment/manage/signin/core/impls/SignInAccountServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/signin/core/impls/SignInAccountServiceImpl.java @@ -148,12 +148,12 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati private void validLoginInfo(LoginInfo loginInfo, JSONObject account) { if (account == null) { - throw new BadRequestException(LocaleSupport.localeMessage("login.error.password")); + throw new BadRequestException(LocaleSupport.localeMessage("error.login.password")); } String salt = account.getString("salt"); String pwdHash = loginInfo.getPasswordHashed(salt); if (!StringUtils.equals(pwdHash, account.getString("password_hash"))) { - throw new BadRequestException(LocaleSupport.localeMessage("login.error.password")); + throw new BadRequestException(LocaleSupport.localeMessage("error.login.password")); } } From 7d4eb6333dbb03b69be303dcfae939a7f423f2f2 Mon Sep 17 00:00:00 2001 From: yuan <1551130722@qq.com> Date: Mon, 29 Jan 2018 16:55:47 +0800 Subject: [PATCH 8/8] fix~ --- .../manage/merchants/core/impls/ClientManagerImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java index 1b1b54812..9eaf09650 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java @@ -1240,8 +1240,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid private void checkModifyRate(JSONObject org,JSONObject configJson,String rateName,String rateValueKey){ if(configJson.getString("rate_name").equals(rateName)){ if(org.containsKey(rateValueKey)){ - if(configJson.getDouble("rate_value").compareTo(org.getDouble(rateValueKey)) > 0){ - throw new ForbiddenException("费率参数大于旗下商户最低"+rateName+"费率,请重新输入===>"); + if(configJson.getDouble("rate_value").compareTo(org.getDouble(rateValueKey)) < 0){ + throw new ForbiddenException("费率参数小于旗下商户最低"+rateName+"费率,请重新输入"); }; } } @@ -1249,8 +1249,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid private void checkAddRate(JSONObject config,String channel, String rateKey,JSONObject org,String rateValueKey){ if(config.containsKey(rateKey)){ if(org.containsKey(rateValueKey)){ - if(config.getBigDecimal(rateKey).compareTo(org.getBigDecimal(rateValueKey)) > 0){ - throw new ForbiddenException("费率参数大于旗下商户最低"+channel+"费率,请重新输入===>"); + if(config.getBigDecimal(rateKey).compareTo(org.getBigDecimal(rateValueKey)) < 0){ + throw new ForbiddenException("费率参数小于旗下商户最低"+channel+"费率,请重新输入"); }; } }