Merge branch 'master' of https://gitee.com/zhijiantianya/ruoyi-vue-pro into feature/1.8.0-uniapp

 Conflicts:
	yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/auth/MemberAuthServiceImpl.java
This commit is contained in:
YunaiV
2022-07-04 19:56:54 +08:00
211 changed files with 2279 additions and 2310 deletions

View File

@ -1,5 +1,6 @@
package cn.iocoder.yudao.module.system.api.dept;
import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
import java.util.Collection;
@ -45,6 +46,9 @@ public interface DeptApi {
* @param ids 部门编号数组
* @return 部门 Map
*/
Map<Long, DeptRespDTO> getDeptMap(Set<Long> ids);
default Map<Long, DeptRespDTO> getDeptMap(Set<Long> ids) {
List<DeptRespDTO> list = getDepts(ids);
return CollectionUtils.convertMap(list, DeptRespDTO::getId);
}
}

View File

@ -1,5 +1,7 @@
package cn.iocoder.yudao.module.system.api.dict;
import cn.iocoder.yudao.module.system.api.dict.dto.DictDataRespDTO;
import java.util.Collection;
/**
@ -19,4 +21,22 @@ public interface DictDataApi {
*/
void validDictDatas(String dictType, Collection<String> values);
/**
* 获得指定的字典数据,从缓存中
*
* @param type 字典类型
* @param value 字典数据值
* @return 字典数据
*/
DictDataRespDTO getDictData(String type, String value);
/**
* 解析获得指定的字典数据,从缓存中
*
* @param type 字典类型
* @param label 字典数据标签
* @return 字典数据
*/
DictDataRespDTO parseDictData(String type, String label);
}

View File

@ -0,0 +1,33 @@
package cn.iocoder.yudao.module.system.api.dict.dto;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import lombok.Data;
/**
* 字典数据 Response DTO
*
* @author 芋道源码
*/
@Data
public class DictDataRespDTO {
/**
* 字典标签
*/
private String label;
/**
* 字典值
*/
private String value;
/**
* 字典类型
*/
private String dictType;
/**
* 状态
*
* 枚举 {@link CommonStatusEnum}
*/
private Integer status;
}

View File

@ -0,0 +1,35 @@
package cn.iocoder.yudao.module.system.api.errorcode;
import cn.iocoder.yudao.module.system.api.errorcode.dto.ErrorCodeAutoGenerateReqDTO;
import cn.iocoder.yudao.module.system.api.errorcode.dto.ErrorCodeRespDTO;
import javax.validation.Valid;
import java.util.Date;
import java.util.List;
/**
* 错误码 Api 接口
*
* @author 芋道源码
*/
public interface ErrorCodeApi {
/**
* 自动创建错误码
*
* @param autoGenerateDTOs 错误码信息
*/
void autoGenerateErrorCodes(@Valid List<ErrorCodeAutoGenerateReqDTO> autoGenerateDTOs);
/**
* 增量获得错误码数组
*
* 如果 minUpdateTime 为空时,则获取所有错误码
*
* @param applicationName 应用名
* @param minUpdateTime 最小更新时间
* @return 错误码数组
*/
List<ErrorCodeRespDTO> getErrorCodeList(String applicationName, Date minUpdateTime);
}

View File

@ -0,0 +1,34 @@
package cn.iocoder.yudao.module.system.api.errorcode.dto;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
/**
* 错误码自动生成 DTO
*
* @author dylan
*/
@Data
@Accessors(chain = true)
public class ErrorCodeAutoGenerateReqDTO {
/**
* 应用名
*/
@NotNull(message = "应用名不能为空")
private String applicationName;
/**
* 错误码编码
*/
@NotNull(message = "错误码编码不能为空")
private Integer code;
/**
* 错误码错误提示
*/
@NotEmpty(message = "错误码错误提示不能为空")
private String message;
}

View File

@ -0,0 +1,28 @@
package cn.iocoder.yudao.module.system.api.errorcode.dto;
import lombok.Data;
import java.util.Date;
/**
* 错误码的 Response DTO
*
* @author 芋道源码
*/
@Data
public class ErrorCodeRespDTO {
/**
* 错误码编码
*/
private Integer code;
/**
* 错误码错误提示
*/
private String message;
/**
* 更新时间
*/
private Date updateTime;
}

View File

@ -0,0 +1,21 @@
package cn.iocoder.yudao.module.system.api.logger;
import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogCreateReqDTO;
import javax.validation.Valid;
/**
* 操作日志 API 接口
*
* @author 芋道源码
*/
public interface OperateLogApi {
/**
* 创建操作日志
*
* @param createReqDTO 请求
*/
void createOperateLog(@Valid OperateLogCreateReqDTO createReqDTO);
}

View File

