diff --git a/pom.xml b/pom.xml
index eaaa2bb0f..6aff4fa8e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
au.com.royalpay.payment
payment-parent
- 1.0.13
+ 1.1.0
4.0.0
@@ -51,10 +51,6 @@
au.com.royalpay.payment
yeepay-core
-
- au.com.royalpay.payment
- lakala-core
-
au.com.royalpay.payment
bestpay-core
@@ -179,7 +175,6 @@
com.google.code.gson
gson
- 2.2.4
diff --git a/src/main/java/au/com/royalpay/payment/manage/WebConfiguration.java b/src/main/java/au/com/royalpay/payment/manage/WebConfiguration.java
index 91b57d03b..cddb1584c 100644
--- a/src/main/java/au/com/royalpay/payment/manage/WebConfiguration.java
+++ b/src/main/java/au/com/royalpay/payment/manage/WebConfiguration.java
@@ -9,7 +9,7 @@ import au.com.royalpay.payment.tools.secure.impls.ApplyFirewallCheckInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import javax.annotation.Resource;
@@ -17,7 +17,7 @@ import javax.annotation.Resource;
* Created by yixian on 2016-06-24.
*/
@Configuration
-public class WebConfiguration extends WebMvcConfigurerAdapter {
+public class WebConfiguration implements WebMvcConfigurer {
@Resource
private RequestInfoInterceptor requestInfoInterceptor;
@Resource
@@ -38,7 +38,6 @@ public class WebConfiguration extends WebMvcConfigurerAdapter {
registry.addInterceptor(alipayUserInterceptor);
registry.addInterceptor(consumersInterceptor);
registry.addInterceptor(applyFirewallCheckInterceptor());
- super.addInterceptors(registry);
}
@Bean
diff --git a/src/main/java/au/com/royalpay/payment/manage/WebSocketConfig.java b/src/main/java/au/com/royalpay/payment/manage/WebSocketConfig.java
index 0024d2590..c4dde4311 100644
--- a/src/main/java/au/com/royalpay/payment/manage/WebSocketConfig.java
+++ b/src/main/java/au/com/royalpay/payment/manage/WebSocketConfig.java
@@ -3,16 +3,16 @@ package au.com.royalpay.payment.manage;
import au.com.royalpay.payment.tools.websocket.FastJsonSockJsMessageCodec;
import org.springframework.context.annotation.Configuration;
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
-import org.springframework.web.socket.config.annotation.AbstractWebSocketMessageBrokerConfigurer;
import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
+import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;
/**
* Created by yixian on 2016-07-01.
*/
@Configuration
@EnableWebSocketMessageBroker
-public class WebSocketConfig extends AbstractWebSocketMessageBrokerConfigurer {
+public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
@Override
public void configureMessageBroker(MessageBrokerRegistry registry) {
registry.enableSimpleBroker("/app");
diff --git a/src/main/java/au/com/royalpay/payment/manage/analysis/beans/AnalysisBean.java b/src/main/java/au/com/royalpay/payment/manage/analysis/beans/AnalysisBean.java
index 65edd513b..be89fe92f 100644
--- a/src/main/java/au/com/royalpay/payment/manage/analysis/beans/AnalysisBean.java
+++ b/src/main/java/au/com/royalpay/payment/manage/analysis/beans/AnalysisBean.java
@@ -3,7 +3,7 @@ package au.com.royalpay.payment.manage.analysis.beans;
import au.com.royalpay.payment.core.exceptions.ParamInvalidException;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.time.DateUtils;
-import org.hibernate.validator.constraints.NotEmpty;
+import javax.validation.constraints.NotEmpty;
import java.math.BigDecimal;
diff --git a/src/main/java/au/com/royalpay/payment/manage/analysis/beans/ClientRateQueryBean.java b/src/main/java/au/com/royalpay/payment/manage/analysis/beans/ClientRateQueryBean.java
index fd841be40..0e75ed031 100644
--- a/src/main/java/au/com/royalpay/payment/manage/analysis/beans/ClientRateQueryBean.java
+++ b/src/main/java/au/com/royalpay/payment/manage/analysis/beans/ClientRateQueryBean.java
@@ -5,7 +5,7 @@ import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.time.DateUtils;
-import org.hibernate.validator.constraints.NotEmpty;
+import javax.validation.constraints.NotEmpty;
import java.text.ParseException;
import java.util.Calendar;
diff --git a/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/ClientRatesAnalysisServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/ClientRatesAnalysisServiceImpl.java
index 758293fa8..5efa7d811 100644
--- a/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/ClientRatesAnalysisServiceImpl.java
+++ b/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/ClientRatesAnalysisServiceImpl.java
@@ -138,7 +138,7 @@ public class ClientRatesAnalysisServiceImpl implements ClientRatesAnalysisServic
@Override
public JSONObject listClientRatesOfBDUser(String bdId, ClientRateQueryBean query) {
JSONObject manager = managerMapper.findDetail(bdId);
- Assert.notNull(manager);
+ Assert.notNull(manager, "bd not found");
JSONObject clientQueryParams = new JSONObject();
clientQueryParams.put("bd_id", bdId);
diff --git a/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/EstimateAnalysisServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/EstimateAnalysisServiceImpl.java
index ab56608af..1b993edde 100644
--- a/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/EstimateAnalysisServiceImpl.java
+++ b/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/EstimateAnalysisServiceImpl.java
@@ -97,14 +97,14 @@ public class EstimateAnalysisServiceImpl implements EstimateAnalysisService {
List settleReport = new ArrayList<>();
//今天
- Calendar calendar = Calendar.getInstance();
+ Calendar calendar = Calendar.getInstance();
calendar.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
//如果是周一,显示周五的数据
- Calendar cal=Calendar.getInstance();
+ Calendar cal = Calendar.getInstance();
cal.setTime(new Date());
- int week=cal.get(Calendar.DAY_OF_WEEK);
- if (week ==2) {
+ int week = cal.get(Calendar.DAY_OF_WEEK);
+ if (week == 2) {
cal.add(Calendar.DATE, -3);
}
Date todayDate = new Date();
@@ -228,13 +228,13 @@ public class EstimateAnalysisServiceImpl implements EstimateAnalysisService {
//预计到账金额
Calendar cal = Calendar.getInstance();
cal.setTime(date);
- cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH)-1, 0, 0, 0);
+ cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH) - 1, 0, 0, 0);
Date datefrom = cal.getTime();
- if (new Date().getDate() == datefrom.getDate()) {
+ if (DateUtils.isSameDay(new Date(), datefrom)) {
JSONObject params = new JSONObject();
params.put("datefrom", DateFormatUtils.format(datefrom, "yyyy-MM-dd HH:mm:ss"));
- params.put("dateto", DateFormatUtils.format(DateUtils.addDays(datefrom, 1),"yyyy-MM-dd HH:mm:ss"));
+ params.put("dateto", DateFormatUtils.format(DateUtils.addDays(datefrom, 1), "yyyy-MM-dd HH:mm:ss"));
List lastDayClearingAmount = transactionMapper.getLastDaytransAmount(params);
BigDecimal total_clearing = BigDecimal.ZERO;
@@ -258,7 +258,7 @@ public class EstimateAnalysisServiceImpl implements EstimateAnalysisService {
String end_date = maxDays.getString("date_str");
JSONObject cleanDays = estimateAnalysisMapper.findLastCleanDays(endStr, 1);
List tencentSettle = platformSettlementMapper.findBySettleDate(new Date(maxDays.getDate("date_str").getTime() - 86400000L), "Wechat");
- if (tencentSettle != null && tencentSettle.size()>0) {
+ if (tencentSettle != null && tencentSettle.size() > 0) {
for (JSONObject logs : tencentSettle) {
dayInfo.put("settlementFee_" + logs.getString("merchants"), logs.getBigDecimal("settlement_fee"));
if (!dayInfo.containsKey("platformGetSettleFee")) {
@@ -273,7 +273,7 @@ public class EstimateAnalysisServiceImpl implements EstimateAnalysisService {
try {
tencentSettleList = mpPaymentApi.settlementLogs(new Date(maxDays.getDate("date_str").getTime() - 86400000L), new Date(maxDays.getDate("date_str").getTime() - 86400000L), mch.getMerchantId());
- if (tencentSettle == null || tencentSettleList.size()<=0) {
+ if (tencentSettle == null || tencentSettleList.size() <= 0) {
logger.info("EstimateAnalysisServiceImpl.getDaySettleInfo ======>【" + mch.getMerchantId() + "】下没有清算记录");
} else {
for (SettlementLog settle : tencentSettleList) {
@@ -294,19 +294,19 @@ public class EstimateAnalysisServiceImpl implements EstimateAnalysisService {
}
List hfSettle = platformSettlementMapper.findBySettleDate(new Date(estimateAnalysisMapper.findLastCleanDays(end_date, 1).getDate("date_str").getTime()), "hf");
- if (hfSettle !=null && hfSettle.size()>0) {
+ if (hfSettle != null && hfSettle.size() > 0) {
for (JSONObject logs : hfSettle) {
dayInfo.put("hfSettleFee_" + logs.getString("merchants"), logs.getBigDecimal("settlement_fee"));
- dayInfo.put("platformGetSettleFee",dayInfo.getBigDecimal("hfSettleFee_" + logs.getString("merchants")));
+ dayInfo.put("platformGetSettleFee", dayInfo.getBigDecimal("hfSettleFee_" + logs.getString("merchants")));
}
- }else {
- dayInfo.put("platformGetSettleFee",BigDecimal.ZERO);
+ } else {
+ dayInfo.put("platformGetSettleFee", BigDecimal.ZERO);
}
List alipaySettleLogs = platformSettlementMapper.findBySettleDate(new Date(estimateAnalysisMapper.findLastCleanDays(end_date, 1).getDate("date_str").getTime()), "Alipay");
for (JSONObject logs : alipaySettleLogs) {
dayInfo.put("aliSettleFee_" + logs.getString("merchants"), logs.getBigDecimal("settlement_fee"));
- dayInfo.put("platformGetSettleFee",dayInfo.getBigDecimal("platformGetSettleFee").add(dayInfo.getBigDecimal("aliSettleFee_" + logs.getString("merchants"))));
+ dayInfo.put("platformGetSettleFee", dayInfo.getBigDecimal("platformGetSettleFee").add(dayInfo.getBigDecimal("aliSettleFee_" + logs.getString("merchants"))));
}
List alipayOnlineSettleLogs = platformSettlementMapper.findBySettleDate(new Date(estimateAnalysisMapper.findLastCleanDays(end_date, 1).getDate("date_str").getTime()), "AlipayOnline");
@@ -322,7 +322,7 @@ public class EstimateAnalysisServiceImpl implements EstimateAnalysisService {
@Override
public void generateSettleAmount() {
- String report_date = DateFormatUtils.format(DateUtils.addDays(new Date(),-1), "yyyy/MM/dd");
+ String report_date = DateFormatUtils.format(DateUtils.addDays(new Date(), -1), "yyyy/MM/dd");
logger.info("系统开始生成[ " + report_date + " ]清算总额");
JSONObject isClearDay = estimateAnalysisMapper.checkIsClearDay(report_date);
@@ -343,7 +343,8 @@ public class EstimateAnalysisServiceImpl implements EstimateAnalysisService {
estimateAnalysisMapper.save(estimate);
logger.info("系统自动生成[ " + report_date + " ]清算总额更新完毕");
- }}
+ }
+ }
}
@Override
@@ -358,7 +359,7 @@ public class EstimateAnalysisServiceImpl implements EstimateAnalysisService {
estimate.put("log_type", 2);
estimate.put("last_update_by", "System Auto Generat Transaction Logs");
- JSONObject estimateExit = estimateAnalysisMapper.findByLogDate(start_date,2);
+ JSONObject estimateExit = estimateAnalysisMapper.findByLogDate(start_date, 2);
if (estimateExit != null) {
estimate.put("estimate_id", estimateExit.getString("estimate_id"));
estimateAnalysisMapper.update(estimate);
@@ -375,7 +376,7 @@ public class EstimateAnalysisServiceImpl implements EstimateAnalysisService {
public List listEstimateLog(int logType, String date) {
Date monthDate;
try {
- monthDate = DateUtils.parseDate(date, new String[] { "yyyy-MM" });
+ monthDate = DateUtils.parseDate(date, new String[]{"yyyy-MM"});
} catch (ParseException e) {
throw new BadRequestException("Invalid month format");
}
@@ -398,7 +399,7 @@ public class EstimateAnalysisServiceImpl implements EstimateAnalysisService {
estimate.put("last_update_date", new Date());
estimate.put("last_update_by", "developer import");
estimate.put("log_type", 1);
- JSONObject estimateExit = estimateAnalysisMapper.findByLogDate(report_date,1);
+ JSONObject estimateExit = estimateAnalysisMapper.findByLogDate(report_date, 1);
if (estimateExit != null) {
estimate.put("estimate_id", estimateExit.getString("estimate_id"));
@@ -417,7 +418,7 @@ public class EstimateAnalysisServiceImpl implements EstimateAnalysisService {
JSONObject estimate = getTransactionAmountDaily(start_date, end_date);
estimate.put("last_update_date", new Date());
estimate.put("last_update_by", "developer import");
- JSONObject estimateExit = estimateAnalysisMapper.findByLogDate(start_date,2);
+ JSONObject estimateExit = estimateAnalysisMapper.findByLogDate(start_date, 2);
estimate.put("log_type", 2);
if (estimateExit != null) {
estimate.put("estimate_id", estimateExit.getString("estimate_id"));
diff --git a/src/main/java/au/com/royalpay/payment/manage/appclient/beans/RetailLoginInfo.java b/src/main/java/au/com/royalpay/payment/manage/appclient/beans/RetailLoginInfo.java
index 4f4de900c..d833cde07 100644
--- a/src/main/java/au/com/royalpay/payment/manage/appclient/beans/RetailLoginInfo.java
+++ b/src/main/java/au/com/royalpay/payment/manage/appclient/beans/RetailLoginInfo.java
@@ -2,7 +2,7 @@ package au.com.royalpay.payment.manage.appclient.beans;
import au.com.royalpay.payment.manage.signin.beans.LoginInfo;
import au.com.royalpay.payment.tools.utils.PasswordUtils;
-import org.hibernate.validator.constraints.NotEmpty;
+import javax.validation.constraints.NotEmpty;
/**
* Created by yixian on 2016-12-14.
diff --git a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/ManageAppServiceImp.java b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/ManageAppServiceImp.java
index 4741de2b4..dcdd976b7 100644
--- a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/ManageAppServiceImp.java
+++ b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/ManageAppServiceImp.java
@@ -42,7 +42,7 @@ import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
import org.thymeleaf.context.Context;
-import org.thymeleaf.spring4.SpringTemplateEngine;
+import org.thymeleaf.spring5.SpringTemplateEngine;
import javax.annotation.Resource;
import java.math.BigDecimal;
diff --git a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java
index ba640eac3..3f7468ceb 100644
--- a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java
+++ b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java
@@ -86,7 +86,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import org.springframework.web.multipart.MultipartFile;
import org.thymeleaf.context.Context;
-import org.thymeleaf.spring4.SpringTemplateEngine;
+import org.thymeleaf.spring5.SpringTemplateEngine;
import java.awt.image.BufferedImage;
import java.io.*;
diff --git a/src/main/java/au/com/royalpay/payment/manage/application/beans/ClientPreApplyBean.java b/src/main/java/au/com/royalpay/payment/manage/application/beans/ClientPreApplyBean.java
index 8c95254c0..30777aeb7 100644
--- a/src/main/java/au/com/royalpay/payment/manage/application/beans/ClientPreApplyBean.java
+++ b/src/main/java/au/com/royalpay/payment/manage/application/beans/ClientPreApplyBean.java
@@ -4,7 +4,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;
-import org.hibernate.validator.constraints.NotEmpty;
+import javax.validation.constraints.NotEmpty;
import java.util.ArrayList;
import java.util.List;
diff --git a/src/main/java/au/com/royalpay/payment/manage/application/beans/ClientPreApplyStep1Bean.java b/src/main/java/au/com/royalpay/payment/manage/application/beans/ClientPreApplyStep1Bean.java
index ca14416cc..3d7084b9e 100644
--- a/src/main/java/au/com/royalpay/payment/manage/application/beans/ClientPreApplyStep1Bean.java
+++ b/src/main/java/au/com/royalpay/payment/manage/application/beans/ClientPreApplyStep1Bean.java
@@ -3,7 +3,7 @@ package au.com.royalpay.payment.manage.application.beans;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
-import org.hibernate.validator.constraints.NotEmpty;
+import javax.validation.constraints.NotEmpty;
/**
* Created by yuan on 2018/5/23.
diff --git a/src/main/java/au/com/royalpay/payment/manage/application/beans/SimpleClientBean.java b/src/main/java/au/com/royalpay/payment/manage/application/beans/SimpleClientBean.java
index f6daef7eb..c8cce7a66 100644
--- a/src/main/java/au/com/royalpay/payment/manage/application/beans/SimpleClientBean.java
+++ b/src/main/java/au/com/royalpay/payment/manage/application/beans/SimpleClientBean.java
@@ -3,7 +3,7 @@ package au.com.royalpay.payment.manage.application.beans;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
-import org.hibernate.validator.constraints.NotEmpty;
+import javax.validation.constraints.NotEmpty;
/**
* Created by yishuqian on 02/03/2017.
diff --git a/src/main/java/au/com/royalpay/payment/manage/application/core/SimpleClientApplyService.java b/src/main/java/au/com/royalpay/payment/manage/application/core/SimpleClientApplyService.java
index 31227f532..2e7c43c13 100644
--- a/src/main/java/au/com/royalpay/payment/manage/application/core/SimpleClientApplyService.java
+++ b/src/main/java/au/com/royalpay/payment/manage/application/core/SimpleClientApplyService.java
@@ -3,7 +3,8 @@ package au.com.royalpay.payment.manage.application.core;
import au.com.royalpay.payment.manage.merchants.beans.NewAccountBean;
import com.alibaba.fastjson.JSONObject;
-import org.apache.catalina.servlet4preview.http.HttpServletRequest;
+
+import javax.servlet.http.HttpServletRequest;
public interface SimpleClientApplyService {
void verifyRegisterSMSCode(String codeKey, String phoneNumber);
diff --git a/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java
index 30987a49d..73ea0b7ad 100644
--- a/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java
+++ b/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java
@@ -26,7 +26,6 @@ import au.com.royalpay.payment.tools.utils.PasswordUtils;
import com.alibaba.fastjson.JSONObject;
-import org.apache.catalina.servlet4preview.http.HttpServletRequest;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
@@ -37,7 +36,6 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.RequestMethod;
import org.thymeleaf.context.Context;
-import org.thymeleaf.spring4.SpringTemplateEngine;
import java.io.IOException;
import java.net.URISyntaxException;
@@ -49,9 +47,11 @@ import java.util.stream.Collectors;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
import cn.yixblog.platform.http.HttpRequestGenerator;
import cn.yixblog.platform.http.HttpRequestResult;
+import org.thymeleaf.spring5.SpringTemplateEngine;
@Service
public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
diff --git a/src/main/java/au/com/royalpay/payment/manage/application/web/SimpleClientApplyController.java b/src/main/java/au/com/royalpay/payment/manage/application/web/SimpleClientApplyController.java
index 0efaf7f5f..b9dbff23b 100644
--- a/src/main/java/au/com/royalpay/payment/manage/application/web/SimpleClientApplyController.java
+++ b/src/main/java/au/com/royalpay/payment/manage/application/web/SimpleClientApplyController.java
@@ -3,28 +3,15 @@ package au.com.royalpay.payment.manage.application.web;
import au.com.royalpay.payment.manage.application.beans.ClientPreApplyBean;
import au.com.royalpay.payment.manage.application.beans.ClientPreApplyStep1Bean;
import au.com.royalpay.payment.manage.application.core.SimpleClientApplyService;
-import au.com.royalpay.payment.manage.notice.core.MailService;
import au.com.royalpay.payment.tools.env.SysConfigManager;
-
import com.alibaba.fastjson.JSONObject;
-
-import org.apache.catalina.servlet4preview.http.HttpServletRequest;
import org.apache.commons.lang3.StringUtils;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
-import org.thymeleaf.context.Context;
-import org.thymeleaf.spring4.SpringTemplateEngine;
import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
-import java.io.IOException;
-import java.net.URISyntaxException;
@RestController
@RequestMapping("/register")
diff --git a/src/main/java/au/com/royalpay/payment/manage/cashback/bean/CashbackQuery.java b/src/main/java/au/com/royalpay/payment/manage/cashback/bean/CashbackQuery.java
index 421aef836..59bf6ddaf 100644
--- a/src/main/java/au/com/royalpay/payment/manage/cashback/bean/CashbackQuery.java
+++ b/src/main/java/au/com/royalpay/payment/manage/cashback/bean/CashbackQuery.java
@@ -5,7 +5,7 @@ import au.com.royalpay.payment.core.exceptions.ParamInvalidException;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.time.DateUtils;
-import org.hibernate.validator.constraints.NotEmpty;
+import javax.validation.constraints.NotEmpty;
import java.text.DateFormat;
import java.text.ParseException;
diff --git a/src/main/java/au/com/royalpay/payment/manage/cashiers/beans/CashierBean.java b/src/main/java/au/com/royalpay/payment/manage/cashiers/beans/CashierBean.java
index 4cb76e066..9251836b5 100644
--- a/src/main/java/au/com/royalpay/payment/manage/cashiers/beans/CashierBean.java
+++ b/src/main/java/au/com/royalpay/payment/manage/cashiers/beans/CashierBean.java
@@ -2,7 +2,7 @@ package au.com.royalpay.payment.manage.cashiers.beans;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
-import org.hibernate.validator.constraints.NotEmpty;
+import javax.validation.constraints.NotEmpty;
/**
* Created by yishuqian on 20/12/2016.
diff --git a/src/main/java/au/com/royalpay/payment/manage/cashiers/core/impls/CashierOrderServiceImp.java b/src/main/java/au/com/royalpay/payment/manage/cashiers/core/impls/CashierOrderServiceImp.java
index 4c205c559..2a49581a6 100644
--- a/src/main/java/au/com/royalpay/payment/manage/cashiers/core/impls/CashierOrderServiceImp.java
+++ b/src/main/java/au/com/royalpay/payment/manage/cashiers/core/impls/CashierOrderServiceImp.java
@@ -23,6 +23,7 @@ public class CashierOrderServiceImp implements CashierOrderService {
private CashierMapper cashierMapper;
@Resource
private CashierOrderMapper cashierOrderMapper;
+
@Override
public JSONObject listCashierOrders(JSONObject partner, CashierQueryBean query) {
String timezone = partner.getJSONObject("client").getString("timezone");
@@ -36,7 +37,7 @@ public class CashierOrderServiceImp implements CashierOrderService {
@Override
public JSONObject listCashierOrders(String cashier_id, JSONObject partner, CashierQueryBean query) {
JSONObject cashier = cashierMapper.findOne(cashier_id);
- Assert.notNull(cashier);
+ Assert.notNull(cashier, "cashier not found");
String timezone = partner.getJSONObject("client").getString("timezone");
JSONObject params = query.params(timezone);
params.put("client_id", partner.getIntValue("client_id"));
diff --git a/src/main/java/au/com/royalpay/payment/manage/cashiers/core/impls/CashierServiceImp.java b/src/main/java/au/com/royalpay/payment/manage/cashiers/core/impls/CashierServiceImp.java
index e80356190..c6c18a1da 100644
--- a/src/main/java/au/com/royalpay/payment/manage/cashiers/core/impls/CashierServiceImp.java
+++ b/src/main/java/au/com/royalpay/payment/manage/cashiers/core/impls/CashierServiceImp.java
@@ -68,7 +68,7 @@ public class CashierServiceImp implements CashierService {
@Override
public void updateCashier(JSONObject partner, String cashier_id, CashierBean info) {
JSONObject cashier = cashierMapper.findOne(cashier_id);
- Assert.notNull(cashier);
+ Assert.notNull(cashier, "cashier not found");
if (partner.getIntValue("client_id") != cashier.getIntValue("client_id")) {
throw new ForbiddenException("You have no permission!");
}
@@ -85,13 +85,13 @@ public class CashierServiceImp implements CashierService {
@Override
public JSONObject getCashierByCashierId(String cashier_id, JSONObject partner) {
JSONObject cashier = cashierMapper.findOne(cashier_id);
- Assert.notNull(cashier);
+ Assert.notNull(cashier, "cashier not found");
if (partner.getIntValue("client_id") != cashier.getIntValue("client_id")) {
throw new ForbiddenException("You have no permission!");
}
String url = PlatformEnvironment.getEnv().concatUrl("/partner/cashiers/payment/" + partner.getString("client_moniker") + "/" + cashier_id + "/qr_pay");
cashier.put("url", url);
- cashier.put("qrcode", QRCodeUtils.qrcodeImageCode(url, 250,false));
+ cashier.put("qrcode", QRCodeUtils.qrcodeImageCode(url, 250, false));
return cashier;
}
@@ -116,7 +116,7 @@ public class CashierServiceImp implements CashierService {
throw new BadRequestException("Invalid Cashier");
}
JSONObject cashier = cashierMapper.findOne(cashier_id);
- Assert.notNull(cashier);
+ Assert.notNull(cashier, "cashier not found");
cashier.put("wechat_openid", wechat.getString("wepay_openid"));
cashier.put("nick_name", wechat.getString("nickname"));
cashier.put("headimgurl", wechat.getString("headimgurl"));
diff --git a/src/main/java/au/com/royalpay/payment/manage/citypartner/beans/CityPartnerBean.java b/src/main/java/au/com/royalpay/payment/manage/citypartner/beans/CityPartnerBean.java
index 043f5814d..109e1e05b 100644
--- a/src/main/java/au/com/royalpay/payment/manage/citypartner/beans/CityPartnerBean.java
+++ b/src/main/java/au/com/royalpay/payment/manage/citypartner/beans/CityPartnerBean.java
@@ -1,9 +1,9 @@
package au.com.royalpay.payment.manage.citypartner.beans;
import com.alibaba.fastjson.JSONObject;
-import org.hibernate.validator.constraints.Email;
+import javax.validation.constraints.Email;
import org.hibernate.validator.constraints.Length;
-import org.hibernate.validator.constraints.NotBlank;
+import javax.validation.constraints.NotBlank;
/**
* Created by yixian on 2017-01-23.
diff --git a/src/main/java/au/com/royalpay/payment/manage/customers/beans/CustomerComment.java b/src/main/java/au/com/royalpay/payment/manage/customers/beans/CustomerComment.java
index 3778a68c1..7e8b157bc 100644
--- a/src/main/java/au/com/royalpay/payment/manage/customers/beans/CustomerComment.java
+++ b/src/main/java/au/com/royalpay/payment/manage/customers/beans/CustomerComment.java
@@ -3,7 +3,7 @@ package au.com.royalpay.payment.manage.customers.beans;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
-import org.hibernate.validator.constraints.NotEmpty;
+import javax.validation.constraints.NotEmpty;
import java.util.Date;
diff --git a/src/main/java/au/com/royalpay/payment/manage/customers/beans/EncourageEventParameters.java b/src/main/java/au/com/royalpay/payment/manage/customers/beans/EncourageEventParameters.java
index 907d22d24..d17cad2ec 100644
--- a/src/main/java/au/com/royalpay/payment/manage/customers/beans/EncourageEventParameters.java
+++ b/src/main/java/au/com/royalpay/payment/manage/customers/beans/EncourageEventParameters.java
@@ -3,7 +3,7 @@ package au.com.royalpay.payment.manage.customers.beans;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
-import org.hibernate.validator.constraints.NotEmpty;
+import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
diff --git a/src/main/java/au/com/royalpay/payment/manage/customers/beans/GatewayParams.java b/src/main/java/au/com/royalpay/payment/manage/customers/beans/GatewayParams.java
index 187d96986..f3479e792 100644
--- a/src/main/java/au/com/royalpay/payment/manage/customers/beans/GatewayParams.java
+++ b/src/main/java/au/com/royalpay/payment/manage/customers/beans/GatewayParams.java
@@ -2,7 +2,7 @@ package au.com.royalpay.payment.manage.customers.beans;
import au.com.royalpay.payment.core.exceptions.ParamInvalidException;
import org.apache.commons.lang3.StringUtils;
-import org.hibernate.validator.constraints.NotEmpty;
+import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
diff --git a/src/main/java/au/com/royalpay/payment/manage/dev/bean/AliExcel.java b/src/main/java/au/com/royalpay/payment/manage/dev/bean/AliExcel.java
index 60f93cf12..ae234f7ac 100644
--- a/src/main/java/au/com/royalpay/payment/manage/dev/bean/AliExcel.java
+++ b/src/main/java/au/com/royalpay/payment/manage/dev/bean/AliExcel.java
@@ -4,7 +4,7 @@ import au.com.royalpay.payment.core.exceptions.ParamInvalidException;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateUtils;
-import org.hibernate.validator.constraints.NotEmpty;
+import javax.validation.constraints.NotEmpty;
import java.text.DateFormat;
import java.text.ParseException;
diff --git a/src/main/java/au/com/royalpay/payment/manage/dev/bean/ClientTestRegisterInfo.java b/src/main/java/au/com/royalpay/payment/manage/dev/bean/ClientTestRegisterInfo.java
index eeabc9de8..126ad75fa 100644
--- a/src/main/java/au/com/royalpay/payment/manage/dev/bean/ClientTestRegisterInfo.java
+++ b/src/main/java/au/com/royalpay/payment/manage/dev/bean/ClientTestRegisterInfo.java
@@ -3,7 +3,7 @@ package au.com.royalpay.payment.manage.dev.bean;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
-import org.hibernate.validator.constraints.NotEmpty;
+import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
/**
diff --git a/src/main/java/au/com/royalpay/payment/manage/dev/bean/Message.java b/src/main/java/au/com/royalpay/payment/manage/dev/bean/Message.java
index b4d3ce22c..fa475d94f 100644
--- a/src/main/java/au/com/royalpay/payment/manage/dev/bean/Message.java
+++ b/src/main/java/au/com/royalpay/payment/manage/dev/bean/Message.java
@@ -2,7 +2,7 @@ package au.com.royalpay.payment.manage.dev.bean;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
-import org.hibernate.validator.constraints.NotEmpty;
+import javax.validation.constraints.NotEmpty;
/**
* Created by yuan on 2017/9/7.
diff --git a/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/MerchantLocationServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/MerchantLocationServiceImpl.java
index ad1da96e7..d6af25de0 100644
--- a/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/MerchantLocationServiceImpl.java
+++ b/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/MerchantLocationServiceImpl.java
@@ -25,6 +25,7 @@ import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
@@ -39,7 +40,7 @@ public class MerchantLocationServiceImpl implements MerchantLocationService {
private ThreadPoolExecutor pool = new ThreadPoolExecutor(5, 100, 5, TimeUnit.SECONDS, new LinkedBlockingQueue());
- private Set failureSet = new ConcurrentSet<>();
+ private Set failureSet = ConcurrentHashMap.newKeySet();
@Resource
private ClientLocationsMapper clientLocationsMapper;
diff --git a/src/main/java/au/com/royalpay/payment/manage/goods/bean/GoodInfo.java b/src/main/java/au/com/royalpay/payment/manage/goods/bean/GoodInfo.java
index fe93653b2..0e32fb03d 100644
--- a/src/main/java/au/com/royalpay/payment/manage/goods/bean/GoodInfo.java
+++ b/src/main/java/au/com/royalpay/payment/manage/goods/bean/GoodInfo.java
@@ -2,7 +2,7 @@ package au.com.royalpay.payment.manage.goods.bean;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
-import org.hibernate.validator.constraints.NotEmpty;
+import javax.validation.constraints.NotEmpty;
import java.util.List;
diff --git a/src/main/java/au/com/royalpay/payment/manage/logview/beans/LogRiskQueryBean.java b/src/main/java/au/com/royalpay/payment/manage/logview/beans/LogRiskQueryBean.java
index 5d572025e..f93467be0 100644
--- a/src/main/java/au/com/royalpay/payment/manage/logview/beans/LogRiskQueryBean.java
+++ b/src/main/java/au/com/royalpay/payment/manage/logview/beans/LogRiskQueryBean.java
@@ -3,7 +3,7 @@ package au.com.royalpay.payment.manage.logview.beans;
import au.com.royalpay.payment.core.exceptions.ParamInvalidException;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.time.DateUtils;
-import org.hibernate.validator.constraints.NotEmpty;
+import javax.validation.constraints.NotEmpty;
import java.text.DateFormat;
import java.text.ParseException;
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 5a4786462..bdce657cf 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
@@ -64,7 +64,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils;
import org.thymeleaf.context.Context;
-import org.thymeleaf.spring4.SpringTemplateEngine;
+import org.thymeleaf.spring5.SpringTemplateEngine;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/BankAccountInfo.java b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/BankAccountInfo.java
index 81ab852b0..22188436d 100644
--- a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/BankAccountInfo.java
+++ b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/BankAccountInfo.java
@@ -3,7 +3,7 @@ package au.com.royalpay.payment.manage.merchants.beans;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import org.hibernate.validator.constraints.Length;
-import org.hibernate.validator.constraints.NotEmpty;
+import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientApplyInfo.java b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientApplyInfo.java
index e7d6a54d2..a442b4826 100644
--- a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientApplyInfo.java
+++ b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientApplyInfo.java
@@ -3,7 +3,7 @@ package au.com.royalpay.payment.manage.merchants.beans;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
-import org.hibernate.validator.constraints.NotEmpty;
+import javax.validation.constraints.NotEmpty;
/**
* Created by yixian on 2016-06-29.
diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRateConfig.java b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRateConfig.java
index 8b37efce7..ea9e1acf8 100644
--- a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRateConfig.java
+++ b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRateConfig.java
@@ -4,7 +4,7 @@ import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import org.apache.commons.lang3.time.DateUtils;
-import org.hibernate.validator.constraints.NotEmpty;
+import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Calendar;
diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java
index 67bf76bc9..00ba594da 100644
--- a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java
+++ b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java
@@ -3,7 +3,7 @@ package au.com.royalpay.payment.manage.merchants.beans;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
-import org.hibernate.validator.constraints.NotEmpty;
+import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/NewAccountBean.java b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/NewAccountBean.java
index 5df58d16c..d611dc943 100644
--- a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/NewAccountBean.java
+++ b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/NewAccountBean.java
@@ -3,7 +3,7 @@ package au.com.royalpay.payment.manage.merchants.beans;
import au.com.royalpay.payment.tools.permission.enums.PartnerRole;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
-import org.hibernate.validator.constraints.NotEmpty;
+import javax.validation.constraints.NotEmpty;
/**
* Created by yixian on 2016-07-02.
diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/SubClientRegistry.java b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/SubClientRegistry.java
index d1fb9d47a..4dca9d9b6 100644
--- a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/SubClientRegistry.java
+++ b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/SubClientRegistry.java
@@ -3,7 +3,7 @@ package au.com.royalpay.payment.manage.merchants.beans;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
-import org.hibernate.validator.constraints.NotEmpty;
+import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/SubMerchantIdApply.java b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/SubMerchantIdApply.java
index 5929151c5..f156abc3a 100644
--- a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/SubMerchantIdApply.java
+++ b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/SubMerchantIdApply.java
@@ -5,7 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.validator.constraints.Length;
-import org.hibernate.validator.constraints.NotBlank;
+import javax.validation.constraints.NotBlank;
/**
* Created by yuan on 2018/1/19.
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 0e71b2642..a112352d4 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
@@ -107,7 +107,7 @@ import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.multipart.MultipartFile;
import org.thymeleaf.context.Context;
-import org.thymeleaf.spring4.SpringTemplateEngine;
+import org.thymeleaf.spring5.SpringTemplateEngine;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
diff --git a/src/main/java/au/com/royalpay/payment/manage/organizations/beans/OrgInfo.java b/src/main/java/au/com/royalpay/payment/manage/organizations/beans/OrgInfo.java
index e65588da3..2a20c1502 100644
--- a/src/main/java/au/com/royalpay/payment/manage/organizations/beans/OrgInfo.java
+++ b/src/main/java/au/com/royalpay/payment/manage/organizations/beans/OrgInfo.java
@@ -2,7 +2,7 @@ package au.com.royalpay.payment.manage.organizations.beans;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;
-import org.hibernate.validator.constraints.NotEmpty;
+import javax.validation.constraints.NotEmpty;
/**
* Created by yixian on 2016-10-18.
diff --git a/src/main/java/au/com/royalpay/payment/manage/permission/utils/OrgCheckUtils.java b/src/main/java/au/com/royalpay/payment/manage/permission/utils/OrgCheckUtils.java
index 53c2dea40..4c9c90790 100644
--- a/src/main/java/au/com/royalpay/payment/manage/permission/utils/OrgCheckUtils.java
+++ b/src/main/java/au/com/royalpay/payment/manage/permission/utils/OrgCheckUtils.java
@@ -9,7 +9,7 @@ import org.springframework.util.Assert;
*/
public class OrgCheckUtils {
public static void checkOrgPermission(JSONObject manager, JSONObject client) {
- Assert.notNull(client);
+ Assert.notNull(client, "client should not be null");
if (manager != null && manager.getInteger("org_id") != null && manager.getIntValue("org_id") != client.getIntValue("org_id")) {
throw new ForbiddenException("This client was not belong to your organization");
}
diff --git a/src/main/java/au/com/royalpay/payment/manage/pos/datasource/DataSourceConfiguration.java b/src/main/java/au/com/royalpay/payment/manage/pos/datasource/DataSourceConfiguration.java
index 03e00ca47..116539760 100644
--- a/src/main/java/au/com/royalpay/payment/manage/pos/datasource/DataSourceConfiguration.java
+++ b/src/main/java/au/com/royalpay/payment/manage/pos/datasource/DataSourceConfiguration.java
@@ -1,8 +1,8 @@
package au.com.royalpay.payment.manage.pos.datasource;
import com.zaxxer.hikari.HikariDataSource;
-import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder;
import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.boot.jdbc.DataSourceBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
diff --git a/src/main/java/au/com/royalpay/payment/manage/redpack/beans/RedpackConfigBean.java b/src/main/java/au/com/royalpay/payment/manage/redpack/beans/RedpackConfigBean.java
index e7da6d417..7ae29c907 100644
--- a/src/main/java/au/com/royalpay/payment/manage/redpack/beans/RedpackConfigBean.java
+++ b/src/main/java/au/com/royalpay/payment/manage/redpack/beans/RedpackConfigBean.java
@@ -3,9 +3,10 @@ package au.com.royalpay.payment.manage.redpack.beans;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import org.hibernate.validator.constraints.Length;
-import org.hibernate.validator.constraints.NotEmpty;
import org.hibernate.validator.constraints.Range;
+import javax.validation.constraints.NotEmpty;
+
/**
* Created by davep on 2016-08-03.
*/
diff --git a/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java
index 2eddba926..912a76170 100644
--- a/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java
+++ b/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java
@@ -60,7 +60,7 @@ import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.thymeleaf.context.Context;
-import org.thymeleaf.spring4.SpringTemplateEngine;
+import org.thymeleaf.spring5.SpringTemplateEngine;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
diff --git a/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskUploadServiceIpml.java b/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskUploadServiceIpml.java
index d628b0062..d24b95a2a 100644
--- a/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskUploadServiceIpml.java
+++ b/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskUploadServiceIpml.java
@@ -20,7 +20,7 @@ import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.thymeleaf.context.Context;
-import org.thymeleaf.spring4.SpringTemplateEngine;
+import org.thymeleaf.spring5.SpringTemplateEngine;
import javax.annotation.Resource;
import java.text.ParseException;
diff --git a/src/main/java/au/com/royalpay/payment/manage/signin/beans/ChangePwdBean.java b/src/main/java/au/com/royalpay/payment/manage/signin/beans/ChangePwdBean.java
index a88a32abf..bd7f9c01f 100644
--- a/src/main/java/au/com/royalpay/payment/manage/signin/beans/ChangePwdBean.java
+++ b/src/main/java/au/com/royalpay/payment/manage/signin/beans/ChangePwdBean.java
@@ -1,6 +1,6 @@
package au.com.royalpay.payment.manage.signin.beans;
-import org.hibernate.validator.constraints.NotEmpty;
+import javax.validation.constraints.NotEmpty;
/**
* Created by yixian on 2016-06-29.
diff --git a/src/main/java/au/com/royalpay/payment/manage/signin/beans/FindPwdBean.java b/src/main/java/au/com/royalpay/payment/manage/signin/beans/FindPwdBean.java
index 87f95e6c3..c2752eba0 100644
--- a/src/main/java/au/com/royalpay/payment/manage/signin/beans/FindPwdBean.java
+++ b/src/main/java/au/com/royalpay/payment/manage/signin/beans/FindPwdBean.java
@@ -1,6 +1,6 @@
package au.com.royalpay.payment.manage.signin.beans;
-import org.hibernate.validator.constraints.NotEmpty;
+import javax.validation.constraints.NotEmpty;
/**
* Created by yishuqian on 14/02/2017.
diff --git a/src/main/java/au/com/royalpay/payment/manage/signin/beans/LoginInfo.java b/src/main/java/au/com/royalpay/payment/manage/signin/beans/LoginInfo.java
index 9bcf01440..dd18a1ac0 100644
--- a/src/main/java/au/com/royalpay/payment/manage/signin/beans/LoginInfo.java
+++ b/src/main/java/au/com/royalpay/payment/manage/signin/beans/LoginInfo.java
@@ -1,7 +1,7 @@
package au.com.royalpay.payment.manage.signin.beans;
import au.com.royalpay.payment.tools.utils.PasswordUtils;
-import org.hibernate.validator.constraints.NotEmpty;
+import javax.validation.constraints.NotEmpty;
/**
* Created by yixian on 2016-06-29.
diff --git a/src/main/java/au/com/royalpay/payment/manage/signin/beans/ManagerInfo.java b/src/main/java/au/com/royalpay/payment/manage/signin/beans/ManagerInfo.java
index 602fbfab5..09707b259 100644
--- a/src/main/java/au/com/royalpay/payment/manage/signin/beans/ManagerInfo.java
+++ b/src/main/java/au/com/royalpay/payment/manage/signin/beans/ManagerInfo.java
@@ -5,8 +5,9 @@ import au.com.royalpay.payment.tools.utils.PasswordUtils;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import org.apache.commons.lang3.StringUtils;
-import org.hibernate.validator.constraints.Email;
-import org.hibernate.validator.constraints.NotEmpty;
+
+import javax.validation.constraints.Email;
+import javax.validation.constraints.NotEmpty;
import java.util.Date;
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 f8bfb61df..cc4ab823f 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
@@ -38,7 +38,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import org.thymeleaf.context.Context;
-import org.thymeleaf.spring4.SpringTemplateEngine;
+import org.thymeleaf.spring5.SpringTemplateEngine;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
diff --git a/src/main/java/au/com/royalpay/payment/manage/vipcustomer/beans/VipCustomerInfo.java b/src/main/java/au/com/royalpay/payment/manage/vipcustomer/beans/VipCustomerInfo.java
index d3a27d3ed..954e6381b 100644
--- a/src/main/java/au/com/royalpay/payment/manage/vipcustomer/beans/VipCustomerInfo.java
+++ b/src/main/java/au/com/royalpay/payment/manage/vipcustomer/beans/VipCustomerInfo.java
@@ -2,7 +2,7 @@ package au.com.royalpay.payment.manage.vipcustomer.beans;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
-import org.hibernate.validator.constraints.NotEmpty;
+import javax.validation.constraints.NotEmpty;
/**
* Created by yishuqian on 31/10/2016.
diff --git a/src/main/java/au/com/royalpay/payment/manage/vipcustomer/core/impls/VipCustomerServiceImp.java b/src/main/java/au/com/royalpay/payment/manage/vipcustomer/core/impls/VipCustomerServiceImp.java
index 19a232b81..bb36abe63 100644
--- a/src/main/java/au/com/royalpay/payment/manage/vipcustomer/core/impls/VipCustomerServiceImp.java
+++ b/src/main/java/au/com/royalpay/payment/manage/vipcustomer/core/impls/VipCustomerServiceImp.java
@@ -29,23 +29,23 @@ public class VipCustomerServiceImp implements VipCustomerService {
@Override
public JSONObject listVipCustomers(JSONObject partner, VipCusQuery query) {
- JSONObject params =query.toJsonParams();
- params.put("client_id",partner.getIntValue("client_id"));
- PageList vipCustomers=vipCustomerMapper.listVipCustomers(params,new PageBounds(query.getPage(), query.getLimit(), Order.formString("create_time.desc")));
+ JSONObject params = query.toJsonParams();
+ params.put("client_id", partner.getIntValue("client_id"));
+ PageList vipCustomers = vipCustomerMapper.listVipCustomers(params, new PageBounds(query.getPage(), query.getLimit(), Order.formString("create_time.desc")));
return PageListUtils.buildPageListResult(vipCustomers);
}
@Override
public JSONObject createVipCustomer(JSONObject partner, VipCustomerInfo vipCustomerInfo) {
- String vipCode = partner.getString("client_moniker")+vipCustomerInfo.getVip_code().toUpperCase();
+ String vipCode = partner.getString("client_moniker") + vipCustomerInfo.getVip_code().toUpperCase();
JSONObject vipCustomer = getVipCustomerInfoByCode(vipCode);
- if (vipCustomer != null){
+ if (vipCustomer != null) {
throw new BadRequestException("error.vipcustomer.valid.dumplicate_vip_code");
}
JSONObject info = vipCustomerInfo.insertObject();
- info.put("vip_code",vipCode);
- info.put("client_id",partner.getIntValue("client_id"));
- info.put("create_time",new Date());
+ info.put("vip_code", vipCode);
+ info.put("client_id", partner.getIntValue("client_id"));
+ info.put("create_time", new Date());
vipCustomerMapper.save(info);
return info;
}
@@ -53,26 +53,26 @@ public class VipCustomerServiceImp implements VipCustomerService {
@Override
public void updateVipCustomer(JSONObject partner, String vip_code, VipCustomerInfo info) {
JSONObject vipCustomerInfo = getVipCustomerInfoByCode(vip_code);
- Assert.notNull(vipCustomerInfo);
+ Assert.notNull(vipCustomerInfo, "customer not exists");
JSONObject updateInfo = info.updateObject();
- updateInfo.put("client_id",partner.getIntValue("client_id"));
- updateInfo.put("vip_customer_id",vipCustomerInfo.getString("vip_customer_id"));
+ updateInfo.put("client_id", partner.getIntValue("client_id"));
+ updateInfo.put("vip_customer_id", vipCustomerInfo.getString("vip_customer_id"));
vipCustomerMapper.update(updateInfo);
}
@Override
- public JSONObject getVipCustomerInfoByCode(String vipCode){
+ public JSONObject getVipCustomerInfoByCode(String vipCode) {
return vipCustomerMapper.findVipCustomerByCode(vipCode);
}
@Override
public JSONObject getVipCustomerDetail(JSONObject partner, String vip_code) {
JSONObject vip_customer = getVipCustomerInfoByCode(vip_code);
- Assert.notNull(vip_customer);
+ Assert.notNull(vip_customer, "customer not exists");
String clientMoniker = partner.getString("client_moniker");
- String url = PlatformEnvironment.getEnv().concatUrl("/partner/vip/"+clientMoniker+"/payment/qrcode/" + vip_code);
- vip_customer.put("url",url);
- vip_customer.put("qrcode", QRCodeUtils.qrcodeImageCode(url, 250,false));
+ String url = PlatformEnvironment.getEnv().concatUrl("/partner/vip/" + clientMoniker + "/payment/qrcode/" + vip_code);
+ vip_customer.put("url", url);
+ vip_customer.put("qrcode", QRCodeUtils.qrcodeImageCode(url, 250, false));
return vip_customer;
}
}
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index b2810ea7e..cffd9957d 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -146,4 +146,9 @@ app.hanyin-secure.sftp-pwd=royalpay
qcloud.secret-id=AKIDlHdjgWzZliPvBauZFfrnW0MaZOyHdTPz
qcloud.secret-key=YswoQDsIZfWEqEAEvMXS8Yic84lFn9Jp
-qcloud.scf.region=ap-hongkong
\ No newline at end of file
+qcloud.scf.region=ap-hongkong
+
+apple.message.apns.file=
+apple.message.apns.password=
+android.message.appkey=
+android.message.secret=
\ No newline at end of file
diff --git a/src/test/java/au/com/royalpay/payment/manage/process/ato/ExportATOReport.java b/src/test/java/au/com/royalpay/payment/manage/process/ato/ExportATOReport.java
index 0c17dd0c9..eb164b1d6 100644
--- a/src/test/java/au/com/royalpay/payment/manage/process/ato/ExportATOReport.java
+++ b/src/test/java/au/com/royalpay/payment/manage/process/ato/ExportATOReport.java
@@ -19,7 +19,7 @@ import java.nio.charset.StandardCharsets;
* Create by yixian at 2018-08-31 14:40
*/
@SpringBootTest
-@ActiveProfiles({"proxy", "wechat"})
+@ActiveProfiles({"proxy", "alipay", "wechat", "jd", "bestpay", "rpay","yeepay"})
@TestPropertySource(properties = {"spring.datasource.username=root", "spring.datasource.password=ZOIBhellor0yalpay"})
@RunWith(SpringRunner.class)
public class ExportATOReport {
@@ -28,7 +28,7 @@ public class ExportATOReport {
@Test
public void export() throws IOException {
- String content = atoReportService.exportBTTPSFile(DateTime.parse("2017-07-01").toDate(), DateTime.parse("2018-06-30").toDate());
- FileUtils.write(new File("C:\\Users\\yixian\\Documents\\royalpay2017070120180630.bttps"), content, StandardCharsets.US_ASCII);
+ String content = atoReportService.exportBTTPSFile(DateTime.parse("2018-07-01").toDate(), DateTime.parse("2019-06-30").toDate());
+ FileUtils.write(new File("C:\\Users\\davep\\Documents\\royalpay2018070120190630.bttps"), content, StandardCharsets.US_ASCII);
}
}
diff --git a/src/test/java/au/com/royalpay/payment/manage/task/SettleMailTest.java b/src/test/java/au/com/royalpay/payment/manage/task/SettleMailTest.java
index a80f0a46a..9e597d5ff 100644
--- a/src/test/java/au/com/royalpay/payment/manage/task/SettleMailTest.java
+++ b/src/test/java/au/com/royalpay/payment/manage/task/SettleMailTest.java
@@ -10,7 +10,7 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringRunner;
import org.thymeleaf.context.Context;
-import org.thymeleaf.spring4.SpringTemplateEngine;
+import org.thymeleaf.spring5.SpringTemplateEngine;
import javax.annotation.Resource;
import java.io.IOException;