【8.3.3】修复一个可能获取到用户为空的问题

dev-8.3.3
stylefeng 2024-12-05 16:05:35 +08:00
parent 0cebda370a
commit d75d717736
1 changed files with 3 additions and 1 deletions

View File

@ -50,6 +50,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -64,6 +65,7 @@ import java.util.stream.Collectors;
* @date 2023/06/10 21:26
*/
@Service
@Slf4j
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements SysUserService {
@Resource
@ -810,7 +812,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
try {
fileAuthUrl = fileInfoApi.getFileAuthUrl(avatar);
} catch (Exception e) {
continue;
log.warn("获取不到对应用户的头像头像id为{}", avatar);
}
simpleUserDTO.setAvatarUrl(fileAuthUrl);
simpleUserDTOS.add(simpleUserDTO);