Merge branch 'hotfix-hanyin' into develop

# Conflicts:
#	src/main/java/au/com/royalpay/payment/manage/citypartner/core/impls/CityPartnerPrizeServiceImpl.java
master
yixian 6 years ago
commit 88a98f1e9e

@ -5,7 +5,7 @@
<parent>
<groupId>au.com.royalpay.payment</groupId>
<artifactId>payment-parent</artifactId>
<version>0.2.0-dev</version>
<version>0.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -532,7 +532,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
String channel = oneChannel.getKey();
if ("hf".equals(oneChannel.getKey().toLowerCase()) || "yeepay".equals(oneChannel.getKey().toLowerCase())) {
channel = "cbbankpay";
channel = "cb_bankpay";
}
for (JSONObject params : oneChannel.getValue()) {
//增加货币判断
@ -586,7 +586,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
JSONObject json = new JSONObject();
String channel = oneChannel.getKey();
if ("hf".equals(oneChannel.getKey().toLowerCase()) || "yeepay".equals(oneChannel.getKey().toLowerCase())) {
channel = "cbbankpay";
channel = "cb_bankpay";
}
for (JSONObject params : oneChannel.getValue()) {

@ -458,9 +458,8 @@ public class TestController implements ApplicationEventPublisherAware {
}
@ManagerMapping(value = "/secure/hanyin_reports/{date}", role = ManagerRole.DEVELOPER, method = RequestMethod.GET)
public void downloadHanyinSecureReports(@PathVariable String date, HttpServletResponse response) {
TradeSecureFile file = tradeSecureService.getSecureReportFile(DateTime.parse(date).toDate());
file.writeToHttp(response);
public void downloadHanyinSecureReports(@PathVariable String date) {
tradeSecureService.uploadSecureReport(DateTime.parse(date).toDate());
}
}

@ -112,6 +112,7 @@ import org.apache.commons.lang3.RandomUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.apache.el.parser.AstNot;
import org.dom4j.Element;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@ -13,21 +13,18 @@ import au.com.royalpay.payment.tools.locale.LocaleSupport;
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
import au.com.royalpay.payment.tools.permission.enums.PartnerRole;
import au.com.royalpay.payment.tools.utils.CurrencyAmountUtils;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
/**
* Create by yixian at 2018-03-20 17:44
*/
@ -93,10 +90,16 @@ public class ManualSettleSupportImpl implements ManualSettleSupport {
} else {
todayTask = new JSONObject();
}
Date nextSettle = calendarMapper.findNextClearingDate(DateUtils.truncate(new Date(), Calendar.DATE));
boolean locked = DateUtils.isSameDay(nextSettle, new Date());
//今天是清算日
if (locked) {
List<JSONObject> settleLogs = clearingLogMapper.findByDate(new Date());
//清算日但无清算记录
locked = locked && settleLogs.isEmpty();
}
//今天未清算则锁定
todayTask.put("locked", settleLogs.isEmpty());
todayTask.put("locked", locked);
if (includingUnsettleData) {
Date end = findSettleTo(clientId);
List<JSONObject> unsettleReports = transactionMapper.listClientUnsettleDataByDate(clientId, end);

@ -21,6 +21,7 @@ import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.util.Date;
import java.util.List;
import java.util.Vector;
/**
* Create by yixian at 2019-01-08 3:26
@ -66,15 +67,15 @@ public class TradeSecureServiceHanyinImpl implements TradeSecureService {
Channel channel = session.openChannel("sftp");
channel.connect();
command = (ChannelSftp) channel;
command.ls("/royalpay");
String dir = "/royalpay/" + file.getTransDate().toString("yyyyMMdd");
logger.debug("removing dir:{}", dir);
command.rmdir(dir);
logger.debug("rmdir success");
String dateString = file.getTransDate().toString("yyyyMMdd");
Vector<ChannelSftp.LsEntry> folders = command.ls("/royalpay");
String dir = "/royalpay/" + dateString;
if (folders.parallelStream().noneMatch(entry -> entry.getFilename().endsWith(dateString))) {
logger.debug("mk dir:{}", dir);
command.mkdir(dir);
}
String dest = dir + file.filename();
logger.debug("rmdir success, start uploading file:{}", dest);
logger.debug("find dir, start uploading file:{}", dest);
command.put(new ByteArrayInputStream(file.content()), dest);
} catch (IOException | JSchException | SftpException e) {
throw new ChannelNetworkException("Upload Secure file failed", e);

@ -37,7 +37,7 @@
margin-top: 6px;
}
.weui-wepay-details__bd {
padding: 12px 0;
/*padding: 8px 0;*/
}
.weui-wepay-details__line {
margin-top: 7px;
@ -63,7 +63,7 @@
display: flex;
justify-content: space-between;
font-size: 14px;
line-height: 30px;
line-height: 26px;
}
.weui-wepay-detail__hd {
text-align: left;

@ -1,5 +1,5 @@
.pagehead {
padding: 10px 0;
padding: 5px 0;
color: white;
background-color: #09bb07;
}
@ -13,8 +13,8 @@
background-color: #23ac38;
}
.pagehead img {
width: 40px;
height: 40px;
width: 30px;
height: 30px;
border: 3px solid white;
border-radius: 50%;
vertical-align: middle;
@ -31,15 +31,15 @@
}
.pright {
font-size: 24px;
font-size: 20px;
position: absolute;
right: 10%;
padding-top: 5px;
padding-top: 2px;
vertical-align: middle;
}
.afterhr {
padding: 5px 0;
/*padding: 5px 0;*/
content: " ";
position: relative;
bottom: 0;
@ -51,7 +51,7 @@
}
.ad {
padding: 15px 0;
/*padding: 5px 0 0 0;*/
text-align: center;
margin: auto;

@ -19,7 +19,7 @@ public class AESTest {
@Test
public void testEncrypt() {
String keyStr = "EPrfsM2JE69ZPR7BhXn34g==";
String source = "123456";
String source = "P8k2rA7N:GcE/{Rn";
Key key = AESCrypt.fromKeyString(Base64.decodeBase64(keyStr));
byte[] encrypted = AESCrypt.encrypt(source.getBytes(StandardCharsets.UTF_8), key);
System.out.println("encrypted: " + Base64.encodeBase64String(encrypted));

Loading…
Cancel
Save