BUGFIX:1.微信注册后绑定邮箱失败;2.按类别查项目历史记录

This commit is contained in:
2025-09-23 14:48:44 +08:00
parent 79e19a029b
commit 24fe265172
4 changed files with 11 additions and 7 deletions

View File

@@ -9,6 +9,8 @@ import javax.validation.constraints.NotBlank;
@Data @Data
@ApiModel("邮箱发送") @ApiModel("邮箱发送")
public class EmailSendDTO { public class EmailSendDTO {
@ApiModelProperty("用户id")
private Long userId;
@NotBlank(message = "email.cannot.be.empty") @NotBlank(message = "email.cannot.be.empty")
@ApiModelProperty("邮箱") @ApiModelProperty("邮箱")

View File

@@ -37,7 +37,7 @@ public class ProjectQueryDTO extends PageQueryBaseVo {
@ApiModelProperty("1交集2并集") @ApiModelProperty("1交集2并集")
private Integer intersection; private Integer intersection;
private String process; private List<String> process;
private Integer asc; private Integer asc;
} }

View File

@@ -520,19 +520,21 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
Account account = accounts.get(0); Account account = accounts.get(0);
QueryWrapper<AccountExtend> accountExtendQW = new QueryWrapper<>(); QueryWrapper<AccountExtend> accountExtendQW = new QueryWrapper<>();
accountExtendQW.lambda().eq(AccountExtend::getAccountId, account.getId()); accountExtendQW.lambda().eq(AccountExtend::getAccountId, account.getId());
accountExtendQW.lambda().eq(AccountExtend::getAuth, "WeChat"); accountExtendQW.lambda().eq(AccountExtend::getAuthType, "WeChat");
List<AccountExtend> accountExtends = accountExtendMapper.selectList(accountExtendQW); List<AccountExtend> accountExtends = accountExtendMapper.selectList(accountExtendQW);
if (CollectionUtil.isNotEmpty(accountExtends)) { if (CollectionUtil.isNotEmpty(accountExtends)) {
throw new BusinessException("This email account has already been linked to another WeChat account."); throw new BusinessException("This email account has already been linked to another WeChat account.");
} else {
throw new BusinessException("This email address is already in use. Please try a different email address.");
} }
} }
result = SendEmailUtil.send(emailSendDTO.getEmail(), null, result = SendEmailUtil.send(emailSendDTO.getEmail(), null,
SendEmailUtil.BIND_MAILBOX_TEMPLATE_ID, randomVerifyCode); SendEmailUtil.BIND_MAILBOX_TEMPLATE_ID, randomVerifyCode);
if (!StringUtil.isNullOrEmpty(emailSendDTO.getCountry()) || !StringUtil.isNullOrEmpty(emailSendDTO.getOccupation()) if (Objects.nonNull(emailSendDTO.getUserId()) &&
|| StringUtils.isEmpty(emailSendDTO.getSurname()) || StringUtils.isNotEmpty(emailSendDTO.getTitle())){ (!StringUtil.isNullOrEmpty(emailSendDTO.getCountry()) || !StringUtil.isNullOrEmpty(emailSendDTO.getOccupation())
Long accountId = UserContext.getUserHolder().getId(); || StringUtils.isEmpty(emailSendDTO.getSurname()) || StringUtils.isNotEmpty(emailSendDTO.getTitle()))){
Account account = baseMapper.selectById(accountId); Account account = baseMapper.selectById(emailSendDTO.getUserId());
account.setCountry(emailSendDTO.getCountry()); account.setCountry(emailSendDTO.getCountry());
account.setOccupation(emailSendDTO.getOccupation()); account.setOccupation(emailSendDTO.getOccupation());
account.setTitle(emailSendDTO.getTitle()); account.setTitle(emailSendDTO.getTitle());

View File

@@ -1727,7 +1727,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
queryWrapper.le("update_time", new Date(query.getEndDate())); queryWrapper.le("update_time", new Date(query.getEndDate()));
} }
if (!StringUtils.isEmpty(query.getProcess())) { if (!StringUtils.isEmpty(query.getProcess())) {
queryWrapper.eq("process", query.getProcess()); queryWrapper.in("process", query.getProcess());
} }
// 新增分类过滤 // 新增分类过滤
if (CollectionUtil.isNotEmpty(query.getClassificationIdList())) { if (CollectionUtil.isNotEmpty(query.getClassificationIdList())) {