update 优化 用户头像 改为存储 ossId 使用转换模块转为 url 展示

This commit is contained in:
疯狂的狮子li
2023-02-05 12:15:43 +08:00
parent 08565363a9
commit 07590f30f6
9 changed files with 21 additions and 16 deletions

View File

@ -65,7 +65,7 @@ public class SysUser extends BaseEntity {
/**
* 用户头像
*/
private String avatar;
private Long avatar;
/**
* 密码

View File

@ -78,7 +78,7 @@ public class SysUserBo extends BaseEntity {
/**
* 头像地址
*/
private String avatar;
private Long avatar;
/**
* 密码

View File

@ -1,6 +1,8 @@
package com.ruoyi.system.domain.vo;
import com.ruoyi.common.core.constant.UserConstants;
import com.ruoyi.common.translation.annotation.Translation;
import com.ruoyi.common.translation.constant.TransConstant;
import lombok.Data;
import java.io.Serial;
@ -64,7 +66,8 @@ public class SysUserVo implements Serializable {
/**
* 头像地址
*/
private String avatar;
@Translation(type = TransConstant.OSS_ID_TO_URL)
private Long avatar;
/**
* 密码

View File

@ -174,7 +174,7 @@ public interface ISysUserService {
* @param avatar 头像地址
* @return 结果
*/
boolean updateUserAvatar(String userName, String avatar);
boolean updateUserAvatar(String userName, Long avatar);
/**
* 重置用户密码