update 优化 用户头像 改为存储 ossId 使用转换模块转为 url 展示
| | |
| | | public String translation(Object key, String other) { |
| | | if (key instanceof String ids) { |
| | | return ossService.selectUrlByIds(ids); |
| | | } else if (key instanceof Long id) { |
| | | return ossService.selectUrlByIds(id.toString()); |
| | | } |
| | | return null; |
| | | } |
| | |
| | | /** |
| | | * 用户头像 |
| | | */ |
| | | private String avatar; |
| | | private Long avatar; |
| | | |
| | | /** |
| | | * 密码 |
| | |
| | | /** |
| | | * 头像地址 |
| | | */ |
| | | private String avatar; |
| | | private Long avatar; |
| | | |
| | | /** |
| | | * 密码 |
| | |
| | | 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; |
| | |
| | | /** |
| | | * 头像地址 |
| | | */ |
| | | private String avatar; |
| | | @Translation(type = TransConstant.OSS_ID_TO_URL) |
| | | private Long avatar; |
| | | |
| | | /** |
| | | * 密码 |
| | |
| | | * @param avatar 头像地址 |
| | | * @return 结果 |
| | | */ |
| | | boolean updateUserAvatar(String userName, String avatar); |
| | | boolean updateUserAvatar(String userName, Long avatar); |
| | | |
| | | /** |
| | | * 重置用户密码 |
| | |
| | | email varchar2(50) default '', |
| | | phonenumber varchar2(11) default '', |
| | | sex char(1) default '0', |
| | | avatar varchar2(100) default '', |
| | | avatar number(20) default null, |
| | | password varchar2(100) default '', |
| | | status char(1) default '0', |
| | | del_flag char(1) default '0', |
| | |
| | | -- ---------------------------- |
| | | -- 初始化-用户信息表数据 |
| | | -- ---------------------------- |
| | | insert into sys_user values(1, 103, 'admin', '疯狂的狮子Li', 'sys_user', 'crazyLionLi@163.com', '15888888888', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate, 103, 1, sysdate, null, null, '管理员'); |
| | | insert into sys_user values(2, 105, 'lionli', '疯狂的狮子Li', 'sys_user', 'crazyLionLi@qq.com', '15666666666', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate, 103, 1, sysdate, null, null, '测试员'); |
| | | insert into sys_user values(1, 103, 'admin', '疯狂的狮子Li', 'sys_user', 'crazyLionLi@163.com', '15888888888', '1', null, '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate, 103, 1, sysdate, null, null, '管理员'); |
| | | insert into sys_user values(2, 105, 'lionli', '疯狂的狮子Li', 'sys_user', 'crazyLionLi@qq.com', '15666666666', '1', null, '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate, 103, 1, sysdate, null, null, '测试员'); |
| | | |
| | | |
| | | -- ---------------------------- |
| | |
| | | email varchar(50) default ''::varchar, |
| | | phonenumber varchar(11) default ''::varchar, |
| | | sex char default '0'::bpchar, |
| | | avatar varchar(100) default ''::varchar, |
| | | avatar int8, |
| | | password varchar(100) default ''::varchar, |
| | | status char default '0'::bpchar, |
| | | del_flag char default '0'::bpchar, |
| | |
| | | |
| | | -- 初始化-用户信息表数据 |
| | | -- ---------------------------- |
| | | insert into sys_user values(1, 103, 'admin', '疯狂的狮子Li', 'sys_user', 'crazyLionLi@163.com', '15888888888', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', now(), 103, 1, now(), null, null, '管理员'); |
| | | insert into sys_user values(2, 105, 'ry', '疯狂的狮子Li', 'sys_user', 'crazyLionLi@qq.com', '15666666666', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', now(), 103, 1, now(), null, null, '测试员'); |
| | | insert into sys_user values(1, 103, 'admin', '疯狂的狮子Li', 'sys_user', 'crazyLionLi@163.com', '15888888888', '1', null, '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', now(), 103, 1, now(), null, null, '管理员'); |
| | | insert into sys_user values(2, 105, 'ry', '疯狂的狮子Li', 'sys_user', 'crazyLionLi@qq.com', '15666666666', '1', null, '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', now(), 103, 1, now(), null, null, '测试员'); |
| | | |
| | | |
| | | -- ---------------------------- |
| | |
| | | email varchar(50) default '' comment '用户邮箱', |
| | | phonenumber varchar(11) default '' comment '手机号码', |
| | | sex char(1) default '0' comment '用户性别(0男 1女 2未知)', |
| | | avatar varchar(100) default '' comment '头像地址', |
| | | avatar bigint(20) comment '头像地址', |
| | | password varchar(100) default '' comment '密码', |
| | | status char(1) default '0' comment '帐号状态(0正常 1停用)', |
| | | del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)', |
| | |
| | | -- ---------------------------- |
| | | -- 初始化-用户信息表数据 |
| | | -- ---------------------------- |
| | | insert into sys_user values(1, 103, 'admin', '疯狂的狮子Li', 'sys_user', 'crazyLionLi@163.com', '15888888888', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), 103, 1, sysdate(), null, null, '管理员'); |
| | | insert into sys_user values(2, 105, 'lionli', '疯狂的狮子Li', 'sys_user', 'crazyLionLi@qq.com', '15666666666', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), 103, 1, sysdate(), null, null, '测试员'); |
| | | insert into sys_user values(1, 103, 'admin', '疯狂的狮子Li', 'sys_user', 'crazyLionLi@163.com', '15888888888', '1', null, '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), 103, 1, sysdate(), null, null, '管理员'); |
| | | insert into sys_user values(2, 105, 'lionli', '疯狂的狮子Li', 'sys_user', 'crazyLionLi@qq.com', '15666666666', '1', null, '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), 103, 1, sysdate(), null, null, '测试员'); |
| | | |
| | | |
| | | -- ---------------------------- |
| | |
| | | [email] nvarchar(50) DEFAULT '' NULL, |
| | | [phonenumber] nvarchar(11) DEFAULT '' NULL, |
| | | [sex] nchar(1) DEFAULT ('0') NULL, |
| | | [avatar] nvarchar(100) DEFAULT '' NULL, |
| | | [avatar] bigint NULL, |
| | | [password] nvarchar(100) DEFAULT '' NULL, |
| | | [status] nchar(1) DEFAULT ('0') NULL, |
| | | [del_flag] nchar(1) DEFAULT ('0') NULL, |
| | |
| | | 'TABLE', N'sys_user' |
| | | GO |
| | | |
| | | INSERT [sys_user] ([user_id], [dept_id], [user_name], [nick_name], [user_type], [email], [phonenumber], [sex], [avatar], [password], [status], [del_flag], [login_ip], [login_date], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1, 103, N'admin', N'疯狂的狮子Li', N'sys_user', N'crazyLionLi@163.com', N'15888888888', N'1', N'', N'$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', N'0', N'0', N'127.0.0.1', getdate(), 103, 1, getdate(), NULL, getdate(), N'管理员') |
| | | INSERT [sys_user] ([user_id], [dept_id], [user_name], [nick_name], [user_type], [email], [phonenumber], [sex], [avatar], [password], [status], [del_flag], [login_ip], [login_date], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1, 103, N'admin', N'疯狂的狮子Li', N'sys_user', N'crazyLionLi@163.com', N'15888888888', N'1', NULL, N'$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', N'0', N'0', N'127.0.0.1', getdate(), 103, 1, getdate(), NULL, getdate(), N'管理员') |
| | | GO |
| | | INSERT [sys_user] ([user_id], [dept_id], [user_name], [nick_name], [user_type], [email], [phonenumber], [sex], [avatar], [password], [status], [del_flag], [login_ip], [login_date], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (2, 105, N'ry', N'疯狂的狮子Li', N'sys_user', N'crazyLionLi@qq.com', N'15666666666', N'1', N'', N'$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', N'0', N'0', N'127.0.0.1', getdate(), 103, 1, getdate(), 1, getdate(), N'测试员') |
| | | INSERT [sys_user] ([user_id], [dept_id], [user_name], [nick_name], [user_type], [email], [phonenumber], [sex], [avatar], [password], [status], [del_flag], [login_ip], [login_date], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (2, 105, N'ry', N'疯狂的狮子Li', N'sys_user', N'crazyLionLi@qq.com', N'15666666666', N'1', NULL, N'$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', N'0', N'0', N'127.0.0.1', getdate(), 103, 1, getdate(), 1, getdate(), N'测试员') |
| | | GO |
| | | |
| | | CREATE TABLE [sys_user_post] |