|
|
@ -24,6 +24,8 @@ import au.com.royalpay.payment.manage.mappers.system.ClientBankAccountMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
|
|
|
|
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
|
|
|
|
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
|
|
|
|
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
|
|
|
|
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.system.core.TradeSecureService;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.system.core.beans.TradeSecureFile;
|
|
|
|
import au.com.royalpay.payment.manage.tradelog.core.TradeLogService;
|
|
|
|
import au.com.royalpay.payment.manage.tradelog.core.TradeLogService;
|
|
|
|
import au.com.royalpay.payment.tools.CommonConsts;
|
|
|
|
import au.com.royalpay.payment.tools.CommonConsts;
|
|
|
|
import au.com.royalpay.payment.tools.defines.TradeType;
|
|
|
|
import au.com.royalpay.payment.tools.defines.TradeType;
|
|
|
@ -41,6 +43,7 @@ import com.alibaba.fastjson.serializer.SerializerFeature;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.apache.commons.lang3.time.DateFormatUtils;
|
|
|
|
import org.apache.commons.lang3.time.DateFormatUtils;
|
|
|
|
import org.dom4j.Element;
|
|
|
|
import org.dom4j.Element;
|
|
|
|
|
|
|
|
import org.joda.time.DateTime;
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
@ -124,6 +127,8 @@ public class TestController implements ApplicationEventPublisherAware {
|
|
|
|
private ClientManager clientManager;
|
|
|
|
private ClientManager clientManager;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private SysConfigManager sysConfigManager;
|
|
|
|
private SysConfigManager sysConfigManager;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private TradeSecureService tradeSecureService;
|
|
|
|
private final static String EMAIL = "lily.tao@royalpay.com.au,bella.sun@royalpay.com.au,astro.dai@royalpay.com.au,taylor.dang@royalpay.com.au";
|
|
|
|
private final static String EMAIL = "lily.tao@royalpay.com.au,bella.sun@royalpay.com.au,astro.dai@royalpay.com.au,taylor.dang@royalpay.com.au";
|
|
|
|
|
|
|
|
|
|
|
|
@ManagerMapping(value = "/{clientMoniker}/export/agreepdf", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.DIRECTOR, ManagerRole.OPERATOR})
|
|
|
|
@ManagerMapping(value = "/{clientMoniker}/export/agreepdf", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.DIRECTOR, ManagerRole.OPERATOR})
|
|
|
@ -174,7 +179,7 @@ public class TestController implements ApplicationEventPublisherAware {
|
|
|
|
sos.close();
|
|
|
|
sos.close();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/{clientMoniker}/export/aggregate/agreepdf")
|
|
|
|
@ManagerMapping(value = "/{clientMoniker}/export/aggregate/agreepdf", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.DIRECTOR, ManagerRole.OPERATOR})
|
|
|
|
public void exportAggregateAgreeFile(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, HttpServletResponse httpResponse) throws Exception {
|
|
|
|
public void exportAggregateAgreeFile(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, HttpServletResponse httpResponse) throws Exception {
|
|
|
|
httpResponse.setContentType("application/pdf");
|
|
|
|
httpResponse.setContentType("application/pdf");
|
|
|
|
httpResponse.setHeader("content-disposition", "attachment;filename=" + clientMoniker + "_AGREEMENT_" + new Date() + ".pdf");
|
|
|
|
httpResponse.setHeader("content-disposition", "attachment;filename=" + clientMoniker + "_AGREEMENT_" + new Date() + ".pdf");
|
|
|
@ -451,4 +456,11 @@ public class TestController implements ApplicationEventPublisherAware {
|
|
|
|
List<String> emailList = Arrays.asList(ccMail.split(","));
|
|
|
|
List<String> emailList = Arrays.asList(ccMail.split(","));
|
|
|
|
clientManager.updateAllPartnerPassword("PINE", emailList, accountWhiteList);
|
|
|
|
clientManager.updateAllPartnerPassword("PINE", emailList, accountWhiteList);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@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);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|