@ -0,0 +1,123 @@
package cn.iocoder.yudao.module.system.api.logger.dto;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.Map;
/**
* 操作日志创建 Request DTO
*/
@Data
public class OperateLogCreateReqDTO {
/**
* 链路追踪编号
*/
private String traceId;
/**
* 用户编号
*/
@NotNull(message = "用户编号不能为空")
private Long userId;
/**
* 用户类型
*/
@NotNull(message = "用户类型不能为空")
private Integer userType;
/**
* 操作模块
*/
@NotEmpty(message = "操作模块不能为空")
private String module;
/**
* 操作名
*/
@NotEmpty(message = "操作名")
private String name;
/**
* 操作分类
*/
@NotNull(message = "操作分类不能为空")
private Integer type;
/**
* 操作明细
*/
private String content;
/**
* 拓展字段
*/
private Map<String, Object> exts;
/**
* 请求方法名
*/
@NotEmpty(message = "请求方法名不能为空")
private String requestMethod;
/**
* 请求地址
*/
@NotEmpty(message = "请求地址不能为空")
private String requestUrl;
/**
* 用户 IP
*/
@NotEmpty(message = "用户 IP 不能为空")
private String userIp;
/**
* 浏览器 UserAgent
*/
@NotEmpty(message = "浏览器 UserAgent 不能为空")
private String userAgent;
/**
* Java 方法名
*/
@NotEmpty(message = "Java 方法名不能为空")
private String javaMethod;
/**
* Java 方法的参数
*/
private String javaMethodArgs;
/**
* 开始时间
*/
@NotNull(message = "开始时间不能为空")
private Date startTime;
/**
* 执行时长,单位:毫秒
*/
@NotNull(message = "执行时长不能为空")
private Integer duration;
/**
* 结果码
*/
@NotNull(message = "结果码不能为空")
private Integer resultCode;
/**
* 结果提示
*/
private String resultMsg;
/**
* 结果数据
*/
private String resultData;
}

View File

@ -1,8 +1,8 @@
package cn.iocoder.yudao.module.system.api.auth;
package cn.iocoder.yudao.module.system.api.oauth2;
import cn.iocoder.yudao.module.system.api.auth.dto.OAuth2AccessTokenCheckRespDTO;
import cn.iocoder.yudao.module.system.api.auth.dto.OAuth2AccessTokenCreateReqDTO;
import cn.iocoder.yudao.module.system.api.auth.dto.OAuth2AccessTokenRespDTO;
import cn.iocoder.yudao.module.system.api.oauth2.dto.OAuth2AccessTokenCheckRespDTO;
import cn.iocoder.yudao.module.system.api.oauth2.dto.OAuth2AccessTokenCreateReqDTO;
import cn.iocoder.yudao.module.system.api.oauth2.dto.OAuth2AccessTokenRespDTO;
import javax.validation.Valid;

View File

@ -1,4 +1,4 @@
package cn.iocoder.yudao.module.system.api.auth.dto;
package cn.iocoder.yudao.module.system.api.oauth2.dto;
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.validation.InEnum;

View File

@ -1,4 +1,4 @@
package cn.iocoder.yudao.module.system.api.auth.dto;
package cn.iocoder.yudao.module.system.api.oauth2.dto;
import lombok.Data;
import lombok.experimental.Accessors;

View File

@ -0,0 +1,26 @@
package cn.iocoder.yudao.module.system.api.tenant;
import java.util.List;
/**
* 多租户的 API 接口
*
* @author 芋道源码
*/
public interface TenantApi {
/**
* 获得所有租户
*
* @return 租户编号数组
*/
List<Long> getTenantIds();
/**
* 校验租户是否合法
*
* @param id 租户编号
*/
void validTenant(Long id);
}

View File

@ -1,5 +1,6 @@
package cn.iocoder.yudao.module.system.api.user;
import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
import java.util.Collection;
@ -22,6 +23,14 @@ public interface AdminUserApi {
*/
AdminUserRespDTO getUser(Long id);
/**
* 通过用户 ID 查询用户们
*
* @param ids 用户 ID 们
* @return 用户对象信息
*/
List<AdminUserRespDTO> getUsers(Collection<Long> ids);
/**
* 获得指定部门的用户数组
*
@ -44,7 +53,10 @@ public interface AdminUserApi {
* @param ids 用户编号数组
* @return 用户 Map
*/
Map<Long, AdminUserRespDTO> getUserMap(Collection<Long> ids);
default Map<Long, AdminUserRespDTO> getUserMap(Collection<Long> ids) {
List<AdminUserRespDTO> users = getUsers(ids);
return CollectionUtils.convertMap(users, AdminUserRespDTO::getId);
}
/**
* 校验用户们是否有效。如下情况,视为无效:

View File

@ -1,4 +1,4 @@
package cn.iocoder.yudao.module.system.enums.auth;
package cn.iocoder.yudao.module.system.enums.oauth2;
/**
* OAuth2.0 客户端的通用枚举

View File

@ -1,4 +1,4 @@
package cn.iocoder.yudao.module.system.enums.auth;
package cn.iocoder.yudao.module.system.enums.oauth2;
import cn.hutool.core.util.ArrayUtil;
import lombok.AllArgsConstructor;