mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-08-08 23:31:53 +08:00
对齐 boot 与 cloud 的代码
This commit is contained in:
@@ -149,7 +149,7 @@ public class AuthController {
|
||||
@Parameter(name = "redirectUri", description = "回调路径")
|
||||
})
|
||||
public CommonResult<String> socialLogin(@RequestParam("type") Integer type,
|
||||
@RequestParam("redirectUri") String redirectUri) {
|
||||
@RequestParam("redirectUri") String redirectUri) {
|
||||
return CommonResult.success(socialUserService.getAuthorizeUrl(type, redirectUri));
|
||||
}
|
||||
|
||||
|
@@ -8,7 +8,7 @@ import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@Schema(description = "管理后台 - 登录用户的权限信息 Response VO,额外包括用户信息和角色列表")
|
||||
@Schema(description = "管理后台 - 登录用户的权限信息 Response VO,额外包括用户信息和角色列表")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@@ -37,7 +37,7 @@ public class AuthPermissionInfoRespVO {
|
||||
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码")
|
||||
private String nickname;
|
||||
|
||||
@Schema(description = "用户头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "http://www.iocoder.cn/xx.jpg")
|
||||
@Schema(description = "用户头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/xx.jpg")
|
||||
private String avatar;
|
||||
|
||||
}
|
||||
|
@@ -11,9 +11,9 @@ import java.util.Map;
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
/**
|
||||
* 邮件日志 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
* 邮件日志 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
@Data
|
||||
public class MailLogBaseVO {
|
||||
|
||||
|
@@ -40,6 +40,3 @@ tenant-id: {{adminTenentId}}
|
||||
GET {{baseUrl}}/system/role/page?pageNo=1&pageSize=10
|
||||
Authorization: Bearer {{token}}
|
||||
tenant-id: {{adminTenentId}}
|
||||
|
||||
###
|
||||
|
||||
|
@@ -20,7 +20,7 @@ public class PermissionAssignRoleDataScopeReqVO {
|
||||
// TODO 这里要多一个枚举校验
|
||||
private Integer dataScope;
|
||||
|
||||
@Schema(description = "部门编号列表,只有范围类型为 DEPT_CUSTOM 时,该字段才需要", example = "1,3,5")
|
||||
@Schema(description = "部门编号列表,只有范围类型为 DEPT_CUSTOM 时,该字段才需要", example = "1,3,5")
|
||||
private Set<Long> dataScopeDeptIds = Collections.emptySet(); // 兜底
|
||||
|
||||
}
|
||||
|
@@ -7,9 +7,9 @@ import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 敏感词 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
* 敏感词 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
@Data
|
||||
public class SensitiveWordBaseVO {
|
||||
|
||||
|
@@ -7,9 +7,9 @@ import javax.validation.constraints.*;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 租户 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
* 租户 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
@Data
|
||||
public class TenantBaseVO {
|
||||
|
||||
|
@@ -25,7 +25,7 @@ public class UserProfileUpdateReqVO {
|
||||
@Length(min = 11, max = 11, message = "手机号长度必须 11 位")
|
||||
private String mobile;
|
||||
|
||||
@Schema(description = "用户性别-参见 SexEnum 枚举类", example = "1")
|
||||
@Schema(description = "用户性别,参见 SexEnum 枚举类", example = "1")
|
||||
private Integer sex;
|
||||
|
||||
}
|
||||
|
@@ -29,7 +29,7 @@ public class UserExportReqVO {
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "部门编号,同时筛选子部门", example = "1024")
|
||||
@Schema(description = "部门编号,同时筛选子部门", example = "1024")
|
||||
private Long deptId;
|
||||
|
||||
}
|
||||
|
@@ -6,7 +6,7 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Schema(description = "管理后台 - 用户分页时的信息 Response VO,相比用户基本信息来说,会多部门信息")
|
||||
@Schema(description = "管理后台 - 用户分页时的信息 Response VO,相比用户基本信息来说,会多部门信息")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
|
@@ -1,5 +1,7 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.user.vo.user;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
||||
import cn.iocoder.yudao.framework.common.validation.InEnum;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -13,9 +15,9 @@ public class UserUpdateStatusReqVO {
|
||||
@NotNull(message = "角色编号不能为空")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "状态,见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "状态,见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "状态不能为空")
|
||||
// @InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}")
|
||||
@InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
|
@@ -197,8 +197,8 @@ public class MenuServiceImpl implements MenuService {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return menuCache.values().stream().filter(menu -> menuIds.contains(menu.getId())
|
||||
&& menuTypes.contains(menu.getType())
|
||||
&& menusStatuses.contains(menu.getStatus()))
|
||||
&& menuTypes.contains(menu.getType())
|
||||
&& menusStatuses.contains(menu.getStatus()))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
@@ -297,7 +297,7 @@ public class AdminUserServiceImpl implements AdminUserService {
|
||||
}
|
||||
|
||||
private void validateUserForCreateOrUpdate(Long id, String username, String mobile, String email,
|
||||
Long deptId, Set<Long> postIds) {
|
||||
Long deptId, Set<Long> postIds) {
|
||||
// 关闭数据权限,避免因为没有数据权限,查询不到数据,进而导致唯一校验不正确
|
||||
DataPermissionUtils.executeIgnore(() -> {
|
||||
// 校验用户存在
|
||||
|
Reference in New Issue
Block a user