|
@@ -49,12 +49,11 @@ public class EmailConfigServiceImpl implements EmailConfigService {
|
|
MailboxInfoDO mailboxInfoDO = toMailboxInfoDO(mailboxInfoVO);
|
|
MailboxInfoDO mailboxInfoDO = toMailboxInfoDO(mailboxInfoVO);
|
|
if(mailboxInfoVO.getId() == null){
|
|
if(mailboxInfoVO.getId() == null){
|
|
mailboxInfoDO.setCreateTime(new Date());
|
|
mailboxInfoDO.setCreateTime(new Date());
|
|
|
|
+ mailboxInfoDO.setCron(EmailCron.getEmailCronByText(mailboxInfoVO.getCron()).getCron());
|
|
emailConfigMapper.insert(mailboxInfoDO);
|
|
emailConfigMapper.insert(mailboxInfoDO);
|
|
}else{
|
|
}else{
|
|
emailConfigMapper.updateById(mailboxInfoDO);
|
|
emailConfigMapper.updateById(mailboxInfoDO);
|
|
}
|
|
}
|
|
- //添加定时任务
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -64,6 +63,7 @@ public class EmailConfigServiceImpl implements EmailConfigService {
|
|
mailboxInfoDTO.setPassword(mailboxInfoVO.getPassword());
|
|
mailboxInfoDTO.setPassword(mailboxInfoVO.getPassword());
|
|
mailboxInfoDTO.setPort(mailboxInfoVO.getPort());
|
|
mailboxInfoDTO.setPort(mailboxInfoVO.getPort());
|
|
mailboxInfoDTO.setHost(mailboxInfoVO.getServer());
|
|
mailboxInfoDTO.setHost(mailboxInfoVO.getServer());
|
|
|
|
+ mailboxInfoDTO.setProtocol(mailboxInfoVO.getProtocol());
|
|
Store store = EmailUtil.getStoreNew(mailboxInfoDTO);
|
|
Store store = EmailUtil.getStoreNew(mailboxInfoDTO);
|
|
if(store != null){
|
|
if(store != null){
|
|
try {
|
|
try {
|
|
@@ -103,6 +103,7 @@ public class EmailConfigServiceImpl implements EmailConfigService {
|
|
mailboxInfoDO.setPassword(mailboxInfoVO.getPassword());
|
|
mailboxInfoDO.setPassword(mailboxInfoVO.getPassword());
|
|
mailboxInfoDO.setType(mailboxInfoVO.getType());
|
|
mailboxInfoDO.setType(mailboxInfoVO.getType());
|
|
mailboxInfoDO.setProtocol(mailboxInfoVO.getProtocol());
|
|
mailboxInfoDO.setProtocol(mailboxInfoVO.getProtocol());
|
|
|
|
+ mailboxInfoDO.setOpenStatus(mailboxInfoVO.getOpenStatus());
|
|
mailboxInfoDO.setUpdateTime(new Date());
|
|
mailboxInfoDO.setUpdateTime(new Date());
|
|
mailboxInfoDO.setUpdaterId(999);
|
|
mailboxInfoDO.setUpdaterId(999);
|
|
mailboxInfoDO.setCreatorId(999);
|
|
mailboxInfoDO.setCreatorId(999);
|