解决冲突

This commit is contained in:
pengjie 2024-03-26 11:42:58 +08:00
parent 4a74e71a52
commit df00ae4958
2 changed files with 6 additions and 8 deletions

View File

@ -12,10 +12,9 @@ import com.zhgd.xmgl.modules.basicdata.mapper.SystemUserMapper;
import com.zhgd.xmgl.modules.xz.entity.XzRegistry;
import com.zhgd.xmgl.modules.xz.mapper.XzRegistryMapper;
import com.zhgd.xmgl.modules.xz.service.IXzRegistryService;
import com.zhgd.xmgl.util.EmailUtil;
import com.zhgd.xmgl.util.EmailUtils;
import com.zhgd.xmgl.util.PageUtil;
import com.zhgd.xmgl.util.RefUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -38,7 +37,7 @@ public class XzRegistryServiceImpl extends ServiceImpl<XzRegistryMapper, XzRegis
@Autowired
SystemUserMapper systemUserMapper;
@Autowired
EmailUtil emailUtil;
EmailUtils emailUtils;
@Override
public IPage<XzRegistry> queryPageList(HashMap<String, Object> paramMap) {
@ -104,9 +103,9 @@ public class XzRegistryServiceImpl extends ServiceImpl<XzRegistryMapper, XzRegis
Integer approvalProcess = xzRegistry.getApprovalProcess();
//2审批通过3拒绝申请
if (Objects.equals(approvalProcess, 2)) {
emailUtil.sendSimpleMail(email, xzRegistry.getAccount() + "账号审批通过", "您在平台申请的账号已经审核通过,账号:" + xzRegistry.getAccount() + "密码:" + xzRegistry.getPw());
emailUtils.sendSimpleMail(email, xzRegistry.getAccount() + "账号审批通过", "您在平台申请的账号已经审核通过,账号:" + xzRegistry.getAccount() + "密码:" + xzRegistry.getPw());
} else if (Objects.equals(approvalProcess, 3)) {
emailUtil.sendSimpleMail(email, xzRegistry.getAccount() + "账号拒绝申请", "您在平台申请的账号拒绝申请,账号:" + xzRegistry.getAccount());
emailUtils.sendSimpleMail(email, xzRegistry.getAccount() + "账号拒绝申请", "您在平台申请的账号拒绝申请,账号:" + xzRegistry.getAccount());
}
baseMapper.updateById(xzRegistry);

View File

@ -8,7 +8,6 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.FileSystemResource;
import org.springframework.mail.SimpleMailMessage;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.mail.javamail.JavaMailSenderImpl;
import org.springframework.mail.javamail.MimeMessageHelper;
import org.springframework.stereotype.Service;
@ -24,7 +23,7 @@ import java.io.File;
*/
@Service
public class EmailUtil implements EmailService {
public class EmailUtils implements EmailService {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
//Spring Boot 提供了一个发送邮件的简单抽象使用的是下面这个接口这里直接注入即可使用
@ -121,7 +120,7 @@ public class EmailUtil implements EmailService {
}
public static void main(String[] args) {
EmailUtil mailService = new EmailUtil();
EmailUtils mailService = new EmailUtils();
mailService.sendSimpleMail("xxx@qq.com", "主题:你好普通邮件", "内容:第一封邮件");
mailService.sendHtmlMail("xxx@qq.com", "主题你好html邮件", "<h1>内容第一封html邮件</h1>");
}