|
@@ -83,6 +83,7 @@ public class InfoServiceImpl implements InfoService {
|
|
|
public String sendMail(SendDto dto) {
|
|
|
Integer type = dto.getType();
|
|
|
Long mailboxId = dto.getMailboxId();
|
|
|
+ String urlPrefix;
|
|
|
|
|
|
StringJoiner urlJoiner = new StringJoiner("/");
|
|
|
urlJoiner.add("sendMail");
|
|
@@ -97,6 +98,11 @@ public class InfoServiceImpl implements InfoService {
|
|
|
urlJoiner.add(personalMailbox.getMailUser());
|
|
|
urlJoiner.add(personalMailbox.getMailPassword());
|
|
|
|
|
|
+ if (Objects.equals(personalMailbox.getType(), 2)) {
|
|
|
+ urlPrefix = MailServiceConfig.abroadUrlPrefix;
|
|
|
+ } else {
|
|
|
+ urlPrefix = MailServiceConfig.urlPrefix;
|
|
|
+ }
|
|
|
} else {
|
|
|
|
|
|
EnterpriseMailbox enterpriseMailbox = enterpriseMailboxService.getById(mailboxId);
|
|
@@ -111,9 +117,14 @@ public class InfoServiceImpl implements InfoService {
|
|
|
urlJoiner.add(enterpriseMailbox.getMailUserPrefix() + "@" + enterpriseDomain.getDomainName());
|
|
|
urlJoiner.add(enterpriseMailbox.getMailPassword());
|
|
|
|
|
|
+ if (Objects.equals(enterpriseDomain.getType(), 2)) {
|
|
|
+ urlPrefix = MailServiceConfig.abroadUrlPrefix;
|
|
|
+ } else {
|
|
|
+ urlPrefix = MailServiceConfig.urlPrefix;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- return HttpUtil.post(MailServiceConfig.urlPrefix + urlJoiner, JSON.toJSONString(dto));
|
|
|
+ return HttpUtil.post(urlPrefix + urlJoiner, JSON.toJSONString(dto));
|
|
|
}
|
|
|
|
|
|
private void subordinateDeptId(Long deptId, Set<Long> deptSet, Map<Long, List<SysDept>> parentDeptMap) {
|