master
eason.qian 7 years ago
parent 23258a78bb
commit b801aba02d

@ -276,6 +276,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private static final String CLIENT_AGREE_FILE = "client_agree_file";
private static final String CLIENT_COMPANY_FILE = "client_company_file";
private static final String CLIENT_APPLY_FILE = "client_apply_file";
private static final List<String> tags = new ArrayList<>();
@Value("${app.agreetemplate.classic.path}")
private String agreetemplatePdfPath;
@ -818,6 +819,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Override
public void run() {
try {
tags.add("account");
SendMail sendMail = new SendMail();
Set<String> to = new HashSet<>();
to.add(mailTo);
@ -826,6 +828,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
sendMail.setMailCcs(emails);
sendMail.setTitle("Your RoyalPay Cross-border Payment has been set up");
sendMail.setContent(content);
sendMail.setTags(tags);
JSONObject mailResult = mailGunService.sendMail(sendMail);
clientModifySupport.processClientModify(new EmailModify(account, client.getString("client_moniker"), 3, mailResult.getString("mail_id")));
} catch (Exception e) {
@ -880,6 +883,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
sendMail.setMailCcs(emails);
sendMail.setTitle("Your Partner Account Has Been Authenticated Successfully");
sendMail.setContent(content);
sendMail.setTags(tags);
JSONObject mailResult = mailGunService.sendMail(sendMail);
clientModifySupport.processClientModify(new EmailModify(account, client.getString("client_moniker"), 3, mailResult.getString("mail_id")));
} catch (Exception e) {
@ -1621,8 +1625,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Override
public String getQrCodeBoard(JSONObject client, QRCodeConfig config,JSONObject account,String plantform) {
// JSONObject org = orgMapper.findOne(client.getIntValue("org_id"));
// return merchantInfoProvider.getQrCodeBoard(client, config);
return merchantInfoProvider.getQrCodeBoard(client, config,account,plantform);
return merchantInfoProvider.getQrCodeBoard(client, config);
// return merchantInfoProvider.getQrCodeBoard(client, config,account,plantform);
}
@Override
@ -1646,8 +1650,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
qrboardConfig.put("brandw", "600");
qrboardConfig.put("brandh", "200");
String type = qrboardConfig.getString("type");
QRBoard board = QRBoardProvider.getQRBoard(type, qrboardConfig, client, config,mongoTemplate,manager,plantform);
// QRBoard board = QRBoardProvider.getQRBoard(type, qrboardConfig, client, config);
// QRBoard board = QRBoardProvider.getQRBoard(type, qrboardConfig, client, config,mongoTemplate,manager,plantform);
QRBoard board = QRBoardProvider.getQRBoard(type, qrboardConfig, client, config);
board.drawBoardImage(ous);
} catch (Exception e) {
throw new ServerErrorException("QR board config not set for current organize", e);
@ -1667,8 +1671,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
JSONObject qrboardConfig = JSON.parseObject(qrBoardConfigString);
String type = qrboardConfig.getString("type");
QRBoard board = QRBoardProvider.getQRBoard(type, qrboardConfig, client, config,mongoTemplate,manager,plantform);
// QRBoard board = QRBoardProvider.getQRBoard(type, qrboardConfig, client, config);
// QRBoard board = QRBoardProvider.getQRBoard(type, qrboardConfig, client, config,mongoTemplate,manager,plantform);
QRBoard board = QRBoardProvider.getQRBoard(type, qrboardConfig, client, config);
board.drawBoardImage(ous);
} catch (Exception e) {
throw new ServerErrorException("QR board config not set for current organize", e);

@ -76,7 +76,7 @@ public class ManualSettleSupportImpl implements ManualSettleSupport {
@Override
public JSONObject findCurrentSettle(int clientId, boolean includingUnsettleData) {
JSONObject client = merchantInfoProvider.getClientInfoWithConfig(clientId);
JSONObject client = merchantInfoProvider.getClientInfo(clientId);
if (!client.getBooleanValue("manual_settle")) {
throw new ForbiddenException("Manual Settlement Not Enabled");
}

@ -75,7 +75,7 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
@Resource
private ClientConfigService clientConfigService;
private ApplicationEventPublisher publisher;
private static final List<String> tags = new ArrayList<>();
@Override
@Cacheable(value = ":login:managers:", key = "''+#accountId")
public JSONObject getManager(String accountId) {
@ -285,6 +285,7 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
@Override
public String ForgetPassword(String client_moniker) throws Exception {
tags.add("account");
JSONObject client = clientMapper.findClientByMoniker(client_moniker);
if (client != null) {
final String contact_email = client.getString("contact_email");
@ -316,6 +317,7 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
sendMail.setFrom("postmaster@mail.royalpay.com.au");
sendMail.setTitle("Reset Password");
sendMail.setContent(content);
sendMail.setTags(tags);
mailService.sendMail(sendMail);
return contact_email;

@ -45,6 +45,9 @@ public class MailGunServiceImpl implements MailGunService {
@Resource
private AttachmentClient attachmentClient;
private static final List<String> tags = new ArrayList<>();
@Override
public void dealNotify(String nofityString) throws Exception {
String dd = URLDecoder.decode(nofityString, "UTF-8");
@ -120,6 +123,7 @@ public class MailGunServiceImpl implements MailGunService {
@Override
public JSONObject sendEmail(String notice_id, String title, Set<String> mailTo, String content) throws URISyntaxException, IOException {
tags.add("notice");
Document doc = Jsoup.parse(content);
Elements links = doc.select("a[href]");
List<JSONObject> files = new ArrayList<>();
@ -146,7 +150,7 @@ public class MailGunServiceImpl implements MailGunService {
sendMail.setNotice_id(notice_id);
sendMail.setMailTos(mailTo);
sendMail.setAttachFiles(files);
sendMail.setTags(tags);
return mailGunClient.sendMail(sendMail);
}

@ -26,8 +26,7 @@ public class PartnerInitEmailChecker {
public void checkPartnerInitEmail() {
if (PlatformEnvironment.getEnv().taskEnabled()) {
synchronizedScheduler.executeProcess("manage_task:checkPartnerInitEmail", 120_000,
() -> clientManager.checkEmailStatus());
// clientManager.newCheckEmailStatus();
() -> clientManager.newCheckEmailStatus());
}
}
}

@ -1,6 +1,6 @@
server.port=5000
spring.profiles.active=local,alipay,bestpay,jd,wechat
spring.profiles.active=dev,alipay,bestpay,jd,wechat
env.company=RoyalPay

Loading…
Cancel
Save