|
|
|
@ -27,6 +27,7 @@ import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
|
|
|
|
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;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.tools.env.SysConfigManager;
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
|
|
|
|
import au.com.royalpay.payment.tools.http.HttpUtils;
|
|
|
|
import au.com.royalpay.payment.tools.http.HttpUtils;
|
|
|
|
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
|
|
|
|
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
|
|
|
|
@ -121,6 +122,8 @@ public class TestController implements ApplicationEventPublisherAware {
|
|
|
|
private HfUpdateService hfUpdateService;
|
|
|
|
private HfUpdateService hfUpdateService;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private ClientManager clientManager;
|
|
|
|
private ClientManager clientManager;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private SysConfigManager sysConfigManager;
|
|
|
|
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})
|
|
|
|
@ -434,13 +437,18 @@ public class TestController implements ApplicationEventPublisherAware {
|
|
|
|
|
|
|
|
|
|
|
|
@ManagerMapping(value = "/partner/reset_password", method = RequestMethod.GET, role = ManagerRole.DEVELOPER)
|
|
|
|
@ManagerMapping(value = "/partner/reset_password", method = RequestMethod.GET, role = ManagerRole.DEVELOPER)
|
|
|
|
public void resetPartnerPassword() {
|
|
|
|
public void resetPartnerPassword() {
|
|
|
|
final List<String> emails = new ArrayList<>();
|
|
|
|
//抄送人邮箱
|
|
|
|
List<String> emailList = Arrays.asList(EMAIL.split(","));
|
|
|
|
JSONObject sysConfig = sysConfigManager.getSysConfig();
|
|
|
|
emailList.stream().forEach(email -> {
|
|
|
|
String ccMail = sysConfig.getString("reset_password.cc_list");
|
|
|
|
if (!emails.contains(email)) {
|
|
|
|
//账号白名单
|
|
|
|
emails.add(email);
|
|
|
|
String accountWhiteList = sysConfig.getString("reset_password.account_white_list");
|
|
|
|
}
|
|
|
|
if (StringUtils.isEmpty(ccMail)) {
|
|
|
|
});
|
|
|
|
throw new BadRequestException("抄送人不能为空");
|
|
|
|
clientManager.updateAllPartnerPassword("PINE", emails);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (accountWhiteList == null) {
|
|
|
|
|
|
|
|
accountWhiteList = "";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
List<String> emailList = Arrays.asList(ccMail.split(","));
|
|
|
|
|
|
|
|
clientManager.updateAllPartnerPassword("PINE", emailList, accountWhiteList);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|