upgrade parent

master
yixian 5 years ago
parent 2c85268ca6
commit 99f8f69054

@ -5,7 +5,7 @@
<parent>
<groupId>au.com.royalpay.payment</groupId>
<artifactId>payment-parent</artifactId>
<version>1.0.13</version>
<version>1.1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -51,10 +51,6 @@
<groupId>au.com.royalpay.payment</groupId>
<artifactId>yeepay-core</artifactId>
</dependency>
<dependency>
<groupId>au.com.royalpay.payment</groupId>
<artifactId>lakala-core</artifactId>
</dependency>
<dependency>
<groupId>au.com.royalpay.payment</groupId>
<artifactId>bestpay-core</artifactId>
@ -179,7 +175,6 @@
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.4</version>
</dependency>
<!--jpush end -->

@ -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

@ -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");

@ -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;

@ -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;

@ -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);

@ -97,14 +97,14 @@ public class EstimateAnalysisServiceImpl implements EstimateAnalysisService {
List<JSONObject> 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<JSONObject> 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<JSONObject> 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<JSONObject> 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<JSONObject> 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<JSONObject> 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<JSONObject> 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"));

@ -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.

@ -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;

@ -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.*;

@ -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;

@ -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.

@ -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.

@ -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);

@ -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 {

@ -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")

@ -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;

@ -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.

@ -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"));

@ -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"));

@ -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.

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;
/**

@ -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.

@ -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<Runnable>());
private Set<Integer> failureSet = new ConcurrentSet<>();
private Set<Integer> failureSet = ConcurrentHashMap.newKeySet();
@Resource
private ClientLocationsMapper clientLocationsMapper;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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.

@ -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;

@ -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;

@ -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.

@ -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;

@ -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.

@ -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;

@ -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.

@ -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");
}

@ -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;

@ -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.
*/

@ -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.*;

@ -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;

@ -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.

@ -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.

@ -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.

@ -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;

@ -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;

@ -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.

@ -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<JSONObject> 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<JSONObject> 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;
}
}

@ -147,3 +147,8 @@ app.hanyin-secure.sftp-pwd=royalpay
qcloud.secret-id=AKIDlHdjgWzZliPvBauZFfrnW0MaZOyHdTPz
qcloud.secret-key=YswoQDsIZfWEqEAEvMXS8Yic84lFn9Jp
qcloud.scf.region=ap-hongkong
apple.message.apns.file=
apple.message.apns.password=
android.message.appkey=
android.message.secret=

@ -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);
}
}

@ -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;

Loading…
Cancel
Save