mirror of https://gitee.com/stylefeng/roses
【8.3.3】修复一个可能获取到用户为空的问题
parent
0cebda370a
commit
d75d717736
|
@ -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.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.cache.annotation.Cacheable;
|
import org.springframework.cache.annotation.Cacheable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
@ -64,6 +65,7 @@ import java.util.stream.Collectors;
|
||||||
* @date 2023/06/10 21:26
|
* @date 2023/06/10 21:26
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements SysUserService {
|
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements SysUserService {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
|
@ -810,7 +812,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||||
try {
|
try {
|
||||||
fileAuthUrl = fileInfoApi.getFileAuthUrl(avatar);
|
fileAuthUrl = fileInfoApi.getFileAuthUrl(avatar);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
continue;
|
log.warn("获取不到对应用户的头像,头像id为:{}", avatar);
|
||||||
}
|
}
|
||||||
simpleUserDTO.setAvatarUrl(fileAuthUrl);
|
simpleUserDTO.setAvatarUrl(fileAuthUrl);
|
||||||
simpleUserDTOS.add(simpleUserDTO);
|
simpleUserDTOS.add(simpleUserDTO);
|
||||||
|
|
Loading…
Reference in New Issue