限制人员添加用户
This commit is contained in:
@@ -502,7 +502,7 @@ public class ConvenientInquiryServiceImpl extends ServiceImpl<QuestionnaireMappe
|
||||
account.setCreateDate(new Date());
|
||||
account.setIsBeginner(1);
|
||||
|
||||
log.info("添加用户:{}", accountAddDTO.getUserEmail());
|
||||
log.info("管理员:{},添加用户账号:{}", UserContext.getUserHolder().getUsername(), accountAddDTO.getUserEmail());
|
||||
return accountService.save(account);
|
||||
}
|
||||
|
||||
@@ -515,13 +515,16 @@ public class ConvenientInquiryServiceImpl extends ServiceImpl<QuestionnaireMappe
|
||||
throw new BusinessException("you have to choose a user");
|
||||
}
|
||||
|
||||
String username = UserContext.getUserHolder().getUsername();
|
||||
Account account = new Account();
|
||||
// 修改用户有效期截止日期、用户类型、积分
|
||||
if (!Objects.isNull(validEndTime)) {
|
||||
account.setValidEndTime(validEndTime);
|
||||
log.info("管理员:{},修改用户 {} 信息,将账号到期时间置为:{}", username, accountId, validEndTime);
|
||||
}
|
||||
if (!Objects.isNull(systemUser)) {
|
||||
account.setSystemUser(systemUser);
|
||||
log.info("管理员:{},修改用户 {} 信息,将账号身份置为:{}", username, accountId, systemUser);
|
||||
}
|
||||
/*if (!StringUtils.isNullOrEmpty(systemUser)) {
|
||||
int systemUser = 0;
|
||||
@@ -543,10 +546,10 @@ public class ConvenientInquiryServiceImpl extends ServiceImpl<QuestionnaireMappe
|
||||
}*/
|
||||
if (!Objects.isNull(credits)) {
|
||||
account.setCredits(new BigDecimal(credits));
|
||||
log.info("管理员:{},修改用户 {} 信息,将账号积分置为:{}", username, accountId, credits);
|
||||
}
|
||||
account.setId(accountId);
|
||||
account.setUpdateDate(new Date());
|
||||
log.info("修改用户信息:{}", accountId);
|
||||
return accountMapper.updateById(account) == 1;
|
||||
// accountService.update(account,null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user