头像如果是空字符串的话不拼接时间戳
This commit is contained in:
parent
383ada505f
commit
7b9761de30
@ -1,6 +1,7 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.user;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
@ -22,6 +23,7 @@ import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@ -124,7 +126,7 @@ public class UserController {
|
||||
@PreAuthorize("@ss.hasPermission('system:user:query')")
|
||||
public CommonResult<UserRespVO> getUser(@RequestParam("id") Long id) {
|
||||
AdminUserDO user = userService.getUser(id);
|
||||
user.setAvatar(user.getAvatar() + "?timestamp=" + System.currentTimeMillis());
|
||||
user.setAvatar(StrUtil.isEmpty(user.getAvatar()) ? "" : user.getAvatar() + "?timestamp=" + System.currentTimeMillis());
|
||||
// 拼接数据
|
||||
DeptDO dept = deptService.getDept(user.getDeptId());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user