Merge branch 'dev/dev_xp' into dev/3.1_release_merge

This commit is contained in:
2025-09-22 14:17:05 +08:00
5 changed files with 32 additions and 19 deletions

View File

@@ -1071,25 +1071,31 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
public void upgradeNotification() {
QueryWrapper<Account> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().ne(Account::getSystemUser, 0);
// queryWrapper.lambda().eq(Account::isDeleted, 0).isNotNull(Account::getUserEmail);
List<Account> accountList = accountMapper.selectList(queryWrapper);
System.out.println(accountList);
int i = 0;
int size = accountList.size();
for (Account account : accountList) {
i ++;
try {
if (account.getLanguage().equals(Language.CHINESE_SIMPLIFIED.name())) {
log.info("进度:{} / {} CN - {}", i, size, account.getUserEmail());
SendEmailUtil.sendUpgradeNotification(account, null, 0);
} else {
log.info("进度:{} / {} EN - {}", i, size, account.getUserEmail());
// 英文
SendEmailUtil.sendUpgradeNotification(account, null, 1);
if (account != null && !StringUtil.isNullOrEmpty(account.getUserEmail())){
try {
if (account.getLanguage().equals(Language.CHINESE_SIMPLIFIED.name())) {
log.info("进度:{} / {} CN - {}", i, size, account.getUserEmail());
SendEmailUtil.sendUpgradeNotification(account, null, 0);
} else {
log.info("进度:{} / {} EN - {}", i, size, account.getUserEmail());
// 英文
SendEmailUtil.sendUpgradeNotification(account, null, 1);
}
}catch (Exception e) {
log.error("向 {} 发送邮件失败", account.getUserEmail());
log.error(e.getMessage());
}
}catch (Exception e) {
log.error("向 {} 发送邮件失败", account.getUserEmail());
log.error(e.getMessage());
} else if (account != null){
log.warn("用户id 为 {},邮箱为空", account.getId());
} else {
log.warn("进度:{} / {} account 为空", i, size);
}
}
}

View File

@@ -55,7 +55,7 @@ public class ProductImageServiceImpl implements ProductImageService {
@Async
@Override
public void asyncInitialize(Long brandId, AuthPrincipalVo userHolder) {
System.out.println(">>> [asyncInitialize] 当前线程:" + Thread.currentThread().getName());
log.info(">>> [asyncInitialize] 当前线程:{}", Thread.currentThread().getName());
String progressKey = String.valueOf(brandId);
ProgressDTO progressDTO = redisUtil.getTaskProgressDTO(progressKey);
@@ -77,7 +77,9 @@ public class ProductImageServiceImpl implements ProductImageService {
progressDTO.setTotal(libraryIds.size());
int current = 0;
int size = libraryIds.size();
for (Long libraryId : libraryIds) {
log.info("Brand DNA Compute进度{} / {}", current, size);
Library library = libraryMapper.selectById(libraryId);
if (Objects.isNull(library)){
continue;

View File

@@ -2398,7 +2398,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
}
}
}
if (!CollectionUtils.isEmpty(moduleSaveDTO.getPrintBoard())){
if (Objects.nonNull(moduleSaveDTO.getPrintBoard())){
List<DesignCollectionPrintElementDTO> printBoards = moduleSaveDTO.getPrintBoard();
QueryWrapper<CollectionElement> qw = new QueryWrapper<>();
qw.lambda().eq(CollectionElement::getProjectId, projectId);
@@ -2455,7 +2455,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
collectionElementMapper.deleteBatchIds(old);
}
}
if (!CollectionUtils.isEmpty(moduleSaveDTO.getColorBoard())){
if (Objects.nonNull(moduleSaveDTO.getColorBoard())){
List<CollectionColorDTO> colorBoards = moduleSaveDTO.getColorBoard();
QueryWrapper<CollectionElement> qw = new QueryWrapper<>();
qw.lambda().eq(CollectionElement::getProjectId, projectId);
@@ -2489,7 +2489,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
collectionElementMapper.deleteBatchIds(old);
}
}
if (!CollectionUtils.isEmpty(moduleSaveDTO.getSketchBoard())){
if (Objects.nonNull(moduleSaveDTO.getSketchBoard())){
boundingBox = true;
QueryWrapper<CollectionElement> qw = new QueryWrapper<>();
qw.lambda().eq(CollectionElement::getProjectId, projectId);