Merge branch 'release/3.0' into dev/dev

# Conflicts:
#	src/main/java/com/ai/da/controller/ConvenientInquiryController.java
#	src/main/java/com/ai/da/model/dto/DesignCollectionDTO.java
#	src/main/java/com/ai/da/service/impl/DesignServiceImpl.java
This commit is contained in:
2025-01-08 10:33:49 +08:00
5 changed files with 42 additions and 8 deletions

View File

@@ -835,6 +835,7 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
throw new BusinessException("Machine not registered or machine identification has changed, login free has failed, please contact us at help@aida.com.hk.");
}
Account account = accountList.get(0);
validateUserValidaExpire(account);
AccountLoginVO response = CopyUtil.copyObject(account, AccountLoginVO.class);
String token = LocalCacheUtils.getTokenCache(String.valueOf(account.getId()));
if (StringUtils.isNotBlank(token)) {

View File

@@ -57,12 +57,12 @@ public class CollectionServiceImpl extends ServiceImpl<CollectionMapper, Collect
@Transactional(rollbackFor = Exception.class)
@Override
public Long saveCollection(Long accountId, String timeZone, String moodTemplateId, String moodboardPostion) {
public Long saveCollection(Long accountId, String timeZone, String moodTemplateId, String moodboardPosition) {
Collection collection = new Collection();
collection.setAccountId(accountId);
collection.setCreateDate(DateUtil.getByTimeZone(timeZone));
collection.setMoodTemplateId(moodTemplateId);
collection.setMoodboardPosition(moodboardPostion);
collection.setMoodboardPosition(moodboardPosition);
if (collectionMapper.insert(collection) <= 0) {
throw new BusinessException("save.collection.failed");
}

View File

@@ -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);
}