💥 swagger2 迁移到 openApi3
This commit is contained in:
@@ -3,7 +3,7 @@ package com.hccake.ballcat.auth.controller;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.hccake.ballcat.common.model.result.R;
|
||||
import com.hccake.ballcat.common.model.result.SystemResultCode;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
@@ -22,8 +22,8 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/oauth")
|
||||
@Api(value = "oauth", tags = "用户认证模块")
|
||||
@RequiredArgsConstructor
|
||||
@Tag(name = "用户认证模块")
|
||||
public class AuthController {
|
||||
|
||||
private final TokenStore tokenStore;
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<artifactId>jakarta.validation-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<groupId>io.swagger.core.v3</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.hccake.ballcat.common.i18n;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
@@ -12,28 +11,28 @@ import javax.validation.constraints.NotEmpty;
|
||||
* @author hccake
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("国际化信息")
|
||||
@Schema(title = "国际化信息")
|
||||
public class I18nMessage {
|
||||
|
||||
/**
|
||||
* 国际化标识
|
||||
*/
|
||||
@NotEmpty(message = "{i18nMessage.code}:{}")
|
||||
@ApiModelProperty(value = "国际化标识")
|
||||
@Schema(title = "国际化标识")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 消息
|
||||
*/
|
||||
@NotEmpty(message = "{i18nMessage.message}:{}")
|
||||
@ApiModelProperty(value = "文本值,可以使用 { } 加角标,作为占位符")
|
||||
@Schema(title = "文本值,可以使用 { } 加角标,作为占位符")
|
||||
private String message;
|
||||
|
||||
/**
|
||||
* 地区语言标签
|
||||
*/
|
||||
@NotEmpty(message = "{i18nMessage.languageTag}:{}")
|
||||
@ApiModelProperty(value = "语言标签")
|
||||
@Schema(title = "语言标签")
|
||||
private String languageTag;
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<artifactId>ballcat-common-i18n</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<groupId>io.swagger.core.v3</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -32,6 +32,11 @@
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-annotation</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springdoc</groupId>
|
||||
<artifactId>springdoc-openapi-common</artifactId>
|
||||
<version>1.5.13</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -1,14 +1,15 @@
|
||||
package com.hccake.ballcat.common.model.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -19,43 +20,33 @@ import java.util.List;
|
||||
* @version 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("分页查询参数")
|
||||
@Schema(title = "分页查询参数")
|
||||
public class PageParam {
|
||||
|
||||
/**
|
||||
* 当前页
|
||||
*/
|
||||
@ApiModelProperty(value = "当前页码,从 1 开始", required = true, example = "1")
|
||||
@Schema(title = "当前页码", description = "从 1 开始", defaultValue = "1", example = "1")
|
||||
@NotNull(message = "当前页码不能为空")
|
||||
@Min(value = 1, message = "当前页不能小于 1")
|
||||
private long current = 1;
|
||||
|
||||
/**
|
||||
* 每页显示条数,默认 10
|
||||
*/
|
||||
@ApiModelProperty(value = "每页条数,最大值为 100", required = true, example = "10")
|
||||
@Schema(title = "每页显示条数", description = "最大值为 100", defaultValue = "10")
|
||||
@NotNull(message = "每页条数不能为空")
|
||||
@Range(min = 1, max = 100, message = "条数范围为 [1, 100]")
|
||||
private long size = 10;
|
||||
|
||||
@ApiModelProperty(value = "排序规则")
|
||||
@Schema(title = "排序规则")
|
||||
@Valid
|
||||
private List<Sort> sorts = new ArrayList<>();
|
||||
|
||||
@Schema(title = "排序元素载体")
|
||||
@Getter
|
||||
@Setter
|
||||
@ApiModel("排序元素载体")
|
||||
public static class Sort {
|
||||
|
||||
/**
|
||||
* 排序字段
|
||||
*/
|
||||
@ApiModelProperty(value = "排序字段")
|
||||
@Schema(title = "排序字段", example = "id")
|
||||
@Pattern(regexp = "[A-Za-z0-9_]{1,64}", message = "排序字段格式非法")
|
||||
private String field;
|
||||
|
||||
/**
|
||||
* 是否正序排序
|
||||
*/
|
||||
@ApiModelProperty(value = "是否正序排序")
|
||||
@Schema(title = "是否正序排序", example = "false")
|
||||
private boolean asc;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.hccake.ballcat.common.model.domain;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
import org.springdoc.api.annotations.ParameterObject;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
/**
|
||||
* 前端交互请求入参模型,将被转换为 PageParam 对象
|
||||
*
|
||||
* @see PageParam
|
||||
* @author hccake
|
||||
*/
|
||||
@Data
|
||||
@Valid
|
||||
@ParameterObject
|
||||
@Schema(title = "分页查询入参")
|
||||
public class PageParamRequest {
|
||||
|
||||
@Schema(title = "当前页码", description = "从 1 开始", defaultValue = "1", example = "1")
|
||||
@NotNull(message = "当前页码不能为空")
|
||||
@Min(value = 1, message = "当前页不能小于 1")
|
||||
private long current = 1;
|
||||
|
||||
@Schema(title = "每页显示条数", description = "最大值为 100", defaultValue = "10")
|
||||
@NotNull(message = "每页显示条数不能为空")
|
||||
@Range(min = 1, max = 100, message = "条数范围为 [1, 100]")
|
||||
private long size = 10;
|
||||
|
||||
@Schema(title = "排序字段", description = ",最大值为 100", example = "id")
|
||||
@Pattern(regexp = "[A-Za-z0-9_]{1,64}", message = "排序字段格式非法")
|
||||
String sortFields;
|
||||
|
||||
@Schema(title = "排序方式", example = "desc")
|
||||
String sortOrders;
|
||||
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.hccake.ballcat.common.model.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Collections;
|
||||
@@ -14,19 +14,19 @@ import java.util.List;
|
||||
* @version 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("分页返回结果")
|
||||
@Schema(title = "分页返回结果")
|
||||
public class PageResult<T> {
|
||||
|
||||
/**
|
||||
* 查询数据列表
|
||||
*/
|
||||
@ApiModelProperty(value = "分页数据", required = true)
|
||||
@Schema(title = "分页数据")
|
||||
protected List<T> records = Collections.emptyList();
|
||||
|
||||
/**
|
||||
* 总数
|
||||
*/
|
||||
@ApiModelProperty(value = "数据总量", required = true)
|
||||
@Schema(title = "数据总量")
|
||||
protected Long total = 0L;
|
||||
|
||||
public PageResult() {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.hccake.ballcat.common.model.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -10,43 +9,43 @@ import lombok.Data;
|
||||
* @author Hccake
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("下拉框数据")
|
||||
@Schema(title = "下拉框数据")
|
||||
public class SelectData<T> {
|
||||
|
||||
/**
|
||||
* 显示的数据
|
||||
*/
|
||||
@ApiModelProperty(value = "显示的数据", required = true)
|
||||
@Schema(title = "显示的数据", required = true)
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 选中获取的属性
|
||||
*/
|
||||
@ApiModelProperty(value = "选中获取的属性", required = true)
|
||||
@Schema(title = "选中获取的属性", required = true)
|
||||
private Object value;
|
||||
|
||||
/**
|
||||
* 是否被选中
|
||||
*/
|
||||
@ApiModelProperty(value = "是否被选中")
|
||||
@Schema(title = "是否被选中")
|
||||
private Boolean selected;
|
||||
|
||||
/**
|
||||
* 是否禁用
|
||||
*/
|
||||
@ApiModelProperty(value = "是否禁用")
|
||||
@Schema(title = "是否禁用")
|
||||
private Boolean disabled;
|
||||
|
||||
/**
|
||||
* 分组标识
|
||||
*/
|
||||
@ApiModelProperty(value = "分组标识")
|
||||
@Schema(title = "分组标识")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 扩展对象
|
||||
*/
|
||||
@ApiModelProperty(value = "扩展对象")
|
||||
@Schema(title = "扩展对象")
|
||||
private T extendObj;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.hccake.ballcat.common.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@@ -22,28 +22,28 @@ public abstract class BaseEntity implements Serializable {
|
||||
* 创建者
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建者")
|
||||
@Schema(title = "创建者")
|
||||
private Integer createBy;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@ApiModelProperty(value = "更新者")
|
||||
@Schema(title = "更新者")
|
||||
private Integer updateBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@Schema(title = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@Schema(title = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.hccake.ballcat.common.model.entity;
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@@ -21,7 +21,7 @@ public abstract class LogicDeletedBaseEntity extends BaseEntity {
|
||||
*/
|
||||
@TableLogic
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "逻辑删除标识,已删除: 删除时间戳,未删除: 0")
|
||||
@Schema(title = "逻辑删除标识,已删除: 删除时间戳,未删除: 0")
|
||||
private Long deleted;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.hccake.ballcat.common.model.result;
|
||||
|
||||
import com.hccake.ballcat.common.i18n.I18nClass;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.*;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@@ -21,18 +21,18 @@ import java.io.Serializable;
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "返回体结构")
|
||||
@Schema(title = "返回体结构")
|
||||
public class R<T> implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "返回状态码")
|
||||
@Schema(title = "返回状态码")
|
||||
private int code;
|
||||
|
||||
@ApiModelProperty(value = "返回信息")
|
||||
@Schema(title = "返回信息")
|
||||
private String message;
|
||||
|
||||
@ApiModelProperty(value = "数据")
|
||||
@Schema(title = "数据")
|
||||
private T data;
|
||||
|
||||
public static <T> R<T> ok() {
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
<spring-security-oauth2.version>2.3.8.RELEASE</spring-security-oauth2.version>
|
||||
<springfox.version>3.0.0</springfox.version>
|
||||
<swagger.version>1.5.21</swagger.version>
|
||||
<io.swagger.v3.version>2.1.11</io.swagger.v3.version>
|
||||
<knife4j.version>2.0.9</knife4j.version>
|
||||
<kafka.version>2.5.0</kafka.version>
|
||||
<hutool.version>5.7.16</hutool.version>
|
||||
@@ -371,7 +372,12 @@
|
||||
<dependency>
|
||||
<groupId>io.swagger.core.v3</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>2.1.11</version>
|
||||
<version>${io.swagger.v3.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger.core.v3</groupId>
|
||||
<artifactId>swagger-models</artifactId>
|
||||
<version>${io.swagger.v3.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
|
||||
@@ -19,8 +19,8 @@ import com.hccake.ballcat.i18n.model.vo.I18nDataPageVO;
|
||||
import com.hccake.ballcat.i18n.service.I18nDataService;
|
||||
import com.hccake.common.excel.annotation.RequestExcel;
|
||||
import com.hccake.common.excel.annotation.ResponseExcel;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -40,7 +40,7 @@ import java.util.stream.Collectors;
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/i18n/i18n-data")
|
||||
@Api(value = "i18n-data", tags = "国际化信息管理")
|
||||
@Tag(name = "国际化信息管理")
|
||||
public class I18nDataController {
|
||||
|
||||
private final I18nDataService i18nDataService;
|
||||
@@ -51,9 +51,9 @@ public class I18nDataController {
|
||||
* @param i18nDataQO 国际化信息查询对象
|
||||
* @return R 通用返回体
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@per.hasPermission('i18n:i18n-data:read')")
|
||||
@Operation(summary = "分页查询", description = "分页查询")
|
||||
public R<PageResult<I18nDataPageVO>> getI18nDataPage(PageParam pageParam, I18nDataQO i18nDataQO) {
|
||||
return R.ok(i18nDataService.queryPage(pageParam, i18nDataQO));
|
||||
}
|
||||
@@ -63,9 +63,9 @@ public class I18nDataController {
|
||||
* @param code 国际化标识
|
||||
* @return R 通用返回体
|
||||
*/
|
||||
@ApiOperation(value = "查询指定国际化标识的所有数据", notes = "查询指定国际化标识的所有数据")
|
||||
@GetMapping("/list")
|
||||
@PreAuthorize("@per.hasPermission('i18n:i18n-data:read')")
|
||||
@Operation(summary = "查询指定国际化标识的所有数据", description = "查询指定国际化标识的所有数据")
|
||||
public R<List<I18nData>> listByCode(@RequestParam("code") String code) {
|
||||
return R.ok(i18nDataService.listByCode(code));
|
||||
}
|
||||
@@ -75,10 +75,10 @@ public class I18nDataController {
|
||||
* @param i18nDataCreateDTO 国际化信息
|
||||
* @return R 通用返回体
|
||||
*/
|
||||
@ApiOperation(value = "新增国际化信息", notes = "新增国际化信息")
|
||||
@CreateOperationLogging(msg = "新增国际化信息")
|
||||
@PostMapping
|
||||
@PreAuthorize("@per.hasPermission('i18n:i18n-data:add')")
|
||||
@Operation(summary = "新增国际化信息", description = "新增国际化信息")
|
||||
public R save(@Valid @RequestBody I18nDataCreateDTO i18nDataCreateDTO) {
|
||||
// 转换为实体类列表
|
||||
List<I18nData> list = new ArrayList<>();
|
||||
@@ -99,10 +99,10 @@ public class I18nDataController {
|
||||
* @param i18nDataDTO 国际化信息
|
||||
* @return R 通用返回体
|
||||
*/
|
||||
@ApiOperation(value = "修改国际化信息", notes = "修改国际化信息")
|
||||
@UpdateOperationLogging(msg = "修改国际化信息")
|
||||
@PutMapping
|
||||
@PreAuthorize("@per.hasPermission('i18n:i18n-data:edit')")
|
||||
@Operation(summary = "修改国际化信息", description = "修改国际化信息")
|
||||
public R updateById(@RequestBody I18nDataDTO i18nDataDTO) {
|
||||
return i18nDataService.updateByCodeAndLanguageTag(i18nDataDTO) ? R.ok()
|
||||
: R.failed(BaseResultCode.UPDATE_DATABASE_ERROR, "修改国际化信息失败");
|
||||
@@ -114,10 +114,10 @@ public class I18nDataController {
|
||||
* @param languageTag 语言标签
|
||||
* @return R 通用返回体
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除国际化信息", notes = "通过id删除国际化信息")
|
||||
@DeleteOperationLogging(msg = "通过id删除国际化信息")
|
||||
@DeleteMapping
|
||||
@PreAuthorize("@per.hasPermission('i18n:i18n-data:del')")
|
||||
@Operation(summary = "通过id删除国际化信息", description = "通过id删除国际化信息")
|
||||
public R removeById(@RequestParam("code") String code, @RequestParam("languageTag") String languageTag) {
|
||||
return i18nDataService.removeByCodeAndLanguageTag(code, languageTag) ? R.ok()
|
||||
: R.failed(BaseResultCode.UPDATE_DATABASE_ERROR, "通过id删除国际化信息失败");
|
||||
@@ -127,9 +127,9 @@ public class I18nDataController {
|
||||
* 导入国际化信息
|
||||
* @return R 通用返回体
|
||||
*/
|
||||
@ApiOperation(value = "导入国际化信息", notes = "导入国际化信息")
|
||||
@PostMapping("/import")
|
||||
@PreAuthorize("@per.hasPermission('i18n:i18n-data:import')")
|
||||
@Operation(summary = "导入国际化信息", description = "导入国际化信息")
|
||||
public R<?> importI18nData(@RequestExcel List<I18nDataExcelVO> excelVos,
|
||||
@RequestParam("importMode") ImportModeEnum importModeEnum) {
|
||||
|
||||
@@ -161,9 +161,9 @@ public class I18nDataController {
|
||||
* @return List<I18nDataExcelVO>
|
||||
*/
|
||||
@ResponseExcel(name = "国际化信息", i18nHeader = true)
|
||||
@ApiOperation(value = "导出国际化信息", notes = "导出国际化信息")
|
||||
@GetMapping("/export")
|
||||
@PreAuthorize("@per.hasPermission('i18n:i18n-data:export')")
|
||||
@Operation(summary = "导出国际化信息", description = "导出国际化信息")
|
||||
public List<I18nDataExcelVO> exportI18nData(I18nDataQO i18nDataQO) {
|
||||
List<I18nData> list = i18nDataService.queryList(i18nDataQO);
|
||||
if (CollectionUtil.isEmpty(list)) {
|
||||
@@ -178,9 +178,9 @@ public class I18nDataController {
|
||||
* @return List<I18nDataExcelVO>
|
||||
*/
|
||||
@ResponseExcel(name = "国际化信息模板", i18nHeader = true)
|
||||
@ApiOperation(value = "国际化信息 Excel 模板", notes = "国际化信息 Excel 模板")
|
||||
@GetMapping("/excel-template")
|
||||
@PreAuthorize("@per.hasPermission('i18n:i18n-data:import')")
|
||||
@Operation(summary = "国际化信息 Excel 模板", description = "国际化信息 Excel 模板")
|
||||
public List<I18nDataExcelVO> excelTemplate() {
|
||||
List<I18nDataExcelVO> list = new ArrayList<>();
|
||||
list.add(new I18nDataExcelVO());
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<artifactId>mybatis-plus-annotation</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<groupId>io.swagger.core.v3</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.hccake.ballcat.i18n.model.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.Valid;
|
||||
@@ -16,7 +16,7 @@ import java.util.List;
|
||||
* @author hccake 2021-08-06 10:48:25
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "国际化信息传输对象")
|
||||
@Schema(title = "国际化信息传输对象")
|
||||
public class I18nDataCreateDTO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -25,7 +25,7 @@ public class I18nDataCreateDTO {
|
||||
* 唯一标识 = 业务:关键词
|
||||
*/
|
||||
@NotEmpty(message = "{i18nMessage.code}:{}")
|
||||
@ApiModelProperty(value = "唯一标识 = 业务:关键词")
|
||||
@Schema(title = "唯一标识 = 业务:关键词")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
@@ -34,34 +34,34 @@ public class I18nDataCreateDTO {
|
||||
@Valid
|
||||
@NotNull(message = "{i18nData.languageTexts}: {}")
|
||||
@Size(min = 1, message = "{i18nData.languageTexts}: {}")
|
||||
@ApiModelProperty(value = "语言文本列表")
|
||||
@Schema(title = "语言文本列表")
|
||||
private List<LanguageText> languageTexts;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
@Schema(title = "备注")
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 语言文本
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "语言文本信息")
|
||||
@Schema(title = "语言文本信息")
|
||||
public static class LanguageText {
|
||||
|
||||
/**
|
||||
* 语言标签
|
||||
*/
|
||||
@NotEmpty(message = "{i18nMessage.languageTag}:{}")
|
||||
@ApiModelProperty(value = "语言标签")
|
||||
@Schema(title = "语言标签")
|
||||
private String languageTag;
|
||||
|
||||
/**
|
||||
* 文本值,可以使用 { } 加角标,作为占位符
|
||||
*/
|
||||
@NotEmpty(message = "{i18nMessage.message}:{}")
|
||||
@ApiModelProperty(value = "文本值,可以使用 { } 加角标,作为占位符")
|
||||
@Schema(title = "文本值,可以使用 { } 加角标,作为占位符")
|
||||
private String message;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.hccake.ballcat.i18n.model.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -10,7 +10,7 @@ import lombok.Data;
|
||||
* @author hccake 2021-08-06 10:48:25
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "国际化信息传输对象")
|
||||
@Schema(title = "国际化信息传输对象")
|
||||
public class I18nDataDTO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -18,25 +18,25 @@ public class I18nDataDTO {
|
||||
/**
|
||||
* 语言标签
|
||||
*/
|
||||
@ApiModelProperty(value = "语言标签")
|
||||
@Schema(title = "语言标签")
|
||||
private String languageTag;
|
||||
|
||||
/**
|
||||
* 唯一标识 = 业务:关键词
|
||||
*/
|
||||
@ApiModelProperty(value = "唯一标识 = 业务:关键词")
|
||||
@Schema(title = "唯一标识 = 业务:关键词")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 文本值,可以使用 { } 加角标,作为占位符
|
||||
*/
|
||||
@ApiModelProperty(value = "文本值,可以使用 { } 加角标,作为占位符")
|
||||
@Schema(title = "文本值,可以使用 { } 加角标,作为占位符")
|
||||
private String message;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
@Schema(title = "备注")
|
||||
private String remarks;
|
||||
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.hccake.ballcat.i18n.model.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -14,15 +14,15 @@ import lombok.NoArgsConstructor;
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "国际化信息唯一值")
|
||||
@Schema(title = "国际化信息唯一值")
|
||||
public class I18nDataUnique {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "国际化标识")
|
||||
@Schema(title = "国际化标识")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "语言标签")
|
||||
@Schema(title = "语言标签")
|
||||
private String languageTag;
|
||||
|
||||
}
|
||||
@@ -3,8 +3,8 @@ package com.hccake.ballcat.i18n.model.entity;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.hccake.ballcat.common.model.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
@@ -20,7 +20,7 @@ import java.util.Objects;
|
||||
@Setter
|
||||
@ToString
|
||||
@TableName("i18n_data")
|
||||
@ApiModel(value = "国际化信息")
|
||||
@Schema(title = "国际化信息")
|
||||
public class I18nData extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -29,31 +29,31 @@ public class I18nData extends BaseEntity {
|
||||
* ID
|
||||
*/
|
||||
@TableId
|
||||
@ApiModelProperty(value = "ID")
|
||||
@Schema(title = "ID")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 语言标签
|
||||
*/
|
||||
@ApiModelProperty(value = "语言标签")
|
||||
@Schema(title = "语言标签")
|
||||
private String languageTag;
|
||||
|
||||
/**
|
||||
* 国际化标识
|
||||
*/
|
||||
@ApiModelProperty(value = "国际化标识")
|
||||
@Schema(title = "国际化标识")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 文本值,可以使用 { } 加角标,作为占位符
|
||||
*/
|
||||
@ApiModelProperty(value = "文本值,可以使用 { } 加角标,作为占位符")
|
||||
@Schema(title = "文本值,可以使用 { } 加角标,作为占位符")
|
||||
private String message;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
@Schema(title = "备注")
|
||||
private String remarks;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.hccake.ballcat.i18n.model.qo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springdoc.api.annotations.ParameterObject;
|
||||
|
||||
/**
|
||||
* 国际化信息 查询对象
|
||||
@@ -10,18 +11,19 @@ import lombok.Data;
|
||||
* @author hccake 2021-08-06 10:48:25
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "国际化信息查询对象")
|
||||
@Schema(title = "国际化信息查询对象")
|
||||
@ParameterObject
|
||||
public class I18nDataQO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "国际化标识")
|
||||
@Schema(title = "国际化标识")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "文本信息")
|
||||
@Schema(title = "文本信息")
|
||||
private String message;
|
||||
|
||||
@ApiModelProperty(value = "语言标签")
|
||||
@Schema(title = "语言标签")
|
||||
private String languageTag;
|
||||
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.hccake.ballcat.i18n.model.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -11,7 +11,7 @@ import lombok.Data;
|
||||
* @author hccake 2021-08-06 10:48:25
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "国际化信息Excel映射对象")
|
||||
@Schema(title = "国际化信息Excel映射对象")
|
||||
public class I18nDataExcelVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -19,29 +19,29 @@ public class I18nDataExcelVO {
|
||||
/**
|
||||
* 语言标签
|
||||
*/
|
||||
@ApiModelProperty(value = "语言标签")
|
||||
@ExcelProperty(value = "{i18nMessage.languageTag}", index = 0)
|
||||
@Schema(title = "语言标签")
|
||||
private String languageTag;
|
||||
|
||||
/**
|
||||
* 国际化标识
|
||||
*/
|
||||
@ApiModelProperty(value = "国际化标识")
|
||||
@ExcelProperty(value = "{i18nMessage.code}", index = 1)
|
||||
@Schema(title = "国际化标识")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 文本值,可以使用 { } 加角标,作为占位符
|
||||
*/
|
||||
@ApiModelProperty(value = "文本值,可以使用 { } 加角标,作为占位符")
|
||||
@ExcelProperty(value = "{i18nMessage.message}", index = 2)
|
||||
@Schema(title = "文本值,可以使用 { } 加角标,作为占位符")
|
||||
private String message;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
@ExcelProperty(value = "{i18nData.remarks}", index = 3)
|
||||
@Schema(title = "备注")
|
||||
private String remarks;
|
||||
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.hccake.ballcat.i18n.model.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@@ -12,7 +12,7 @@ import java.time.LocalDateTime;
|
||||
* @author hccake 2021-08-06 10:48:25
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "国际化信息分页视图对象")
|
||||
@Schema(title = "国际化信息分页视图对象")
|
||||
public class I18nDataPageVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -20,43 +20,43 @@ public class I18nDataPageVO {
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@ApiModelProperty(value = "ID")
|
||||
@Schema(title = "ID")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 语言标签
|
||||
*/
|
||||
@ApiModelProperty(value = "语言标签")
|
||||
@Schema(title = "语言标签")
|
||||
private String languageTag;
|
||||
|
||||
/**
|
||||
* 国际化标识
|
||||
*/
|
||||
@ApiModelProperty(value = "国际化标识")
|
||||
@Schema(title = "国际化标识")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 文本值,可以使用 { } 加角标,作为占位符
|
||||
*/
|
||||
@ApiModelProperty(value = "文本值,可以使用 { } 加角标,作为占位符")
|
||||
@Schema(title = "文本值,可以使用 { } 加角标,作为占位符")
|
||||
private String message;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
@Schema(title = "备注")
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@Schema(title = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@Schema(title = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -6,8 +6,8 @@ import com.hccake.ballcat.common.model.result.R;
|
||||
import com.hccake.ballcat.log.model.qo.AccessLogQO;
|
||||
import com.hccake.ballcat.log.model.vo.AccessLogPageVO;
|
||||
import com.hccake.ballcat.log.service.AccessLogService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/log/access-log")
|
||||
@Api(value = "access-log", tags = "访问日志管理")
|
||||
@Tag(name = "访问日志管理")
|
||||
public class AccessLogController {
|
||||
|
||||
private final AccessLogService accessLogService;
|
||||
@@ -34,9 +34,9 @@ public class AccessLogController {
|
||||
* @param accessLogQO 访问日志查询对象
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@per.hasPermission('log:access-log:read')")
|
||||
@Operation(summary = "分页查询", description = "分页查询")
|
||||
public R<PageResult<AccessLogPageVO>> getAccessLogApiPage(PageParam pageParam, AccessLogQO accessLogQO) {
|
||||
return R.ok(accessLogService.queryPage(pageParam, accessLogQO));
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ import com.hccake.ballcat.common.model.result.R;
|
||||
import com.hccake.ballcat.log.model.qo.LoginLogQO;
|
||||
import com.hccake.ballcat.log.model.vo.LoginLogPageVO;
|
||||
import com.hccake.ballcat.log.service.LoginLogService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -22,7 +22,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/log/login-log")
|
||||
@Api(value = "login-log", tags = "登陆日志管理")
|
||||
@Tag(name = "登陆日志管理")
|
||||
public class LoginLogController {
|
||||
|
||||
private final LoginLogService loginLogService;
|
||||
@@ -33,9 +33,9 @@ public class LoginLogController {
|
||||
* @param loginLogQO 登陆日志查询对象
|
||||
* @return R 通用返回体
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@per.hasPermission('log:login-log:read')")
|
||||
@Operation(summary = "分页查询", description = "分页查询")
|
||||
public R<PageResult<LoginLogPageVO>> getLoginLogPage(PageParam pageParam, LoginLogQO loginLogQO) {
|
||||
return R.ok(loginLogService.queryPage(pageParam, loginLogQO));
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ import com.hccake.ballcat.common.model.result.R;
|
||||
import com.hccake.ballcat.log.model.qo.OperationLogQO;
|
||||
import com.hccake.ballcat.log.model.vo.OperationLogPageVO;
|
||||
import com.hccake.ballcat.log.service.OperationLogService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/log/operation-log")
|
||||
@Api(value = "operation-log", tags = "操作日志管理")
|
||||
@Tag(name = "操作日志管理")
|
||||
public class OperationLogController {
|
||||
|
||||
private final OperationLogService operationLogService;
|
||||
@@ -34,9 +34,9 @@ public class OperationLogController {
|
||||
* @param operationLogQO 操作日志
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@per.hasPermission('log:operation-log:read')")
|
||||
@Operation(summary = "分页查询", description = "分页查询")
|
||||
public R<PageResult<OperationLogPageVO>> getOperationLogAdminPage(PageParam pageParam,
|
||||
OperationLogQO operationLogQO) {
|
||||
return R.ok(operationLogService.queryPage(pageParam, operationLogQO));
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<artifactId>mybatis-plus-annotation</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<groupId>io.swagger.core.v3</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -28,5 +28,11 @@
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springdoc</groupId>
|
||||
<artifactId>springdoc-openapi-common</artifactId>
|
||||
<version>1.5.13</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -2,8 +2,8 @@ package com.hccake.ballcat.log.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.time.LocalDateTime;
|
||||
@Data
|
||||
@TableName("log_access_log")
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "后台访问日志")
|
||||
@Schema(title = "后台访问日志")
|
||||
public class AccessLog {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -27,97 +27,97 @@ public class AccessLog {
|
||||
* 编号
|
||||
*/
|
||||
@TableId
|
||||
@ApiModelProperty(value = "编号")
|
||||
@Schema(title = "编号")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 追踪ID
|
||||
*/
|
||||
@ApiModelProperty(value = "追踪ID")
|
||||
@Schema(title = "追踪ID")
|
||||
private String traceId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@Schema(title = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@ApiModelProperty(value = "用户名")
|
||||
@Schema(title = "用户名")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 访问IP地址
|
||||
*/
|
||||
@ApiModelProperty(value = "访问IP地址")
|
||||
@Schema(title = "访问IP地址")
|
||||
private String ip;
|
||||
|
||||
/**
|
||||
* 用户代理
|
||||
*/
|
||||
@ApiModelProperty(value = "用户代理")
|
||||
@Schema(title = "用户代理")
|
||||
private String userAgent;
|
||||
|
||||
/**
|
||||
* 请求URI
|
||||
*/
|
||||
@ApiModelProperty(value = "请求URI")
|
||||
@Schema(title = "请求URI")
|
||||
private String uri;
|
||||
|
||||
/**
|
||||
* 请求映射地址
|
||||
*/
|
||||
@ApiModelProperty(value = "请求映射地址")
|
||||
@Schema(title = "请求映射地址")
|
||||
private String matchingPattern;
|
||||
|
||||
/**
|
||||
* 操作方式
|
||||
*/
|
||||
@ApiModelProperty(value = "操作方式")
|
||||
@Schema(title = "操作方式")
|
||||
private String method;
|
||||
|
||||
/**
|
||||
* 请求参数
|
||||
*/
|
||||
@ApiModelProperty(value = "请求参数")
|
||||
@Schema(title = "请求参数")
|
||||
private String reqParams;
|
||||
|
||||
/**
|
||||
* 请求body
|
||||
*/
|
||||
@ApiModelProperty(value = "请求body")
|
||||
@Schema(title = "请求body")
|
||||
private String reqBody;
|
||||
|
||||
/**
|
||||
* 响应状态码
|
||||
*/
|
||||
@ApiModelProperty(value = "响应状态码")
|
||||
@Schema(title = "响应状态码")
|
||||
private Integer httpStatus;
|
||||
|
||||
/**
|
||||
* 响应信息
|
||||
*/
|
||||
@ApiModelProperty(value = "响应信息")
|
||||
@Schema(title = "响应信息")
|
||||
private String result;
|
||||
|
||||
/**
|
||||
* 错误消息
|
||||
*/
|
||||
@ApiModelProperty(value = "错误消息")
|
||||
@Schema(title = "错误消息")
|
||||
private String errorMsg;
|
||||
|
||||
/**
|
||||
* 执行时长
|
||||
*/
|
||||
@ApiModelProperty(value = "执行时长")
|
||||
@Schema(title = "执行时长")
|
||||
private Long time;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@Schema(title = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.hccake.ballcat.log.enums.LoginEventTypeEnum;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.time.LocalDateTime;
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@TableName("log_login_log")
|
||||
@ApiModel(value = "登陆日志")
|
||||
@Schema(title = "登陆日志")
|
||||
public class LoginLog {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -29,75 +29,75 @@ public class LoginLog {
|
||||
* 编号
|
||||
*/
|
||||
@TableId
|
||||
@ApiModelProperty(value = "编号")
|
||||
@Schema(title = "编号")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 追踪ID
|
||||
*/
|
||||
@ApiModelProperty(value = "追踪ID")
|
||||
@Schema(title = "追踪ID")
|
||||
private String traceId;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@ApiModelProperty(value = "用户名")
|
||||
@Schema(title = "用户名")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 操作信息
|
||||
*/
|
||||
@ApiModelProperty(value = "登陆IP")
|
||||
@Schema(title = "登陆IP")
|
||||
private String ip;
|
||||
|
||||
/**
|
||||
* 操作系统
|
||||
*/
|
||||
@ApiModelProperty(value = "操作系统")
|
||||
@Schema(title = "操作系统")
|
||||
private String os;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@ApiModelProperty(value = "状态")
|
||||
@Schema(title = "状态")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 日志消息
|
||||
*/
|
||||
@ApiModelProperty(value = "日志消息")
|
||||
@Schema(title = "日志消息")
|
||||
private String msg;
|
||||
|
||||
/**
|
||||
* 登陆地点 TODO IP解析工具暂时未定 IP解析工具类需要简单封装下,方便替换底层工具
|
||||
*/
|
||||
@ApiModelProperty(value = "登陆地点")
|
||||
@Schema(title = "登陆地点")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 事件类型 登陆/登出
|
||||
* @see LoginEventTypeEnum
|
||||
*/
|
||||
@ApiModelProperty(value = "事件类型")
|
||||
@Schema(title = "事件类型")
|
||||
private Integer eventType;
|
||||
|
||||
/**
|
||||
* 浏览器
|
||||
*/
|
||||
@ApiModelProperty(value = "浏览器")
|
||||
@Schema(title = "浏览器")
|
||||
private String browser;
|
||||
|
||||
/**
|
||||
* 登录/登出时间
|
||||
*/
|
||||
@ApiModelProperty(value = "登录/登出时间")
|
||||
@Schema(title = "登录/登出时间")
|
||||
private LocalDateTime loginTime;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@Schema(title = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,8 +2,7 @@ package com.hccake.ballcat.log.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@@ -17,8 +16,8 @@ import java.time.LocalDateTime;
|
||||
*/
|
||||
@Data
|
||||
@TableName("log_operation_log")
|
||||
@ApiModel(value = "操作日志")
|
||||
@Accessors(chain = true)
|
||||
@Schema(title = "操作日志")
|
||||
public class OperationLog {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -27,79 +26,79 @@ public class OperationLog {
|
||||
* 编号
|
||||
*/
|
||||
@TableId
|
||||
@ApiModelProperty(value = "编号")
|
||||
@Schema(title = "编号")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 追踪ID
|
||||
*/
|
||||
@ApiModelProperty(value = "追踪ID")
|
||||
@Schema(title = "追踪ID")
|
||||
private String traceId;
|
||||
|
||||
/**
|
||||
* 日志消息
|
||||
*/
|
||||
@ApiModelProperty(value = "日志消息")
|
||||
@Schema(title = "日志消息")
|
||||
private String msg;
|
||||
|
||||
/**
|
||||
* 访问IP地址
|
||||
*/
|
||||
@ApiModelProperty(value = "访问IP地址")
|
||||
@Schema(title = "访问IP地址")
|
||||
private String ip;
|
||||
|
||||
/**
|
||||
* 用户代理
|
||||
*/
|
||||
@ApiModelProperty(value = "用户代理")
|
||||
@Schema(title = "用户代理")
|
||||
private String userAgent;
|
||||
|
||||
/**
|
||||
* 请求URI
|
||||
*/
|
||||
@ApiModelProperty(value = "请求URI")
|
||||
@Schema(title = "请求URI")
|
||||
private String uri;
|
||||
|
||||
/**
|
||||
* 请求方法
|
||||
*/
|
||||
@ApiModelProperty(value = "请求方法")
|
||||
@Schema(title = "请求方法")
|
||||
private String method;
|
||||
|
||||
/**
|
||||
* 操作提交的数据
|
||||
*/
|
||||
@ApiModelProperty(value = "操作提交的数据")
|
||||
@Schema(title = "操作提交的数据")
|
||||
private String params;
|
||||
|
||||
/**
|
||||
* 操作状态
|
||||
*/
|
||||
@ApiModelProperty(value = "操作状态")
|
||||
@Schema(title = "操作状态")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 操作类型
|
||||
*/
|
||||
@ApiModelProperty(value = "操作类型")
|
||||
@Schema(title = "操作类型")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 执行时长
|
||||
*/
|
||||
@ApiModelProperty(value = "执行时长")
|
||||
@Schema(title = "执行时长")
|
||||
private Long time;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
@ApiModelProperty(value = "创建者")
|
||||
@Schema(title = "创建者")
|
||||
private String operator;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@Schema(title = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
package com.hccake.ballcat.log.model.qo;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springdoc.api.annotations.ParameterObject;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.hutool.core.date.DatePattern.NORM_DATETIME_PATTERN;
|
||||
|
||||
/**
|
||||
* 后台访问日志
|
||||
*
|
||||
@@ -15,7 +16,8 @@ import java.time.LocalDateTime;
|
||||
* @date 2019-10-16 16:09:25
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "后台访问日志查询对象")
|
||||
@Schema(title = "后台访问日志查询对象")
|
||||
@ParameterObject
|
||||
public class AccessLogQO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -23,51 +25,51 @@ public class AccessLogQO {
|
||||
/**
|
||||
* 追踪ID
|
||||
*/
|
||||
@ApiModelProperty(value = "追踪ID")
|
||||
@Schema(title = "追踪ID")
|
||||
private String traceId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@Schema(title = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
/**
|
||||
* 访问IP地址
|
||||
*/
|
||||
@ApiModelProperty(value = "访问IP地址")
|
||||
@Schema(title = "访问IP地址")
|
||||
private String ip;
|
||||
|
||||
/**
|
||||
* 请求Uri
|
||||
*/
|
||||
@ApiModelProperty(value = "请求Uri")
|
||||
@Schema(title = "请求Uri")
|
||||
private String uri;
|
||||
|
||||
/**
|
||||
* 请求映射地址
|
||||
*/
|
||||
@ApiModelProperty(value = "请求映射地址")
|
||||
@Schema(title = "请求映射地址")
|
||||
private String matchingPattern;
|
||||
|
||||
/**
|
||||
* 响应状态码
|
||||
*/
|
||||
@ApiModelProperty(value = "响应状态码")
|
||||
@Schema(title = "响应状态码")
|
||||
private Integer httpStatus;
|
||||
|
||||
/**
|
||||
* 登陆时间区间(开始时间)
|
||||
*/
|
||||
@DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
|
||||
@ApiModelProperty(value = "开始时间(登陆时间区间)")
|
||||
@DateTimeFormat(pattern = NORM_DATETIME_PATTERN)
|
||||
@Schema(title = "开始时间(登陆时间区间)")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/**
|
||||
* 登陆时间区间(结束时间)
|
||||
*/
|
||||
@DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
|
||||
@ApiModelProperty(value = "结束时间(登陆时间区间)")
|
||||
@DateTimeFormat(pattern = NORM_DATETIME_PATTERN)
|
||||
@Schema(title = "结束时间(登陆时间区间)")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,21 +1,23 @@
|
||||
package com.hccake.ballcat.log.model.qo;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import com.hccake.ballcat.log.enums.LoginEventTypeEnum;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springdoc.api.annotations.ParameterObject;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.hutool.core.date.DatePattern.NORM_DATETIME_PATTERN;
|
||||
|
||||
/**
|
||||
* 登陆日志 查询对象
|
||||
*
|
||||
* @author hccake 2020-09-16 20:21:10
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "登陆日志查询对象")
|
||||
@Schema(title = "登陆日志查询对象")
|
||||
@ParameterObject
|
||||
public class LoginLogQO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -23,46 +25,47 @@ public class LoginLogQO {
|
||||
/**
|
||||
* 追踪ID
|
||||
*/
|
||||
@ApiModelProperty(value = "追踪ID")
|
||||
@Schema(title = "追踪ID")
|
||||
private String traceId;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@ApiModelProperty(value = "用户名")
|
||||
@Schema(title = "用户名")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 操作信息
|
||||
*/
|
||||
@ApiModelProperty(value = "操作信息")
|
||||
@Schema(title = "操作信息")
|
||||
private String ip;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@ApiModelProperty(value = "状态")
|
||||
@Schema(title = "状态")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 事件类型 登陆/登出
|
||||
*
|
||||
* @see LoginEventTypeEnum
|
||||
*/
|
||||
@ApiModelProperty(value = "事件类型")
|
||||
@Schema(title = "事件类型")
|
||||
private Integer eventType;
|
||||
|
||||
/**
|
||||
* 登陆时间区间(开始时间)
|
||||
*/
|
||||
@DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
|
||||
@ApiModelProperty(value = "开始时间(登陆时间区间)")
|
||||
@DateTimeFormat(pattern = NORM_DATETIME_PATTERN)
|
||||
@Schema(title = "开始时间(登陆时间区间)")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/**
|
||||
* 登陆时间区间(结束时间)
|
||||
*/
|
||||
@DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
|
||||
@ApiModelProperty(value = "结束时间(登陆时间区间)")
|
||||
@DateTimeFormat(pattern = NORM_DATETIME_PATTERN)
|
||||
@Schema(title = "结束时间(登陆时间区间)")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
}
|
||||
@@ -1,13 +1,14 @@
|
||||
package com.hccake.ballcat.log.model.qo;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springdoc.api.annotations.ParameterObject;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.hutool.core.date.DatePattern.NORM_DATETIME_PATTERN;
|
||||
|
||||
/**
|
||||
* 操作日志查询对象
|
||||
*
|
||||
@@ -15,63 +16,64 @@ import java.time.LocalDateTime;
|
||||
* @date 2019-10-15 20:42:32
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "操作日志查询对象")
|
||||
@Schema(title = "操作日志查询对象")
|
||||
@ParameterObject
|
||||
public class OperationLogQO {
|
||||
|
||||
/**
|
||||
* 追踪ID
|
||||
*/
|
||||
@ApiModelProperty(value = "追踪ID")
|
||||
@Schema(title = "追踪ID")
|
||||
private String traceId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@Schema(title = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
/**
|
||||
* 日志消息
|
||||
*/
|
||||
@ApiModelProperty(value = "日志消息")
|
||||
@Schema(title = "日志消息")
|
||||
private String msg;
|
||||
|
||||
/**
|
||||
* 访问IP地址
|
||||
*/
|
||||
@ApiModelProperty(value = "访问IP地址")
|
||||
@Schema(title = "访问IP地址")
|
||||
private String ip;
|
||||
|
||||
/**
|
||||
* 请求URI
|
||||
*/
|
||||
@ApiModelProperty(value = "请求URI")
|
||||
@Schema(title = "请求URI")
|
||||
private String uri;
|
||||
|
||||
/**
|
||||
* 操作状态
|
||||
*/
|
||||
@ApiModelProperty(value = "操作状态")
|
||||
@Schema(title = "操作状态")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 操作类型
|
||||
*/
|
||||
@ApiModelProperty(value = "操作类型")
|
||||
@Schema(title = "操作类型")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 登陆时间区间(开始时间)
|
||||
*/
|
||||
@DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
|
||||
@ApiModelProperty(value = "开始时间(登陆时间区间)")
|
||||
@DateTimeFormat(pattern = NORM_DATETIME_PATTERN)
|
||||
@Schema(title = "开始时间(登陆时间区间)")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/**
|
||||
* 登陆时间区间(结束时间)
|
||||
*/
|
||||
@DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
|
||||
@ApiModelProperty(value = "结束时间(登陆时间区间)")
|
||||
@DateTimeFormat(pattern = NORM_DATETIME_PATTERN)
|
||||
@Schema(title = "结束时间(登陆时间区间)")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.hccake.ballcat.log.model.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@@ -13,7 +13,7 @@ import java.time.LocalDateTime;
|
||||
* @date 2019-10-16 16:09:25
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "访问日志分页展示对象")
|
||||
@Schema(title = "访问日志分页展示对象")
|
||||
public class AccessLogPageVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -21,97 +21,97 @@ public class AccessLogPageVO {
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@ApiModelProperty(value = "编号")
|
||||
@Schema(title = "编号")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 追踪ID
|
||||
*/
|
||||
@ApiModelProperty(value = "追踪ID")
|
||||
@Schema(title = "追踪ID")
|
||||
private String traceId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@Schema(title = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@ApiModelProperty(value = "用户名")
|
||||
@Schema(title = "用户名")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 访问IP地址
|
||||
*/
|
||||
@ApiModelProperty(value = "访问IP地址")
|
||||
@Schema(title = "访问IP地址")
|
||||
private String ip;
|
||||
|
||||
/**
|
||||
* 用户代理
|
||||
*/
|
||||
@ApiModelProperty(value = "用户代理")
|
||||
@Schema(title = "用户代理")
|
||||
private String userAgent;
|
||||
|
||||
/**
|
||||
* 请求URI
|
||||
*/
|
||||
@ApiModelProperty(value = "请求URI")
|
||||
@Schema(title = "请求URI")
|
||||
private String uri;
|
||||
|
||||
/**
|
||||
* 请求映射地址
|
||||
*/
|
||||
@ApiModelProperty(value = "请求映射地址")
|
||||
@Schema(title = "请求映射地址")
|
||||
private String matchingPattern;
|
||||
|
||||
/**
|
||||
* 操作方式
|
||||
*/
|
||||
@ApiModelProperty(value = "操作方式")
|
||||
@Schema(title = "操作方式")
|
||||
private String method;
|
||||
|
||||
/**
|
||||
* 请求参数
|
||||
*/
|
||||
@ApiModelProperty(value = "请求参数")
|
||||
@Schema(title = "请求参数")
|
||||
private String reqParams;
|
||||
|
||||
/**
|
||||
* 请求body
|
||||
*/
|
||||
@ApiModelProperty(value = "请求body")
|
||||
@Schema(title = "请求body")
|
||||
private String reqBody;
|
||||
|
||||
/**
|
||||
* 响应状态码
|
||||
*/
|
||||
@ApiModelProperty(value = "响应状态码")
|
||||
@Schema(title = "响应状态码")
|
||||
private Integer httpStatus;
|
||||
|
||||
/**
|
||||
* 响应信息
|
||||
*/
|
||||
@ApiModelProperty(value = "响应信息")
|
||||
@Schema(title = "响应信息")
|
||||
private String result;
|
||||
|
||||
/**
|
||||
* 错误消息
|
||||
*/
|
||||
@ApiModelProperty(value = "错误消息")
|
||||
@Schema(title = "错误消息")
|
||||
private String errorMsg;
|
||||
|
||||
/**
|
||||
* 执行时长
|
||||
*/
|
||||
@ApiModelProperty(value = "执行时长")
|
||||
@Schema(title = "执行时长")
|
||||
private Long time;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@Schema(title = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package com.hccake.ballcat.log.model.vo;
|
||||
|
||||
import com.hccake.ballcat.log.enums.LoginEventTypeEnum;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@@ -13,7 +12,7 @@ import java.time.LocalDateTime;
|
||||
* @author hccake 2020-09-16 20:21:10
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "登陆日志")
|
||||
@Schema(title = "登陆日志")
|
||||
public class LoginLogPageVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -21,74 +20,74 @@ public class LoginLogPageVO {
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@ApiModelProperty(value = "编号")
|
||||
@Schema(title = "编号")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 追踪ID
|
||||
*/
|
||||
@ApiModelProperty(value = "追踪ID")
|
||||
@Schema(title = "追踪ID")
|
||||
private String traceId;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@ApiModelProperty(value = "用户名")
|
||||
@Schema(title = "用户名")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 操作信息
|
||||
*/
|
||||
@ApiModelProperty(value = "操作信息")
|
||||
@Schema(title = "操作信息")
|
||||
private String ip;
|
||||
|
||||
/**
|
||||
* 操作系统
|
||||
*/
|
||||
@ApiModelProperty(value = "操作系统")
|
||||
@Schema(title = "操作系统")
|
||||
private String os;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@ApiModelProperty(value = "状态")
|
||||
@Schema(title = "状态")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 日志消息
|
||||
*/
|
||||
@ApiModelProperty(value = "日志消息")
|
||||
@Schema(title = "日志消息")
|
||||
private String msg;
|
||||
|
||||
/**
|
||||
* 登陆地点
|
||||
*/
|
||||
@ApiModelProperty(value = "登陆地点")
|
||||
@Schema(title = "登陆地点")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 事件类型 登陆/登出
|
||||
* @see LoginEventTypeEnum
|
||||
*/
|
||||
@ApiModelProperty(value = "事件类型")
|
||||
@Schema(title = "事件类型")
|
||||
private Integer eventType;
|
||||
|
||||
/**
|
||||
* 浏览器
|
||||
*/
|
||||
@ApiModelProperty(value = "浏览器")
|
||||
@Schema(title = "浏览器")
|
||||
private String browser;
|
||||
|
||||
/**
|
||||
* 登录/登出时间
|
||||
*/
|
||||
@ApiModelProperty(value = "登录/登出时间")
|
||||
@Schema(title = "登录/登出时间")
|
||||
private LocalDateTime loginTime;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@Schema(title = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.hccake.ballcat.log.model.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@@ -13,7 +13,7 @@ import java.time.LocalDateTime;
|
||||
* @date 2019-10-15 20:42:32
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "操作日志视图对象")
|
||||
@Schema(title = "操作日志视图对象")
|
||||
public class OperationLogPageVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -21,79 +21,79 @@ public class OperationLogPageVO {
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@ApiModelProperty(value = "编号")
|
||||
@Schema(title = "编号")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 追踪ID
|
||||
*/
|
||||
@ApiModelProperty(value = "追踪ID")
|
||||
@Schema(title = "追踪ID")
|
||||
private String traceId;
|
||||
|
||||
/**
|
||||
* 日志消息
|
||||
*/
|
||||
@ApiModelProperty(value = "日志消息")
|
||||
@Schema(title = "日志消息")
|
||||
private String msg;
|
||||
|
||||
/**
|
||||
* 访问IP地址
|
||||
*/
|
||||
@ApiModelProperty(value = "访问IP地址")
|
||||
@Schema(title = "访问IP地址")
|
||||
private String ip;
|
||||
|
||||
/**
|
||||
* 用户代理
|
||||
*/
|
||||
@ApiModelProperty(value = "用户代理")
|
||||
@Schema(title = "用户代理")
|
||||
private String userAgent;
|
||||
|
||||
/**
|
||||
* 请求URI
|
||||
*/
|
||||
@ApiModelProperty(value = "请求URI")
|
||||
@Schema(title = "请求URI")
|
||||
private String uri;
|
||||
|
||||
/**
|
||||
* 请求方法
|
||||
*/
|
||||
@ApiModelProperty(value = "请求方法")
|
||||
@Schema(title = "请求方法")
|
||||
private String method;
|
||||
|
||||
/**
|
||||
* 操作提交的数据
|
||||
*/
|
||||
@ApiModelProperty(value = "操作提交的数据")
|
||||
@Schema(title = "操作提交的数据")
|
||||
private String params;
|
||||
|
||||
/**
|
||||
* 操作状态
|
||||
*/
|
||||
@ApiModelProperty(value = "操作状态")
|
||||
@Schema(title = "操作状态")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 操作类型
|
||||
*/
|
||||
@ApiModelProperty(value = "操作类型")
|
||||
@Schema(title = "操作类型")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 执行时长
|
||||
*/
|
||||
@ApiModelProperty(value = "执行时长")
|
||||
@Schema(title = "执行时长")
|
||||
private Long time;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
@ApiModelProperty(value = "创建者")
|
||||
@Schema(title = "创建者")
|
||||
private String operator;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@Schema(title = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.hccake.ballcat.notify.event;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.ToString;
|
||||
@@ -19,7 +18,6 @@ public class AnnouncementCloseEvent {
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@ApiModelProperty(value = "公告ID")
|
||||
private final Long id;
|
||||
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@ import com.hccake.ballcat.notify.model.entity.Announcement;
|
||||
import com.hccake.ballcat.notify.model.qo.AnnouncementQO;
|
||||
import com.hccake.ballcat.notify.model.vo.AnnouncementPageVO;
|
||||
import com.hccake.ballcat.notify.service.AnnouncementService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -31,7 +31,7 @@ import java.util.List;
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/notify/announcement")
|
||||
@Api(value = "announcement", tags = "公告信息管理")
|
||||
@Tag(name = "公告信息管理")
|
||||
public class AnnouncementController {
|
||||
|
||||
private final AnnouncementService announcementService;
|
||||
@@ -42,9 +42,9 @@ public class AnnouncementController {
|
||||
* @param announcementQO 公告信息查询对象
|
||||
* @return R 通用返回体
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@per.hasPermission('notify:announcement:read')")
|
||||
@Operation(summary = "分页查询", description = "分页查询")
|
||||
public R<PageResult<AnnouncementPageVO>> getAnnouncementPage(PageParam pageParam, AnnouncementQO announcementQO) {
|
||||
return R.ok(announcementService.queryPage(pageParam, announcementQO));
|
||||
}
|
||||
@@ -54,10 +54,10 @@ public class AnnouncementController {
|
||||
* @param announcementDTO 公告信息
|
||||
* @return R 通用返回体
|
||||
*/
|
||||
@ApiOperation(value = "新增公告信息", notes = "新增公告信息")
|
||||
@CreateOperationLogging(msg = "新增公告信息")
|
||||
@PostMapping
|
||||
@PreAuthorize("@per.hasPermission('notify:announcement:add')")
|
||||
@Operation(summary = "新增公告信息", description = "新增公告信息")
|
||||
public R<?> save(@Valid @RequestBody AnnouncementDTO announcementDTO) {
|
||||
return announcementService.addAnnouncement(announcementDTO) ? R.ok()
|
||||
: R.failed(BaseResultCode.UPDATE_DATABASE_ERROR, "新增公告信息失败");
|
||||
@@ -68,10 +68,10 @@ public class AnnouncementController {
|
||||
* @param announcementDTO 公告信息
|
||||
* @return R 通用返回体
|
||||
*/
|
||||
@ApiOperation(value = "修改公告信息", notes = "修改公告信息")
|
||||
@UpdateOperationLogging(msg = "修改公告信息")
|
||||
@PutMapping
|
||||
@PreAuthorize("@per.hasPermission('notify:announcement:edit')")
|
||||
@Operation(summary = "修改公告信息", description = "修改公告信息")
|
||||
public R<?> updateById(@Valid @RequestBody AnnouncementDTO announcementDTO) {
|
||||
return announcementService.updateAnnouncement(announcementDTO) ? R.ok()
|
||||
: R.failed(BaseResultCode.UPDATE_DATABASE_ERROR, "修改公告信息失败");
|
||||
@@ -82,10 +82,10 @@ public class AnnouncementController {
|
||||
* @param id id
|
||||
* @return R 通用返回体
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除公告信息", notes = "通过id删除公告信息")
|
||||
@DeleteOperationLogging(msg = "通过id删除公告信息")
|
||||
@DeleteMapping("/{id}")
|
||||
@PreAuthorize("@per.hasPermission('notify:announcement:del')")
|
||||
@Operation(summary = "通过id删除公告信息", description = "通过id删除公告信息")
|
||||
public R<?> removeById(@PathVariable("id") Long id) {
|
||||
return announcementService.removeById(id) ? R.ok()
|
||||
: R.failed(BaseResultCode.UPDATE_DATABASE_ERROR, "通过id删除公告信息失败");
|
||||
@@ -95,10 +95,10 @@ public class AnnouncementController {
|
||||
* 发布公告信息
|
||||
* @return R 通用返回体
|
||||
*/
|
||||
@ApiOperation(value = "发布公告信息", notes = "发布公告信息")
|
||||
@UpdateOperationLogging(msg = "发布公告信息")
|
||||
@PatchMapping("/publish/{announcementId}")
|
||||
@PreAuthorize("@per.hasPermission('notify:announcement:edit')")
|
||||
@Operation(summary = "发布公告信息", description = "发布公告信息")
|
||||
public R<?> enableAnnouncement(@PathVariable("announcementId") Long announcementId) {
|
||||
return announcementService.publish(announcementId) ? R.ok()
|
||||
: R.failed(BaseResultCode.UPDATE_DATABASE_ERROR, "发布公告信息失败");
|
||||
@@ -108,19 +108,19 @@ public class AnnouncementController {
|
||||
* 关闭公告信息
|
||||
* @return R 通用返回体
|
||||
*/
|
||||
@ApiOperation(value = "关闭公告信息", notes = "关闭公告信息")
|
||||
@UpdateOperationLogging(msg = "关闭公告信息")
|
||||
@PatchMapping("/close/{announcementId}")
|
||||
@PreAuthorize("@per.hasPermission('notify:announcement:edit')")
|
||||
@Operation(summary = "关闭公告信息", description = "关闭公告信息")
|
||||
public R<?> disableAnnouncement(@PathVariable("announcementId") Long announcementId) {
|
||||
return announcementService.close(announcementId) ? R.ok()
|
||||
: R.failed(BaseResultCode.UPDATE_DATABASE_ERROR, "关闭公告信息失败");
|
||||
}
|
||||
|
||||
@ApiOperation(value = "公告内容图片上传", notes = "公告内容图片上传")
|
||||
@UpdateOperationLogging(msg = "公告内容图片上传")
|
||||
@PreAuthorize("@per.hasPermission('notify:announcement:edit')")
|
||||
@PostMapping("/image")
|
||||
@Operation(summary = "公告内容图片上传", description = "公告内容图片上传")
|
||||
public R<List<String>> uploadImages(@RequestParam("files") List<MultipartFile> files) {
|
||||
|
||||
List<String> objectNames = announcementService.uploadImages(files);
|
||||
@@ -128,9 +128,9 @@ public class AnnouncementController {
|
||||
return R.ok(objectNames);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "用户公告信息", notes = "用户公告信息")
|
||||
@GetMapping("/user")
|
||||
@PreAuthorize("@per.hasPermission('notify:userannouncement:read')")
|
||||
@Operation(summary = "用户公告信息", description = "用户公告信息")
|
||||
public R<List<Announcement>> getUserAnnouncements() {
|
||||
Integer userId = SecurityUtils.getUser().getUserId();
|
||||
return R.ok(announcementService.listActiveAnnouncements(userId));
|
||||
|
||||
@@ -7,8 +7,8 @@ import com.hccake.ballcat.notify.model.qo.UserAnnouncementQO;
|
||||
import com.hccake.ballcat.notify.model.vo.UserAnnouncementPageVO;
|
||||
import com.hccake.ballcat.notify.service.UserAnnouncementService;
|
||||
import com.hccake.ballcat.common.security.util.SecurityUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -21,7 +21,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/notify/user-announcement")
|
||||
@Api(value = "user-announcement", tags = "用户公告表管理")
|
||||
@Tag(name = "用户公告表管理")
|
||||
public class UserAnnouncementController {
|
||||
|
||||
private final UserAnnouncementService userAnnouncementService;
|
||||
@@ -32,17 +32,17 @@ public class UserAnnouncementController {
|
||||
* @param userAnnouncementQO 用户公告表查询对象
|
||||
* @return R 通用返回体
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@per.hasPermission('notify:userannouncement:read')")
|
||||
@Operation(summary = "分页查询", description = "分页查询")
|
||||
public R<PageResult<UserAnnouncementPageVO>> getUserAnnouncementPage(PageParam pageParam,
|
||||
UserAnnouncementQO userAnnouncementQO) {
|
||||
return R.ok(userAnnouncementService.queryPage(pageParam, userAnnouncementQO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "用户公告已读上报", notes = "用户公告已读上报")
|
||||
@PatchMapping("/read/{announcementId}")
|
||||
@PreAuthorize("@per.hasPermission('notify:userannouncement:read')")
|
||||
@Operation(summary = "用户公告已读上报", description = "用户公告已读上报")
|
||||
public R<?> readAnnouncement(@PathVariable("announcementId") Long announcementId) {
|
||||
Integer userId = SecurityUtils.getUser().getUserId();
|
||||
userAnnouncementService.readAnnouncement(userId, announcementId);
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<groupId>io.swagger.core.v3</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.hccake.ballcat.notify.model.domain;
|
||||
|
||||
import com.hccake.ballcat.notify.enums.NotifyChannelEnum;
|
||||
import com.hccake.ballcat.notify.enums.NotifyRecipientFilterTypeEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@@ -17,57 +17,58 @@ import java.util.List;
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@Schema(title = "公告通知信息")
|
||||
public class AnnouncementNotifyInfo implements NotifyInfo {
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@ApiModelProperty(value = "公告ID")
|
||||
@Schema(title = "公告ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@ApiModelProperty(value = "标题")
|
||||
@Schema(title = "标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
@ApiModelProperty(value = "内容")
|
||||
@Schema(title = "内容")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 接收人筛选方式
|
||||
* @see NotifyRecipientFilterTypeEnum
|
||||
*/
|
||||
@ApiModelProperty(value = "接收人筛选方式")
|
||||
@Schema(title = "接收人筛选方式")
|
||||
private Integer recipientFilterType;
|
||||
|
||||
/**
|
||||
* 对应接收人筛选方式的条件信息
|
||||
*/
|
||||
@ApiModelProperty(value = "对应接收人筛选方式的条件信息")
|
||||
@Schema(title = "对应接收人筛选方式的条件信息")
|
||||
private List<Object> recipientFilterCondition;
|
||||
|
||||
/**
|
||||
* 接收方式,值与通知渠道一一对应
|
||||
* @see NotifyChannelEnum
|
||||
*/
|
||||
@ApiModelProperty(value = "接收方式")
|
||||
@Schema(title = "接收方式")
|
||||
private List<Integer> receiveMode;
|
||||
|
||||
/**
|
||||
* 永久有效的
|
||||
* @see com.hccake.ballcat.common.core.constant.enums.BooleanEnum
|
||||
*/
|
||||
@ApiModelProperty(value = "永久有效的")
|
||||
@Schema(title = "永久有效的")
|
||||
private Integer immortal;
|
||||
|
||||
/**
|
||||
* 截止日期
|
||||
*/
|
||||
@ApiModelProperty(value = "截止日期")
|
||||
@Schema(title = "截止日期")
|
||||
private LocalDateTime deadline;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.hccake.ballcat.notify.model.dto;
|
||||
|
||||
import com.hccake.ballcat.notify.enums.NotifyChannelEnum;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
@@ -16,7 +16,7 @@ import java.util.List;
|
||||
* @author hccake 2020-12-15 17:01:15
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "公告信息")
|
||||
@Schema(title = "公告信息")
|
||||
public class AnnouncementDTO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -24,60 +24,60 @@ public class AnnouncementDTO {
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@ApiModelProperty(value = "ID")
|
||||
@Schema(title = "ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@NotBlank(message = "标题不能为空")
|
||||
@ApiModelProperty(value = "标题")
|
||||
@Schema(title = "标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
@NotBlank(message = "内容不能为空")
|
||||
@ApiModelProperty(value = "内容")
|
||||
@Schema(title = "内容")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 接收人筛选方式,1:全部 2:用户角色 3:组织机构 4:用户类型 5:自定义用户
|
||||
*/
|
||||
@NotNull(message = "接收人范围不能为空")
|
||||
@ApiModelProperty(value = "接收人范围")
|
||||
@Schema(title = "接收人范围")
|
||||
private Integer recipientFilterType;
|
||||
|
||||
/**
|
||||
* 对应接收人筛选方式的条件信息,多个用逗号分割。如角色标识,组织ID,用户类型,用户ID等
|
||||
*/
|
||||
@ApiModelProperty(value = "对应接收人筛选方式的条件信息。如角色标识,组织ID,用户类型,用户ID等")
|
||||
@Schema(title = "对应接收人筛选方式的条件信息。如角色标识,组织ID,用户类型,用户ID等")
|
||||
private List<Object> recipientFilterCondition;
|
||||
|
||||
/**
|
||||
* 接收方式,值与通知渠道一一对应
|
||||
* @see NotifyChannelEnum
|
||||
*/
|
||||
@ApiModelProperty(value = "接收方式")
|
||||
@Schema(title = "接收方式")
|
||||
private List<Integer> receiveMode;
|
||||
|
||||
/**
|
||||
* 永久有效的
|
||||
* @see com.hccake.ballcat.common.core.constant.enums.BooleanEnum
|
||||
*/
|
||||
@ApiModelProperty(value = "永久有效的")
|
||||
@Schema(title = "永久有效的")
|
||||
private Integer immortal;
|
||||
|
||||
/**
|
||||
* 截止日期
|
||||
*/
|
||||
@ApiModelProperty(value = "截止日期")
|
||||
@Schema(title = "截止日期")
|
||||
private LocalDateTime deadline;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@ApiModelProperty(value = "状态")
|
||||
@Schema(title = "状态")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@ import com.hccake.ballcat.notify.enums.AnnouncementStatusEnum;
|
||||
import com.hccake.ballcat.notify.enums.NotifyChannelEnum;
|
||||
import com.hccake.ballcat.notify.enums.NotifyRecipientFilterTypeEnum;
|
||||
import com.hccake.extend.mybatis.plus.alias.TableAlias;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -26,7 +26,7 @@ import java.util.List;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableAlias(Announcement.TABLE_ALIAS)
|
||||
@TableName(value = "notify_announcement", autoResultMap = true)
|
||||
@ApiModel(value = "公告信息")
|
||||
@Schema(title = "公告信息")
|
||||
public class Announcement extends LogicDeletedBaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -37,61 +37,61 @@ public class Announcement extends LogicDeletedBaseEntity {
|
||||
* ID
|
||||
*/
|
||||
@TableId
|
||||
@ApiModelProperty(value = "ID")
|
||||
@Schema(title = "ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@ApiModelProperty(value = "标题")
|
||||
@Schema(title = "标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
@ApiModelProperty(value = "内容")
|
||||
@Schema(title = "内容")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 接收人筛选方式
|
||||
* @see NotifyRecipientFilterTypeEnum
|
||||
*/
|
||||
@ApiModelProperty(value = "接收人筛选方式")
|
||||
@Schema(title = "接收人筛选方式")
|
||||
private Integer recipientFilterType;
|
||||
|
||||
/**
|
||||
* 对应接收人筛选方式的条件信息,多个用逗号分割。如角色标识,组织ID,用户类型,用户ID等
|
||||
*/
|
||||
@ApiModelProperty(value = "对应接收人筛选方式的条件信息。如角色标识,组织ID,用户类型,用户ID等")
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
@Schema(title = "对应接收人筛选方式的条件信息。如角色标识,组织ID,用户类型,用户ID等")
|
||||
private List<Object> recipientFilterCondition;
|
||||
|
||||
/**
|
||||
* 接收方式,值与通知渠道一一对应
|
||||
* @see NotifyChannelEnum
|
||||
*/
|
||||
@ApiModelProperty(value = "接收方式")
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
@Schema(title = "接收方式")
|
||||
private List<Integer> receiveMode;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
* @see AnnouncementStatusEnum
|
||||
*/
|
||||
@ApiModelProperty(value = "状态")
|
||||
@Schema(title = "状态")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 永久有效的
|
||||
* @see com.hccake.ballcat.common.core.constant.enums.BooleanEnum
|
||||
*/
|
||||
@ApiModelProperty(value = "永久有效的")
|
||||
@Schema(title = "永久有效的")
|
||||
private Integer immortal;
|
||||
|
||||
/**
|
||||
* 截止日期
|
||||
*/
|
||||
@ApiModelProperty(value = "截止日期")
|
||||
@Schema(title = "截止日期")
|
||||
private LocalDateTime deadline;
|
||||
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.hccake.extend.mybatis.plus.alias.TableAlias;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@@ -19,7 +19,7 @@ import java.time.LocalDateTime;
|
||||
@Data
|
||||
@TableAlias(UserAnnouncement.TABLE_ALIAS)
|
||||
@TableName("notify_user_announcement")
|
||||
@ApiModel(value = "用户公告表")
|
||||
@Schema(title = "用户公告表")
|
||||
public class UserAnnouncement {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -30,38 +30,38 @@ public class UserAnnouncement {
|
||||
* ID
|
||||
*/
|
||||
@TableId
|
||||
@ApiModelProperty(value = "ID")
|
||||
@Schema(title = "ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 公告id
|
||||
*/
|
||||
@ApiModelProperty(value = "公告id")
|
||||
@Schema(title = "公告id")
|
||||
private Long announcementId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@Schema(title = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
/**
|
||||
* 状态,已读(1)|未读(0)
|
||||
*/
|
||||
@ApiModelProperty(value = "状态,已读(1)|未读(0)")
|
||||
@Schema(title = "状态,已读(1)|未读(0)")
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 阅读时间
|
||||
*/
|
||||
@ApiModelProperty(value = "阅读时间")
|
||||
@Schema(title = "阅读时间")
|
||||
private LocalDateTime readTime;
|
||||
|
||||
/**
|
||||
* 拉取时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "拉取时间")
|
||||
@Schema(title = "拉取时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.hccake.ballcat.notify.model.qo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -10,7 +10,7 @@ import lombok.Data;
|
||||
* @author hccake 2020-12-15 17:01:15
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "公告信息查询对象")
|
||||
@Schema(title = "公告信息查询对象")
|
||||
public class AnnouncementQO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -18,17 +18,17 @@ public class AnnouncementQO {
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@ApiModelProperty(value = "标题")
|
||||
@Schema(title = "标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 接收人筛选方式
|
||||
* @see NotifyRecipientFilterTypeEnum
|
||||
*/
|
||||
@ApiModelProperty(value = "接收人筛选方式")
|
||||
@Schema(title = "接收人筛选方式")
|
||||
private Integer recipientFilterType;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
@Schema(title = "状态")
|
||||
private Integer[] status;
|
||||
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.hccake.ballcat.notify.model.qo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springdoc.api.annotations.ParameterObject;
|
||||
|
||||
/**
|
||||
* 用户公告表 查询对象
|
||||
@@ -10,7 +11,8 @@ import lombok.Data;
|
||||
* @author hccake 2020-12-25 08:04:53
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "用户公告表查询对象")
|
||||
@Schema(title = "用户公告表查询对象")
|
||||
@ParameterObject
|
||||
public class UserAnnouncementQO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -18,7 +20,7 @@ public class UserAnnouncementQO {
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@ApiModelProperty(value = "ID")
|
||||
@Schema(title = "ID")
|
||||
private Long id;
|
||||
|
||||
}
|
||||
@@ -5,8 +5,8 @@ import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import com.hccake.ballcat.notify.enums.NotifyChannelEnum;
|
||||
import com.hccake.ballcat.notify.enums.NotifyRecipientFilterTypeEnum;
|
||||
import com.hccake.ballcat.notify.enums.AnnouncementStatusEnum;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@@ -18,7 +18,7 @@ import java.util.List;
|
||||
* @author hccake 2020-12-15 17:01:15
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "公告信息分页VO")
|
||||
@Schema(title = "公告信息分页VO")
|
||||
public class AnnouncementPageVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -26,85 +26,85 @@ public class AnnouncementPageVO {
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@ApiModelProperty(value = "ID")
|
||||
@Schema(title = "ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@ApiModelProperty(value = "标题")
|
||||
@Schema(title = "标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
@ApiModelProperty(value = "内容")
|
||||
@Schema(title = "内容")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 接收人筛选方式,1:全部 2:用户角色 3:组织机构 4:用户类型 5:自定义用户
|
||||
* @see NotifyRecipientFilterTypeEnum
|
||||
*/
|
||||
@ApiModelProperty(value = "接收人筛选方式")
|
||||
@Schema(title = "接收人筛选方式")
|
||||
private Integer recipientFilterType;
|
||||
|
||||
/**
|
||||
* 对应接收人筛选方式的条件信息,多个用逗号分割。如角色标识,组织ID,用户类型,用户ID等
|
||||
*/
|
||||
@ApiModelProperty(value = "对应接收人筛选方式的条件信息。如角色标识,组织ID,用户类型,用户ID等")
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
@Schema(title = "对应接收人筛选方式的条件信息。如角色标识,组织ID,用户类型,用户ID等")
|
||||
private List<Object> recipientFilterCondition;
|
||||
|
||||
/**
|
||||
* 接收方式,值与通知渠道一一对应
|
||||
* @see NotifyChannelEnum
|
||||
*/
|
||||
@ApiModelProperty(value = "接收方式")
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
@Schema(title = "接收方式")
|
||||
private List<Integer> receiveMode;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
* @see AnnouncementStatusEnum
|
||||
*/
|
||||
@ApiModelProperty(value = "状态")
|
||||
@Schema(title = "状态")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 永久有效的
|
||||
* @see com.hccake.ballcat.common.core.constant.enums.BooleanEnum
|
||||
*/
|
||||
@ApiModelProperty(value = "永久有效的")
|
||||
@Schema(title = "永久有效的")
|
||||
private Integer immortal;
|
||||
|
||||
/**
|
||||
* 截止日期
|
||||
*/
|
||||
@ApiModelProperty(value = "截止日期")
|
||||
@Schema(title = "截止日期")
|
||||
private LocalDateTime deadline;
|
||||
|
||||
/**
|
||||
* 创建人ID
|
||||
*/
|
||||
@ApiModelProperty(value = "创建人ID")
|
||||
@Schema(title = "创建人ID")
|
||||
private Integer createBy;
|
||||
|
||||
/**
|
||||
* 创建人名称
|
||||
*/
|
||||
@ApiModelProperty(value = "创建人名称")
|
||||
@Schema(title = "创建人名称")
|
||||
private String createUsername;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@Schema(title = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
@Schema(title = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.hccake.ballcat.notify.model.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@@ -12,7 +12,7 @@ import java.time.LocalDateTime;
|
||||
* @author hccake 2020-12-25 08:04:53
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "用户公告分页VO")
|
||||
@Schema(title = "用户公告分页VO")
|
||||
public class UserAnnouncementPageVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -20,37 +20,37 @@ public class UserAnnouncementPageVO {
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@ApiModelProperty(value = "ID")
|
||||
@Schema(title = "ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 公告id
|
||||
*/
|
||||
@ApiModelProperty(value = "公告id")
|
||||
@Schema(title = "公告id")
|
||||
private Long announcementId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@Schema(title = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
/**
|
||||
* 状态,已读(1)|未读(0)
|
||||
*/
|
||||
@ApiModelProperty(value = "状态,已读(1)|未读(0)")
|
||||
@Schema(title = "状态,已读(1)|未读(0)")
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 阅读时间
|
||||
*/
|
||||
@ApiModelProperty(value = "阅读时间")
|
||||
@Schema(title = "阅读时间")
|
||||
private LocalDateTime readTime;
|
||||
|
||||
/**
|
||||
* 拉取时间
|
||||
*/
|
||||
@ApiModelProperty(value = "拉取时间")
|
||||
@Schema(title = "拉取时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -1,20 +1,27 @@
|
||||
package com.hccake.ballcat.system.controller;
|
||||
|
||||
import com.hccake.ballcat.system.model.entity.SysConfig;
|
||||
import com.hccake.ballcat.system.model.qo.SysConfigQO;
|
||||
import com.hccake.ballcat.system.model.vo.SysConfigPageVO;
|
||||
import com.hccake.ballcat.system.service.SysConfigService;
|
||||
import com.hccake.ballcat.common.log.operation.annotation.CreateOperationLogging;
|
||||
import com.hccake.ballcat.common.log.operation.annotation.DeleteOperationLogging;
|
||||
import com.hccake.ballcat.common.log.operation.annotation.UpdateOperationLogging;
|
||||
import com.hccake.ballcat.common.model.domain.PageParam;
|
||||
import com.hccake.ballcat.common.model.domain.PageResult;
|
||||
import com.hccake.ballcat.common.model.result.R;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.hccake.ballcat.system.model.entity.SysConfig;
|
||||
import com.hccake.ballcat.system.model.qo.SysConfigQO;
|
||||
import com.hccake.ballcat.system.model.vo.SysConfigPageVO;
|
||||
import com.hccake.ballcat.system.service.SysConfigService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 系统配置
|
||||
@@ -25,7 +32,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/system/config")
|
||||
@Api(value = "system-config", tags = "系统配置")
|
||||
@Tag(name = "系统配置")
|
||||
public class SysConfigController {
|
||||
|
||||
private final SysConfigService sysConfigService;
|
||||
@@ -36,9 +43,9 @@ public class SysConfigController {
|
||||
* @param sysConfigQO 系统配置
|
||||
* @return R<PageResult<SysConfigVO>>
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@per.hasPermission('system:config:read')")
|
||||
@Operation(summary = "分页查询", description = "分页查询")
|
||||
public R<PageResult<SysConfigPageVO>> getSysConfigPage(PageParam pageParam, SysConfigQO sysConfigQO) {
|
||||
return R.ok(sysConfigService.queryPage(pageParam, sysConfigQO));
|
||||
}
|
||||
@@ -48,10 +55,10 @@ public class SysConfigController {
|
||||
* @param sysConfig 系统配置
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增系统配置", notes = "新增系统配置")
|
||||
@CreateOperationLogging(msg = "新增系统配置")
|
||||
@PostMapping
|
||||
@PreAuthorize("@per.hasPermission('system:config:add')")
|
||||
@Operation(summary = "新增系统配置", description = "新增系统配置")
|
||||
public R save(@RequestBody SysConfig sysConfig) {
|
||||
return R.ok(sysConfigService.save(sysConfig));
|
||||
}
|
||||
@@ -61,10 +68,10 @@ public class SysConfigController {
|
||||
* @param sysConfig 系统配置
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改系统配置")
|
||||
@UpdateOperationLogging(msg = "修改系统配置")
|
||||
@PutMapping
|
||||
@PreAuthorize("@per.hasPermission('system:config:edit')")
|
||||
@Operation(summary = "修改系统配置")
|
||||
public R updateById(@RequestBody SysConfig sysConfig) {
|
||||
return R.ok(sysConfigService.updateByKey(sysConfig));
|
||||
}
|
||||
@@ -74,10 +81,10 @@ public class SysConfigController {
|
||||
* @param confKey confKey
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "删除系统配置")
|
||||
@DeleteOperationLogging(msg = "删除系统配置")
|
||||
@DeleteMapping
|
||||
@PreAuthorize("@per.hasPermission('system:config:del')")
|
||||
@Operation(summary = "删除系统配置")
|
||||
public R removeById(@RequestParam("confKey") String confKey) {
|
||||
return R.ok(sysConfigService.removeByKey(confKey));
|
||||
}
|
||||
|
||||
@@ -14,8 +14,8 @@ import com.hccake.ballcat.system.model.qo.SysDictQO;
|
||||
import com.hccake.ballcat.system.model.vo.DictDataVO;
|
||||
import com.hccake.ballcat.system.model.vo.SysDictItemPageVO;
|
||||
import com.hccake.ballcat.system.model.vo.SysDictPageVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -32,7 +32,7 @@ import java.util.Map;
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/system/dict")
|
||||
@Api(value = "system-dict", tags = "字典表管理")
|
||||
@Tag(name = "字典表管理")
|
||||
public class SysDictController {
|
||||
|
||||
private final SysDictManager sysDictManager;
|
||||
@@ -63,9 +63,9 @@ public class SysDictController {
|
||||
* @param sysDictQO 字典查询参数
|
||||
* @return R<PageResult<SysDictVO>>
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@per.hasPermission('system:dict:read')")
|
||||
@Operation(summary = "分页查询", description = "分页查询")
|
||||
public R<PageResult<SysDictPageVO>> getSysDictPage(PageParam pageParam, SysDictQO sysDictQO) {
|
||||
return R.ok(sysDictManager.dictPage(pageParam, sysDictQO));
|
||||
}
|
||||
@@ -75,10 +75,10 @@ public class SysDictController {
|
||||
* @param sysDict 字典表
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增字典表", notes = "新增字典表")
|
||||
@CreateOperationLogging(msg = "新增字典表")
|
||||
@PostMapping
|
||||
@PreAuthorize("@per.hasPermission('system:dict:add')")
|
||||
@Operation(summary = "新增字典表", description = "新增字典表")
|
||||
public R<?> save(@RequestBody SysDict sysDict) {
|
||||
return sysDictManager.dictSave(sysDict) ? R.ok() : R.failed(BaseResultCode.UPDATE_DATABASE_ERROR, "新增字典表失败");
|
||||
}
|
||||
@@ -88,10 +88,10 @@ public class SysDictController {
|
||||
* @param sysDict 字典表
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改字典表", notes = "修改字典表")
|
||||
@UpdateOperationLogging(msg = "修改字典表")
|
||||
@PutMapping
|
||||
@PreAuthorize("@per.hasPermission('system:dict:edit')")
|
||||
@Operation(summary = "修改字典表", description = "修改字典表")
|
||||
public R<?> updateById(@RequestBody SysDict sysDict) {
|
||||
return sysDictManager.updateDictById(sysDict) ? R.ok()
|
||||
: R.failed(BaseResultCode.UPDATE_DATABASE_ERROR, "修改字典表失败");
|
||||
@@ -102,10 +102,10 @@ public class SysDictController {
|
||||
* @param id id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除字典表", notes = "通过id删除字典表")
|
||||
@DeleteOperationLogging(msg = "通过id删除字典表")
|
||||
@DeleteMapping("/{id}")
|
||||
@PreAuthorize("@per.hasPermission('system:dict:del')")
|
||||
@Operation(summary = "通过id删除字典表", description = "通过id删除字典表")
|
||||
public R<?> removeById(@PathVariable("id") Integer id) {
|
||||
return sysDictManager.removeDictById(id) ? R.ok()
|
||||
: R.failed(BaseResultCode.UPDATE_DATABASE_ERROR, "通过id删除字典表失败");
|
||||
@@ -117,9 +117,9 @@ public class SysDictController {
|
||||
* @param dictCode 字典标识
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/item/page")
|
||||
@PreAuthorize("@per.hasPermission('system:dict:read')")
|
||||
@Operation(summary = "分页查询", description = "分页查询")
|
||||
public R<PageResult<SysDictItemPageVO>> getSysDictItemPage(PageParam pageParam,
|
||||
@RequestParam("dictCode") String dictCode) {
|
||||
return R.ok(sysDictManager.dictItemPage(pageParam, dictCode));
|
||||
@@ -130,10 +130,10 @@ public class SysDictController {
|
||||
* @param sysDictItem 字典项
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增字典项", notes = "新增字典项")
|
||||
@CreateOperationLogging(msg = "新增字典项")
|
||||
@PostMapping("item")
|
||||
@PreAuthorize("@per.hasPermission('system:dict:add')")
|
||||
@Operation(summary = "新增字典项", description = "新增字典项")
|
||||
public R<?> saveItem(@RequestBody SysDictItem sysDictItem) {
|
||||
return sysDictManager.saveDictItem(sysDictItem) ? R.ok()
|
||||
: R.failed(BaseResultCode.UPDATE_DATABASE_ERROR, "新增字典项失败");
|
||||
@@ -144,10 +144,10 @@ public class SysDictController {
|
||||
* @param sysDictItem 字典项
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改字典项", notes = "修改字典项")
|
||||
@UpdateOperationLogging(msg = "修改字典项")
|
||||
@PutMapping("item")
|
||||
@PreAuthorize("@per.hasPermission('system:dict:edit')")
|
||||
@Operation(summary = "修改字典项", description = "修改字典项")
|
||||
public R<?> updateItemById(@RequestBody SysDictItem sysDictItem) {
|
||||
return sysDictManager.updateDictItemById(sysDictItem) ? R.ok()
|
||||
: R.failed(BaseResultCode.UPDATE_DATABASE_ERROR, "修改字典项失败");
|
||||
@@ -158,10 +158,10 @@ public class SysDictController {
|
||||
* @param id id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除字典项", notes = "通过id删除字典项")
|
||||
@DeleteOperationLogging(msg = "通过id删除字典项")
|
||||
@DeleteMapping("/item/{id}")
|
||||
@PreAuthorize("@per.hasPermission('system:dict:del')")
|
||||
@Operation(summary = "通过id删除字典项", description = "通过id删除字典项")
|
||||
public R<?> removeItemById(@PathVariable("id") Integer id) {
|
||||
return sysDictManager.removeDictItemById(id) ? R.ok()
|
||||
: R.failed(BaseResultCode.UPDATE_DATABASE_ERROR, "通过id删除字典项失败");
|
||||
|
||||
@@ -19,8 +19,8 @@ import com.hccake.ballcat.system.model.vo.SysMenuGrantVO;
|
||||
import com.hccake.ballcat.system.model.vo.SysMenuPageVO;
|
||||
import com.hccake.ballcat.system.model.vo.SysMenuRouterVO;
|
||||
import com.hccake.ballcat.system.service.SysMenuService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
@@ -50,7 +50,7 @@ import java.util.stream.Collectors;
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/system/menu")
|
||||
@Api(value = "system-menu", tags = "菜单权限管理")
|
||||
@Tag(name = "菜单权限管理")
|
||||
public class SysMenuController {
|
||||
|
||||
private final SysMenuService sysMenuService;
|
||||
@@ -59,8 +59,8 @@ public class SysMenuController {
|
||||
* 返回当前用户的路由集合
|
||||
* @return 当前用户的路由
|
||||
*/
|
||||
@ApiOperation(value = "动态路由", notes = "动态路由")
|
||||
@GetMapping("/router")
|
||||
@Operation(summary = "动态路由", description = "动态路由")
|
||||
public R<List<SysMenuRouterVO>> getUserPermission() {
|
||||
// 获取角色Code
|
||||
User user = SecurityUtils.getUser();
|
||||
@@ -95,9 +95,9 @@ public class SysMenuController {
|
||||
* @param sysMenuQO 菜单权限查询对象
|
||||
* @return R 通用返回体
|
||||
*/
|
||||
@ApiOperation(value = "查询菜单列表", notes = "查询菜单列表")
|
||||
@GetMapping("/list")
|
||||
@PreAuthorize("@per.hasPermission('system:menu:read')")
|
||||
@Operation(summary = "查询菜单列表", description = "查询菜单列表")
|
||||
public R<List<SysMenuPageVO>> getSysMenuPage(SysMenuQO sysMenuQO) {
|
||||
List<SysMenu> sysMenus = sysMenuService.listOrderBySort(sysMenuQO);
|
||||
if (CollectionUtil.isEmpty(sysMenus)) {
|
||||
@@ -112,9 +112,9 @@ public class SysMenuController {
|
||||
* 查询授权菜单列表
|
||||
* @return R 通用返回体
|
||||
*/
|
||||
@ApiOperation(value = "查询授权菜单列表", notes = "查询授权菜单列表")
|
||||
@GetMapping("/grant-list")
|
||||
@PreAuthorize("@per.hasPermission('system:menu:read')")
|
||||
@Operation(summary = "查询授权菜单列表", description = "查询授权菜单列表")
|
||||
public R<List<SysMenuGrantVO>> getSysMenuGrantList() {
|
||||
List<SysMenu> sysMenus = sysMenuService.list();
|
||||
if (CollectionUtil.isEmpty(sysMenus)) {
|
||||
@@ -130,10 +130,10 @@ public class SysMenuController {
|
||||
* @param sysMenuCreateDTO 菜单权限
|
||||
* @return R 通用返回体
|
||||
*/
|
||||
@ApiOperation(value = "新增菜单权限", notes = "新增菜单权限")
|
||||
@CreateOperationLogging(msg = "新增菜单权限")
|
||||
@PostMapping
|
||||
@PreAuthorize("@per.hasPermission('system:menu:add')")
|
||||
@Operation(summary = "新增菜单权限", description = "新增菜单权限")
|
||||
public R<String> save(@Valid @RequestBody SysMenuCreateDTO sysMenuCreateDTO) {
|
||||
return sysMenuService.create(sysMenuCreateDTO) ? R.ok()
|
||||
: R.failed(BaseResultCode.UPDATE_DATABASE_ERROR, "新增菜单权限失败");
|
||||
@@ -144,10 +144,10 @@ public class SysMenuController {
|
||||
* @param sysMenuUpdateDTO 菜单权限修改DTO
|
||||
* @return R 通用返回体
|
||||
*/
|
||||
@ApiOperation(value = "修改菜单权限", notes = "修改菜单权限")
|
||||
@UpdateOperationLogging(msg = "修改菜单权限")
|
||||
@PutMapping
|
||||
@PreAuthorize("@per.hasPermission('system:menu:edit')")
|
||||
@Operation(summary = "修改菜单权限", description = "修改菜单权限")
|
||||
public R<String> updateById(@RequestBody SysMenuUpdateDTO sysMenuUpdateDTO) {
|
||||
sysMenuService.update(sysMenuUpdateDTO);
|
||||
return R.ok();
|
||||
@@ -158,10 +158,10 @@ public class SysMenuController {
|
||||
* @param id id
|
||||
* @return R 通用返回体
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除菜单权限", notes = "通过id删除菜单权限")
|
||||
@DeleteOperationLogging(msg = "通过id删除菜单权限")
|
||||
@DeleteMapping("/{id}")
|
||||
@PreAuthorize("@per.hasPermission('system:menu:del')")
|
||||
@Operation(summary = "通过id删除菜单权限", description = "通过id删除菜单权限")
|
||||
public R<String> removeById(@PathVariable("id") Integer id) {
|
||||
return sysMenuService.removeById(id) ? R.ok() : R.failed(BaseResultCode.UPDATE_DATABASE_ERROR, "通过id删除菜单权限失败");
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@ import com.hccake.ballcat.common.log.operation.annotation.DeleteOperationLogging
|
||||
import com.hccake.ballcat.common.log.operation.annotation.UpdateOperationLogging;
|
||||
import com.hccake.ballcat.common.model.result.BaseResultCode;
|
||||
import com.hccake.ballcat.common.model.result.R;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -25,7 +25,7 @@ import java.util.List;
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/system/organization")
|
||||
@Api(value = "system-organization", tags = "组织架构管理")
|
||||
@Tag(name = "组织架构管理")
|
||||
public class SysOrganizationController {
|
||||
|
||||
private final SysOrganizationService sysOrganizationService;
|
||||
@@ -35,9 +35,9 @@ public class SysOrganizationController {
|
||||
* @param qo 组织机构查询条件
|
||||
* @return R 通用返回体
|
||||
*/
|
||||
@ApiOperation(value = "组织架构树查询")
|
||||
@GetMapping("/tree")
|
||||
@PreAuthorize("@per.hasPermission('system:organization:read')")
|
||||
@Operation(summary = "组织架构树查询")
|
||||
public R<List<SysOrganizationTree>> getOrganizationTree(SysOrganizationQO qo) {
|
||||
return R.ok(sysOrganizationService.listTree(qo));
|
||||
}
|
||||
@@ -47,10 +47,10 @@ public class SysOrganizationController {
|
||||
* @param sysOrganizationDTO 组织机构DTO
|
||||
* @return R 通用返回体
|
||||
*/
|
||||
@ApiOperation(value = "新增组织架构")
|
||||
@CreateOperationLogging(msg = "新增组织架构")
|
||||
@PostMapping
|
||||
@PreAuthorize("@per.hasPermission('system:organization:add')")
|
||||
@Operation(summary = "新增组织架构")
|
||||
public R<?> save(@RequestBody SysOrganizationDTO sysOrganizationDTO) {
|
||||
return sysOrganizationService.create(sysOrganizationDTO) ? R.ok()
|
||||
: R.failed(BaseResultCode.UPDATE_DATABASE_ERROR, "新增组织架构失败");
|
||||
@@ -61,10 +61,10 @@ public class SysOrganizationController {
|
||||
* @param sysOrganizationDTO 组织机构DTO
|
||||
* @return R 通用返回体
|
||||
*/
|
||||
@ApiOperation(value = "修改组织架构")
|
||||
@UpdateOperationLogging(msg = "修改组织架构")
|
||||
@PutMapping
|
||||
@PreAuthorize("@per.hasPermission('system:organization:edit')")
|
||||
@Operation(summary = "修改组织架构")
|
||||
public R<?> updateById(@RequestBody SysOrganizationDTO sysOrganizationDTO) {
|
||||
return sysOrganizationService.update(sysOrganizationDTO) ? R.ok()
|
||||
: R.failed(BaseResultCode.UPDATE_DATABASE_ERROR, "修改组织架构失败");
|
||||
@@ -75,10 +75,10 @@ public class SysOrganizationController {
|
||||
* @param id id
|
||||
* @return R 通用返回体
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除组织架构")
|
||||
@DeleteOperationLogging(msg = "通过id删除组织架构")
|
||||
@DeleteMapping("/{id}")
|
||||
@PreAuthorize("@per.hasPermission('system:organization:del')")
|
||||
@Operation(summary = "通过id删除组织架构")
|
||||
public R<?> removeById(@PathVariable("id") Integer id) {
|
||||
return sysOrganizationService.removeById(id) ? R.ok()
|
||||
: R.failed(BaseResultCode.UPDATE_DATABASE_ERROR, "通过id删除组织架构失败");
|
||||
@@ -88,10 +88,10 @@ public class SysOrganizationController {
|
||||
* 校正组织机构层级和深度
|
||||
* @return R 通用返回体
|
||||
*/
|
||||
@ApiOperation(value = "校正组织机构层级和深度")
|
||||
@UpdateOperationLogging(msg = "校正组织机构层级和深度")
|
||||
@PatchMapping("/revised")
|
||||
@PreAuthorize("@per.hasPermission('system:organization:revised')")
|
||||
@Operation(summary = "校正组织机构层级和深度")
|
||||
public R<?> revisedHierarchyAndPath() {
|
||||
return sysOrganizationService.revisedHierarchyAndPath() ? R.ok()
|
||||
: R.failed(BaseResultCode.UPDATE_DATABASE_ERROR, "校正组织机构层级和深度失败");
|
||||
|
||||
@@ -21,8 +21,8 @@ import com.hccake.ballcat.system.service.SysMenuService;
|
||||
import com.hccake.ballcat.system.service.SysRoleMenuService;
|
||||
import com.hccake.ballcat.system.service.SysRoleService;
|
||||
import com.hccake.ballcat.system.service.SysUserRoleService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -36,8 +36,8 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/role")
|
||||
@Api(value = "system-role", tags = "角色管理模块")
|
||||
@RequiredArgsConstructor
|
||||
@Tag(name = "角色管理模块")
|
||||
public class SysRoleController {
|
||||
|
||||
private final SysRoleService sysRoleService;
|
||||
@@ -75,10 +75,10 @@ public class SysRoleController {
|
||||
* @param sysRole 系统角色表
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增系统角色", notes = "新增系统角色")
|
||||
@CreateOperationLogging(msg = "新增系统角色")
|
||||
@PostMapping
|
||||
@PreAuthorize("@per.hasPermission('system:role:add')")
|
||||
@Operation(summary = "新增系统角色", description = "新增系统角色")
|
||||
public R<Boolean> save(@Valid @RequestBody SysRole sysRole) {
|
||||
return R.ok(sysRoleService.save(sysRole));
|
||||
}
|
||||
@@ -88,10 +88,10 @@ public class SysRoleController {
|
||||
* @param roleUpdateDTO 角色修改DTO
|
||||
* @return success/false
|
||||
*/
|
||||
@ApiOperation(value = "修改系统角色", notes = "修改系统角色")
|
||||
@UpdateOperationLogging(msg = "修改系统角色")
|
||||
@PutMapping
|
||||
@PreAuthorize("@per.hasPermission('system:role:edit')")
|
||||
@Operation(summary = "修改系统角色", description = "修改系统角色")
|
||||
public R<Boolean> update(@Valid @RequestBody SysRoleUpdateDTO roleUpdateDTO) {
|
||||
SysRole sysRole = SysRoleConverter.INSTANCE.dtoToPo(roleUpdateDTO);
|
||||
return R.ok(sysRoleService.updateById(sysRole));
|
||||
@@ -103,9 +103,9 @@ public class SysRoleController {
|
||||
* @return 结果信息
|
||||
*/
|
||||
@DeleteMapping("/{id}")
|
||||
@ApiOperation(value = "通过id删除系统角色", notes = "通过id删除系统角色")
|
||||
@DeleteOperationLogging(msg = "通过id删除系统角色")
|
||||
@PreAuthorize("@per.hasPermission('system:role:del')")
|
||||
@Operation(summary = "通过id删除系统角色", description = "通过id删除系统角色")
|
||||
public R<Boolean> removeById(@PathVariable("id") Integer id) {
|
||||
SysRole oldRole = sysRoleService.getById(id);
|
||||
if (SysRoleConst.Type.SYSTEM.getValue().equals(oldRole.getType())) {
|
||||
@@ -130,9 +130,9 @@ public class SysRoleController {
|
||||
* @return success、false
|
||||
*/
|
||||
@PutMapping("/permission/code/{roleCode}")
|
||||
@ApiOperation(value = "更新角色权限", notes = "更新角色权限")
|
||||
@UpdateOperationLogging(msg = "更新角色权限")
|
||||
@PreAuthorize("@per.hasPermission('system:role:grant')")
|
||||
@Operation(summary = "更新角色权限", description = "更新角色权限")
|
||||
public R<Boolean> savePermissionIds(@PathVariable("roleCode") String roleCode,
|
||||
@RequestBody Integer[] permissionIds) {
|
||||
return R.ok(sysRoleMenuService.saveRoleMenus(roleCode, permissionIds));
|
||||
@@ -165,8 +165,8 @@ public class SysRoleController {
|
||||
* @return R
|
||||
*/
|
||||
@GetMapping("/user/page")
|
||||
@ApiOperation(value = "查看已授权指定角色的用户列表", notes = "查看已授权指定角色的用户列表")
|
||||
@PreAuthorize("@per.hasPermission('system:role:grant')")
|
||||
@Operation(summary = "查看已授权指定角色的用户列表", description = "查看已授权指定角色的用户列表")
|
||||
public R<PageResult<RoleBindUserVO>> queryUserPageByRoleCode(PageParam pageParam,
|
||||
@Valid RoleBindUserQO roleBindUserQO) {
|
||||
return R.ok(sysUserRoleService.queryUserPageByRoleCode(pageParam, roleBindUserQO));
|
||||
@@ -177,8 +177,8 @@ public class SysRoleController {
|
||||
* @return R
|
||||
*/
|
||||
@DeleteMapping("/user")
|
||||
@ApiOperation(value = "解绑与用户绑定关系", notes = "解绑与用户绑定关系")
|
||||
@PreAuthorize("@per.hasPermission('system:role:grant')")
|
||||
@Operation(summary = "解绑与用户绑定关系", description = "解绑与用户绑定关系")
|
||||
public R<Boolean> unbindRoleUser(@RequestParam("userId") Integer userId,
|
||||
@RequestParam("roleCode") String roleCode) {
|
||||
return R.ok(sysUserRoleService.unbindRoleUser(userId, roleCode));
|
||||
|
||||
@@ -24,8 +24,8 @@ import com.hccake.ballcat.system.model.vo.SysUserInfo;
|
||||
import com.hccake.ballcat.system.model.vo.SysUserPageVO;
|
||||
import com.hccake.ballcat.system.service.SysUserRoleService;
|
||||
import com.hccake.ballcat.system.service.SysUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@@ -50,8 +50,8 @@ import java.util.List;
|
||||
@Validated
|
||||
@RestController
|
||||
@RequestMapping("/system/user")
|
||||
@Api(value = "system-user", tags = "用户管理模块")
|
||||
@RequiredArgsConstructor
|
||||
@Tag(name = "用户管理模块")
|
||||
public class SysUserController {
|
||||
|
||||
private final SysUserService sysUserService;
|
||||
@@ -65,9 +65,9 @@ public class SysUserController {
|
||||
* @param pageParam 参数集
|
||||
* @return 用户集合
|
||||
*/
|
||||
@ApiOperation(value = "分页查询系统用户")
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@per.hasPermission('system:user:read')")
|
||||
@Operation(summary = "分页查询系统用户")
|
||||
public R<PageResult<SysUserPageVO>> getUserPage(PageParam pageParam, SysUserQO qo) {
|
||||
return R.ok(sysUserService.queryPage(pageParam, qo));
|
||||
}
|
||||
@@ -76,9 +76,9 @@ public class SysUserController {
|
||||
* 获取用户Select
|
||||
* @return 用户SelectData
|
||||
*/
|
||||
@ApiOperation(value = "获取用户下拉列表数据")
|
||||
@GetMapping("/select")
|
||||
@PreAuthorize("@per.hasPermission('system:user:read')")
|
||||
@Operation(summary = "获取用户下拉列表数据")
|
||||
public R<List<SelectData<?>>> listSelectData(
|
||||
@RequestParam(value = "userTypes", required = false) List<Integer> userTypes) {
|
||||
return R.ok(sysUserService.listSelectData(userTypes));
|
||||
@@ -89,9 +89,9 @@ public class SysUserController {
|
||||
* @param userId 用户ID
|
||||
* @return SysUserInfo
|
||||
*/
|
||||
@ApiOperation(value = "获取指定用户的基本信息")
|
||||
@GetMapping("/{userId}")
|
||||
@PreAuthorize("@per.hasPermission('system:user:read')")
|
||||
@Operation(summary = "获取指定用户的基本信息")
|
||||
public R<SysUserInfo> getSysUserInfo(@PathVariable("userId") Integer userId) {
|
||||
SysUser sysUser = sysUserService.getById(userId);
|
||||
if (sysUser == null) {
|
||||
@@ -107,9 +107,9 @@ public class SysUserController {
|
||||
* @return success/false
|
||||
*/
|
||||
@PostMapping
|
||||
@ApiOperation(value = "新增系统用户", notes = "新增系统用户")
|
||||
@CreateOperationLogging(msg = "新增系统用户")
|
||||
@PreAuthorize("@per.hasPermission('system:user:add')")
|
||||
@Operation(summary = "新增系统用户", description = "新增系统用户")
|
||||
public R<?> addSysUser(@Valid @RequestBody SysUserDTO sysUserDTO) {
|
||||
SysUser user = sysUserService.getByUsername(sysUserDTO.getUsername());
|
||||
if (user != null) {
|
||||
@@ -128,9 +128,9 @@ public class SysUserController {
|
||||
* @return success/false
|
||||
*/
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改系统用户", notes = "修改系统用户")
|
||||
@UpdateOperationLogging(msg = "修改系统用户")
|
||||
@PreAuthorize("@per.hasPermission('system:user:edit')")
|
||||
@Operation(summary = "修改系统用户", description = "修改系统用户")
|
||||
public R<?> updateUserInfo(@Valid @RequestBody SysUserDTO sysUserDto) {
|
||||
return sysUserService.updateSysUser(sysUserDto) ? R.ok()
|
||||
: R.failed(BaseResultCode.UPDATE_DATABASE_ERROR, "修改系统用户失败");
|
||||
@@ -140,9 +140,9 @@ public class SysUserController {
|
||||
* 删除用户信息
|
||||
*/
|
||||
@DeleteMapping("/{userId}")
|
||||
@ApiOperation(value = "通过id删除系统用户", notes = "通过id删除系统用户")
|
||||
@DeleteOperationLogging(msg = "通过id删除系统用户")
|
||||
@PreAuthorize("@per.hasPermission('system:user:del')")
|
||||
@Operation(summary = "通过id删除系统用户", description = "通过id删除系统用户")
|
||||
public R<?> deleteByUserId(@PathVariable("userId") Integer userId) {
|
||||
return sysUserService.deleteByUserId(userId) ? R.ok()
|
||||
: R.failed(BaseResultCode.UPDATE_DATABASE_ERROR, "删除系统用户失败");
|
||||
@@ -175,9 +175,9 @@ public class SysUserController {
|
||||
* @return success/false
|
||||
*/
|
||||
@PutMapping("/scope/{userId}")
|
||||
@ApiOperation(value = "系统用户授权", notes = "系统用户授权")
|
||||
@UpdateOperationLogging(msg = "系统用户授权")
|
||||
@PreAuthorize("@per.hasPermission('system:user:grant')")
|
||||
@Operation(summary = "系统用户授权", description = "系统用户授权")
|
||||
public R<?> updateUserScope(@PathVariable("userId") Integer userId, @RequestBody SysUserScope sysUserScope) {
|
||||
return sysUserService.updateUserScope(userId, sysUserScope) ? R.ok()
|
||||
: R.failed(BaseResultCode.UPDATE_DATABASE_ERROR, "系统用户授权失败");
|
||||
@@ -187,9 +187,9 @@ public class SysUserController {
|
||||
* 修改用户密码
|
||||
*/
|
||||
@PutMapping("/pass/{userId}")
|
||||
@ApiOperation(value = "修改系统用户密码", notes = "修改系统用户密码")
|
||||
@UpdateOperationLogging(msg = "修改系统用户密码")
|
||||
@PreAuthorize("@per.hasPermission('system:user:pass')")
|
||||
@Operation(summary = "修改系统用户密码", description = "修改系统用户密码")
|
||||
public R<?> updateUserPass(@PathVariable("userId") Integer userId, @RequestBody SysUserPassDTO sysUserPassDTO) {
|
||||
String pass = sysUserPassDTO.getPass();
|
||||
if (!pass.equals(sysUserPassDTO.getConfirmPass())) {
|
||||
@@ -206,9 +206,9 @@ public class SysUserController {
|
||||
* 批量修改用户状态
|
||||
*/
|
||||
@PutMapping("/status")
|
||||
@ApiOperation(value = "批量修改用户状态", notes = "批量修改用户状态")
|
||||
@UpdateOperationLogging(msg = "批量修改用户状态")
|
||||
@PreAuthorize("@per.hasPermission('system:user:edit')")
|
||||
@Operation(summary = "批量修改用户状态", description = "批量修改用户状态")
|
||||
public R<?> updateUserStatus(@NotEmpty(message = "用户ID不能为空") @RequestBody List<Integer> userIds,
|
||||
@NotNull(message = "用户状态不能为空") @RequestParam("status") Integer status) {
|
||||
|
||||
@@ -220,10 +220,10 @@ public class SysUserController {
|
||||
: R.failed(BaseResultCode.UPDATE_DATABASE_ERROR, "批量修改用户状态!");
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改系统用户头像", notes = "修改系统用户头像")
|
||||
@UpdateOperationLogging(msg = "修改系统用户头像")
|
||||
@PreAuthorize("@per.hasPermission('system:user:edit')")
|
||||
@PostMapping("/avatar")
|
||||
@Operation(summary = "修改系统用户头像", description = "修改系统用户头像")
|
||||
public R<String> updateAvatar(@RequestParam("file") MultipartFile file, @RequestParam("userId") Integer userId) {
|
||||
String objectName;
|
||||
try {
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<artifactId>ballcat-extend-mybatis-plus</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<groupId>io.swagger.core.v3</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package com.hccake.ballcat.system.model.dto;
|
||||
|
||||
import com.hccake.ballcat.common.i18n.I18nMessage;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.Valid;
|
||||
@@ -15,7 +14,7 @@ import java.util.List;
|
||||
* @author hccake 2021-04-06 17:59:51
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "菜单权限新建的DTO")
|
||||
@Schema(title = "菜单权限新建的DTO")
|
||||
public class SysMenuCreateDTO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -24,87 +23,87 @@ public class SysMenuCreateDTO {
|
||||
* 菜单ID
|
||||
*/
|
||||
@NotNull(message = "id:{}")
|
||||
@ApiModelProperty(value = "菜单ID")
|
||||
@Schema(title = "菜单ID")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 父级ID
|
||||
*/
|
||||
@NotNull(message = "parentId:{}")
|
||||
@ApiModelProperty(value = "父级ID")
|
||||
@Schema(title = "父级ID")
|
||||
private Integer parentId;
|
||||
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
@ApiModelProperty(value = "菜单名称")
|
||||
@Schema(title = "菜单名称")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 菜单图标
|
||||
*/
|
||||
@ApiModelProperty(value = "菜单图标")
|
||||
@Schema(title = "菜单图标")
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 授权标识
|
||||
*/
|
||||
@ApiModelProperty(value = "授权标识")
|
||||
@Schema(title = "授权标识")
|
||||
private String permission;
|
||||
|
||||
/**
|
||||
* 路由地址
|
||||
*/
|
||||
@ApiModelProperty(value = "路由地址")
|
||||
@Schema(title = "路由地址")
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 打开方式 (1组件 2内链 3外链)
|
||||
*/
|
||||
@ApiModelProperty(value = "打开方式 (1组件 2内链 3外链)")
|
||||
@Schema(title = "打开方式 (1组件 2内链 3外链)")
|
||||
private Integer targetType;
|
||||
|
||||
/**
|
||||
* 定位标识 (打开方式为组件时其值为组件相对路径,其他为URL地址)
|
||||
*/
|
||||
@ApiModelProperty(value = "定位标识 (打开方式为组件时其值为组件相对路径,其他为URL地址)")
|
||||
@Schema(title = "定位标识 (打开方式为组件时其值为组件相对路径,其他为URL地址)")
|
||||
private String uri;
|
||||
|
||||
/**
|
||||
* 显示排序
|
||||
*/
|
||||
@ApiModelProperty(value = "显示排序")
|
||||
@Schema(title = "显示排序")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 组件缓存:0-开启,1-关闭
|
||||
*/
|
||||
@ApiModelProperty(value = "组件缓存:0-开启,1-关闭")
|
||||
@Schema(title = "组件缓存:0-开启,1-关闭")
|
||||
private Integer keepAlive;
|
||||
|
||||
/**
|
||||
* 隐藏菜单: 0-否,1-是
|
||||
*/
|
||||
@ApiModelProperty(value = "隐藏菜单: 0-否,1-是")
|
||||
@Schema(title = "隐藏菜单: 0-否,1-是")
|
||||
private Integer hidden;
|
||||
|
||||
/**
|
||||
* 菜单类型 (0目录,1菜单,2按钮)
|
||||
*/
|
||||
@ApiModelProperty(value = "菜单类型 (0目录,1菜单,2按钮)")
|
||||
@Schema(title = "菜单类型 (0目录,1菜单,2按钮)")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
@ApiModelProperty(value = "备注信息")
|
||||
@Schema(title = "备注信息")
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 菜单标题对应的国际化信息
|
||||
*/
|
||||
@Valid
|
||||
@ApiModelProperty(value = "菜单标题对应的国际化信息")
|
||||
@Schema(title = "菜单标题对应的国际化信息")
|
||||
private List<I18nMessage> i18nMessages;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.hccake.ballcat.system.model.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
@@ -12,7 +12,7 @@ import javax.validation.constraints.NotNull;
|
||||
* @author hccake 2021-04-06 17:59:51
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "菜单权限修改DTO")
|
||||
@Schema(title = "菜单权限修改DTO")
|
||||
public class SysMenuUpdateDTO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -21,87 +21,86 @@ public class SysMenuUpdateDTO {
|
||||
* 菜单ID
|
||||
*/
|
||||
@NotNull(message = "菜单ID不能为空")
|
||||
@ApiModelProperty(value = "菜单ID")
|
||||
@Schema(title = "菜单ID")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 父级ID
|
||||
*/
|
||||
@ApiModelProperty(value = "父级ID")
|
||||
@Schema(title = "父级ID")
|
||||
private Integer parentId;
|
||||
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
@ApiModelProperty(value = "菜单名称")
|
||||
@Schema(title = "菜单名称")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 菜单图标
|
||||
*/
|
||||
@ApiModelProperty(value = "菜单图标")
|
||||
@Schema(title = "菜单图标")
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 授权标识
|
||||
*/
|
||||
@ApiModelProperty(value = "授权标识")
|
||||
@Schema(title = "授权标识")
|
||||
private String permission;
|
||||
|
||||
/**
|
||||
* 路由地址
|
||||
*/
|
||||
@ApiModelProperty(value = "路由地址")
|
||||
@Schema(title = "路由地址")
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 打开方式 (1组件 2内链 3外链)
|
||||
*/
|
||||
@ApiModelProperty(value = "打开方式 (1组件 2内链 3外链)")
|
||||
@Schema(title = "打开方式 (1组件 2内链 3外链)")
|
||||
private Integer targetType;
|
||||
|
||||
/**
|
||||
* 定位标识 (打开方式为组件时其值为组件相对路径,其他为URL地址)
|
||||
*/
|
||||
@ApiModelProperty(value = "定位标识 (打开方式为组件时其值为组件相对路径,其他为URL地址)")
|
||||
@Schema(title = "定位标识 (打开方式为组件时其值为组件相对路径,其他为URL地址)")
|
||||
private String uri;
|
||||
|
||||
/**
|
||||
* 显示排序
|
||||
*/
|
||||
@ApiModelProperty(value = "显示排序")
|
||||
@Schema(title = "显示排序")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 组件缓存:0-开启,1-关闭
|
||||
*/
|
||||
@ApiModelProperty(value = "组件缓存:0-开启,1-关闭")
|
||||
@Schema(title = "组件缓存:0-开启,1-关闭")
|
||||
private Integer keepAlive;
|
||||
|
||||
/**
|
||||
* 隐藏菜单: 0-否,1-是
|
||||
*/
|
||||
@ApiModelProperty(value = "隐藏菜单: 0-否,1-是")
|
||||
@Schema(title = "隐藏菜单: 0-否,1-是")
|
||||
private Integer hidden;
|
||||
|
||||
/**
|
||||
* 菜单类型 (0目录,1菜单,2按钮)
|
||||
*/
|
||||
@ApiModelProperty(value = "菜单类型 (0目录,1菜单,2按钮)")
|
||||
@Schema(title = "菜单类型 (0目录,1菜单,2按钮)")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
@ApiModelProperty(value = "备注信息")
|
||||
@Schema(title = "备注信息")
|
||||
private String remarks;
|
||||
|
||||
// =========== 额外属性 =============
|
||||
/**
|
||||
* 原菜单ID
|
||||
*/
|
||||
@NotNull(message = "原菜单ID不能为空")
|
||||
@ApiModelProperty(value = "原菜单ID")
|
||||
@Schema(title = "原菜单ID")
|
||||
private Integer originalId;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.hccake.ballcat.system.model.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -10,7 +10,7 @@ import lombok.Data;
|
||||
* @author hccake 2020-09-23 20:39:40
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "组织架构DTO")
|
||||
@Schema(title = "组织架构DTO")
|
||||
public class SysOrganizationDTO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -18,31 +18,31 @@ public class SysOrganizationDTO {
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@ApiModelProperty(value = "ID")
|
||||
@Schema(title = "ID")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 组织名称
|
||||
*/
|
||||
@ApiModelProperty(value = "组织名称")
|
||||
@Schema(title = "组织名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 父级ID
|
||||
*/
|
||||
@ApiModelProperty(value = "父级ID")
|
||||
@Schema(title = "父级ID")
|
||||
private Integer parentId;
|
||||
|
||||
/**
|
||||
* 排序字段,由小到大
|
||||
*/
|
||||
@ApiModelProperty(value = "排序字段,由小到大")
|
||||
@Schema(title = "排序字段,由小到大")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
@Schema(title = "备注")
|
||||
private String remarks;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.hccake.ballcat.system.model.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
@@ -13,26 +13,26 @@ import javax.validation.constraints.NotBlank;
|
||||
* @author Hccake 2020-07-06
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "角色修改DTO")
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@Schema(title = "角色修改DTO")
|
||||
public class SysRoleUpdateDTO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "角色编号")
|
||||
@Schema(title = "角色编号")
|
||||
private Integer id;
|
||||
|
||||
@NotBlank(message = "角色名称不能为空")
|
||||
@ApiModelProperty(value = "角色名称")
|
||||
@Schema(title = "角色名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "角色备注")
|
||||
@Schema(title = "角色备注")
|
||||
private String remarks;
|
||||
|
||||
@ApiModelProperty(value = "数据权限")
|
||||
@Schema(title = "数据权限")
|
||||
private Integer scopeType;
|
||||
|
||||
@ApiModelProperty("数据范围资源,当数据范围类型为自定义时使用")
|
||||
@Schema(title = "数据范围资源,当数据范围类型为自定义时使用")
|
||||
private String scopeResources;
|
||||
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.hccake.ballcat.system.model.dto;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.hccake.ballcat.common.desensitize.enums.RegexDesensitizationTypeEnum;
|
||||
import com.hccake.ballcat.common.desensitize.json.annotation.JsonRegexDesensitize;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
@@ -15,19 +15,20 @@ import java.util.List;
|
||||
* @date 2019-09-12 20:39:31
|
||||
*/
|
||||
@Data
|
||||
@Schema(title = "系统用户DTO")
|
||||
public class SysUserDTO {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ApiModelProperty(value = "主键id")
|
||||
@Schema(title = "主键id")
|
||||
private Integer userId;
|
||||
|
||||
/**
|
||||
* 前端传入密码
|
||||
*/
|
||||
@JsonRegexDesensitize(type = RegexDesensitizationTypeEnum.ENCRYPTED_PASSWORD)
|
||||
@ApiModelProperty(value = "前端传入密码")
|
||||
@Schema(title = "前端传入密码")
|
||||
private String pass;
|
||||
|
||||
/**
|
||||
@@ -39,55 +40,55 @@ public class SysUserDTO {
|
||||
/**
|
||||
* 登录账号
|
||||
*/
|
||||
@ApiModelProperty(value = "登录账号")
|
||||
@Schema(title = "登录账号")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
@ApiModelProperty(value = "昵称")
|
||||
@Schema(title = "昵称")
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
@ApiModelProperty(value = "头像")
|
||||
@Schema(title = "头像")
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 性别(0-默认未知,1-男,2-女)
|
||||
*/
|
||||
@ApiModelProperty(value = "性别(0-默认未知,1-男,2-女)")
|
||||
@Schema(title = "性别(0-默认未知,1-男,2-女)")
|
||||
private Integer sex;
|
||||
|
||||
/**
|
||||
* 电子邮件
|
||||
*/
|
||||
@ApiModelProperty(value = "电子邮件")
|
||||
@Schema(title = "电子邮件")
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 电话
|
||||
*/
|
||||
@ApiModelProperty(value = "电话")
|
||||
@Schema(title = "电话")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 状态(1-正常,2-冻结)
|
||||
*/
|
||||
@ApiModelProperty(value = "状态(1-正常,2-冻结)")
|
||||
@Schema(title = "状态(1-正常,2-冻结)")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 组织机构ID
|
||||
*/
|
||||
@ApiModelProperty(value = "组织机构ID")
|
||||
@Schema(title = "组织机构ID")
|
||||
private Integer organizationId;
|
||||
|
||||
/**
|
||||
* 角色标识列表
|
||||
*/
|
||||
@ApiModelProperty(value = "角色标识列表")
|
||||
@Schema(title = "角色标识列表")
|
||||
private List<String> roleCodes;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.hccake.ballcat.system.model.dto;
|
||||
|
||||
import com.hccake.ballcat.common.desensitize.json.annotation.JsonRegexDesensitize;
|
||||
import com.hccake.ballcat.common.desensitize.enums.RegexDesensitizationTypeEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.hccake.ballcat.common.desensitize.json.annotation.JsonRegexDesensitize;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
@@ -14,6 +14,7 @@ import javax.validation.constraints.NotBlank;
|
||||
* @version 1.0
|
||||
*/
|
||||
@Data
|
||||
@Schema(title = "系统用户密码传输实体")
|
||||
public class SysUserPassDTO {
|
||||
|
||||
/**
|
||||
@@ -21,7 +22,7 @@ public class SysUserPassDTO {
|
||||
*/
|
||||
@NotBlank(message = "The password cannot be empty!")
|
||||
@JsonRegexDesensitize(type = RegexDesensitizationTypeEnum.ENCRYPTED_PASSWORD)
|
||||
@ApiModelProperty(value = "前端输入密码")
|
||||
@Schema(title = "前端输入密码")
|
||||
private String pass;
|
||||
|
||||
/**
|
||||
@@ -29,7 +30,7 @@ public class SysUserPassDTO {
|
||||
*/
|
||||
@NotBlank(message = "The confirm password cannot be empty!")
|
||||
@JsonRegexDesensitize(type = RegexDesensitizationTypeEnum.ENCRYPTED_PASSWORD)
|
||||
@ApiModelProperty(value = "前端确认密码")
|
||||
@Schema(title = "前端确认密码")
|
||||
private String confirmPass;
|
||||
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@ package com.hccake.ballcat.system.model.dto;
|
||||
import com.hccake.ballcat.system.model.entity.SysMenu;
|
||||
import com.hccake.ballcat.system.model.entity.SysRole;
|
||||
import com.hccake.ballcat.system.model.entity.SysUser;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Collection;
|
||||
@@ -15,37 +15,37 @@ import java.util.Collection;
|
||||
* @author Hccake
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "用户信息")
|
||||
@Schema(title = "用户信息")
|
||||
public class UserInfoDTO {
|
||||
|
||||
/**
|
||||
* 用户基本信息
|
||||
*/
|
||||
@ApiModelProperty(value = "用户基本信息")
|
||||
@Schema(title = "用户基本信息")
|
||||
private SysUser sysUser;
|
||||
|
||||
/**
|
||||
* 权限标识集合
|
||||
*/
|
||||
@ApiModelProperty(value = "权限标识集合")
|
||||
@Schema(title = "权限标识集合")
|
||||
private Collection<String> permissions;
|
||||
|
||||
/**
|
||||
* 角色标识集合
|
||||
*/
|
||||
@ApiModelProperty(value = "角色标识集合")
|
||||
@Schema(title = "角色标识集合")
|
||||
private Collection<String> roleCodes;
|
||||
|
||||
/**
|
||||
* 菜单对象集合
|
||||
*/
|
||||
@ApiModelProperty(value = "菜单对象集合")
|
||||
@Schema(title = "菜单对象集合")
|
||||
private Collection<SysMenu> menus;
|
||||
|
||||
/**
|
||||
* 角色对象集合
|
||||
*/
|
||||
@ApiModelProperty(value = "角色对象集合")
|
||||
@Schema(title = "角色对象集合")
|
||||
private Collection<SysRole> roles;
|
||||
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@ package com.hccake.ballcat.system.model.entity;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.hccake.ballcat.common.model.entity.LogicDeletedBaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -17,44 +17,44 @@ import lombok.EqualsAndHashCode;
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("sys_config")
|
||||
@ApiModel(value = "基础配置")
|
||||
@Schema(title = "基础配置")
|
||||
public class SysConfig extends LogicDeletedBaseEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId
|
||||
@ApiModelProperty(value = "主键ID")
|
||||
@Schema(title = "主键ID")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 配置名称
|
||||
*/
|
||||
@ApiModelProperty(value = "配置名称")
|
||||
@Schema(title = "配置名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 配置在缓存中的key名
|
||||
*/
|
||||
@ApiModelProperty(value = "配置在缓存中的key名")
|
||||
@Schema(title = "配置在缓存中的key名")
|
||||
private String confKey;
|
||||
|
||||
/**
|
||||
* 配置值
|
||||
*/
|
||||
@ApiModelProperty(value = "配置值")
|
||||
@Schema(title = "配置值")
|
||||
private String confValue;
|
||||
|
||||
/**
|
||||
* 分类
|
||||
*/
|
||||
@ApiModelProperty(value = "分类")
|
||||
@Schema(title = "分类")
|
||||
private String category;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
@Schema(title = "备注")
|
||||
private String remarks;
|
||||
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@ package com.hccake.ballcat.system.model.entity;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.hccake.ballcat.common.model.entity.LogicDeletedBaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -17,7 +17,7 @@ import lombok.EqualsAndHashCode;
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("sys_dict")
|
||||
@ApiModel(value = "字典表")
|
||||
@Schema(title = "字典表")
|
||||
public class SysDict extends LogicDeletedBaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -26,43 +26,43 @@ public class SysDict extends LogicDeletedBaseEntity {
|
||||
* 编号
|
||||
*/
|
||||
@TableId
|
||||
@ApiModelProperty(value = "编号")
|
||||
@Schema(title = "编号")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 标识
|
||||
*/
|
||||
@ApiModelProperty(value = "标识")
|
||||
@Schema(title = "标识")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@ApiModelProperty(value = "名称")
|
||||
@Schema(title = "名称")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* Hash值
|
||||
*/
|
||||
@ApiModelProperty(value = "Hash值")
|
||||
@Schema(title = "Hash值")
|
||||
private String hashCode;
|
||||
|
||||
/**
|
||||
* 可编辑的
|
||||
*/
|
||||
@ApiModelProperty(value = "1:是 0:否")
|
||||
@Schema(title = "1:是 0:否")
|
||||
private Integer editable;
|
||||
|
||||
/**
|
||||
* 数据类型
|
||||
*/
|
||||
@ApiModelProperty("数据类型,1:Number 2:String 3:Boolean")
|
||||
@Schema(title = "数据类型,1:Number 2:String 3:Boolean")
|
||||
private Integer valueType;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
@Schema(title = "备注")
|
||||
private String remarks;
|
||||
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import com.hccake.ballcat.common.model.entity.LogicDeletedBaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.Map;
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName(value = "sys_dict_item", autoResultMap = true)
|
||||
@ApiModel(value = "字典项")
|
||||
@Schema(title = "字典项")
|
||||
public class SysDictItem extends LogicDeletedBaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -30,44 +30,44 @@ public class SysDictItem extends LogicDeletedBaseEntity {
|
||||
* ID
|
||||
*/
|
||||
@TableId
|
||||
@ApiModelProperty(value = "ID")
|
||||
@Schema(title = "ID")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 字典标识
|
||||
*/
|
||||
@ApiModelProperty(value = "字典标识")
|
||||
@Schema(title = "字典标识")
|
||||
private String dictCode;
|
||||
|
||||
/**
|
||||
* 数据值
|
||||
*/
|
||||
@ApiModelProperty(value = "数据值")
|
||||
@Schema(title = "数据值")
|
||||
private String value;
|
||||
|
||||
/**
|
||||
* 文本值
|
||||
*/
|
||||
@ApiModelProperty(value = "文本值")
|
||||
@Schema(title = "文本值")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 附加属性值
|
||||
*/
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
@ApiModelProperty(value = "附加属性值")
|
||||
@Schema(title = "附加属性值")
|
||||
private Map<String, Object> attributes;
|
||||
|
||||
/**
|
||||
* 排序(升序)
|
||||
*/
|
||||
@ApiModelProperty(value = "排序(升序)")
|
||||
@Schema(title = "排序(升序)")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
@Schema(title = "备注")
|
||||
private String remarks;
|
||||
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.hccake.ballcat.common.model.entity.LogicDeletedBaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
@@ -23,87 +23,87 @@ import java.util.Objects;
|
||||
@Setter
|
||||
@ToString
|
||||
@TableName("sys_menu")
|
||||
@ApiModel(value = "菜单权限")
|
||||
@Schema(title = "菜单权限")
|
||||
public class SysMenu extends LogicDeletedBaseEntity {
|
||||
|
||||
/**
|
||||
* 菜单ID
|
||||
*/
|
||||
@TableId(type = IdType.INPUT)
|
||||
@ApiModelProperty(value = "菜单ID")
|
||||
@Schema(title = "菜单ID")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 父级ID
|
||||
*/
|
||||
@ApiModelProperty(value = "父级ID")
|
||||
@Schema(title = "父级ID")
|
||||
private Integer parentId;
|
||||
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
@ApiModelProperty(value = "菜单名称")
|
||||
@Schema(title = "菜单名称")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 菜单图标
|
||||
*/
|
||||
@TableField(updateStrategy = FieldStrategy.NOT_NULL)
|
||||
@ApiModelProperty(value = "菜单图标")
|
||||
@Schema(title = "菜单图标")
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 授权标识
|
||||
*/
|
||||
@ApiModelProperty(value = "授权标识")
|
||||
@Schema(title = "授权标识")
|
||||
private String permission;
|
||||
|
||||
/**
|
||||
* 路由地址
|
||||
*/
|
||||
@ApiModelProperty(value = "路由地址")
|
||||
@Schema(title = "路由地址")
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 打开方式 (1组件 2内链 3外链)
|
||||
*/
|
||||
@ApiModelProperty(value = "打开方式 (1组件 2内链 3外链)")
|
||||
@Schema(title = "打开方式 (1组件 2内链 3外链)")
|
||||
private Integer targetType;
|
||||
|
||||
/**
|
||||
* 定位标识 (打开方式为组件时其值为组件相对路径,其他为URL地址)
|
||||
*/
|
||||
@ApiModelProperty(value = "定位标识 (打开方式为组件时其值为组件相对路径,其他为URL地址)")
|
||||
@Schema(title = "定位标识 (打开方式为组件时其值为组件相对路径,其他为URL地址)")
|
||||
private String uri;
|
||||
|
||||
/**
|
||||
* 显示排序
|
||||
*/
|
||||
@ApiModelProperty(value = "显示排序")
|
||||
@Schema(title = "显示排序")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 组件缓存:0-开启,1-关闭
|
||||
*/
|
||||
@ApiModelProperty(value = "组件缓存:0-开启,1-关闭")
|
||||
@Schema(title = "组件缓存:0-开启,1-关闭")
|
||||
private Integer keepAlive;
|
||||
|
||||
/**
|
||||
* 隐藏菜单: 0-否,1-是
|
||||
*/
|
||||
@ApiModelProperty(value = "隐藏菜单: 0-否,1-是")
|
||||
@Schema(title = "隐藏菜单: 0-否,1-是")
|
||||
private Integer hidden;
|
||||
|
||||
/**
|
||||
* 菜单类型 (0目录,1菜单,2按钮)
|
||||
*/
|
||||
@ApiModelProperty(value = "菜单类型 (0目录,1菜单,2按钮)")
|
||||
@Schema(title = "菜单类型 (0目录,1菜单,2按钮)")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
@ApiModelProperty(value = "备注信息")
|
||||
@Schema(title = "备注信息")
|
||||
private String remarks;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,8 +4,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.hccake.ballcat.common.model.entity.LogicDeletedBaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -17,7 +17,7 @@ import lombok.EqualsAndHashCode;
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("sys_organization")
|
||||
@ApiModel(value = "组织架构")
|
||||
@Schema(title = "组织架构")
|
||||
public class SysOrganization extends LogicDeletedBaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -26,43 +26,43 @@ public class SysOrganization extends LogicDeletedBaseEntity {
|
||||
* ID
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "ID")
|
||||
@Schema(title = "ID")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 组织名称
|
||||
*/
|
||||
@ApiModelProperty(value = "组织名称")
|
||||
@Schema(title = "组织名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 父级ID
|
||||
*/
|
||||
@ApiModelProperty(value = "父级ID")
|
||||
@Schema(title = "父级ID")
|
||||
private Integer parentId;
|
||||
|
||||
/**
|
||||
* 层级信息,从根节点到当前节点的最短路径,使用-分割节点ID
|
||||
*/
|
||||
@ApiModelProperty(value = "层级信息,从根节点到当前节点的最短路径,使用-分割节点ID")
|
||||
@Schema(title = "层级信息,从根节点到当前节点的最短路径,使用-分割节点ID")
|
||||
private String hierarchy;
|
||||
|
||||
/**
|
||||
* 当前节点深度
|
||||
*/
|
||||
@ApiModelProperty(value = "当前节点深度")
|
||||
@Schema(title = "当前节点深度")
|
||||
private Integer depth;
|
||||
|
||||
/**
|
||||
* 排序字段,由小到大
|
||||
*/
|
||||
@ApiModelProperty(value = "排序字段,由小到大")
|
||||
@Schema(title = "排序字段,由小到大")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
@Schema(title = "备注")
|
||||
private String remarks;
|
||||
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.hccake.ballcat.common.model.entity.LogicDeletedBaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
@@ -23,33 +23,33 @@ import java.util.Objects;
|
||||
@Setter
|
||||
@ToString
|
||||
@TableName("sys_role")
|
||||
@ApiModel(value = "角色")
|
||||
@Schema(title = "角色")
|
||||
public class SysRole extends LogicDeletedBaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "角色编号")
|
||||
@Schema(title = "角色编号")
|
||||
private Integer id;
|
||||
|
||||
@NotBlank(message = "角色名称不能为空")
|
||||
@ApiModelProperty(value = "角色名称")
|
||||
@Schema(title = "角色名称")
|
||||
private String name;
|
||||
|
||||
@NotBlank(message = "角色标识不能为空")
|
||||
@ApiModelProperty(value = "角色标识")
|
||||
@Schema(title = "角色标识")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty("角色类型,1:系统角色 2:业务角色")
|
||||
@Schema(title = "角色类型,1:系统角色 2:业务角色")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "数据权限")
|
||||
@Schema(title = "数据权限")
|
||||
private Integer scopeType;
|
||||
|
||||
@ApiModelProperty("数据范围资源,当数据范围类型为自定义时使用")
|
||||
@Schema(title = "数据范围资源,当数据范围类型为自定义时使用")
|
||||
private String scopeResources;
|
||||
|
||||
@ApiModelProperty(value = "角色备注")
|
||||
@Schema(title = "角色备注")
|
||||
private String remarks;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,8 +3,8 @@ package com.hccake.ballcat.system.model.entity;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -15,7 +15,7 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
@TableName("sys_role_menu")
|
||||
@ApiModel(value = "角色菜单")
|
||||
@Schema(title = "角色菜单")
|
||||
public class SysRoleMenu {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -34,13 +34,13 @@ public class SysRoleMenu {
|
||||
/**
|
||||
* 角色 Code
|
||||
*/
|
||||
@ApiModelProperty(value = "角色 Code")
|
||||
@Schema(title = "角色 Code")
|
||||
private String roleCode;
|
||||
|
||||
/**
|
||||
* 权限ID
|
||||
*/
|
||||
@ApiModelProperty(value = "菜单id")
|
||||
@Schema(title = "菜单id")
|
||||
private Integer menuId;
|
||||
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.hccake.ballcat.common.model.entity.LogicDeletedBaseEntity;
|
||||
import com.hccake.extend.mybatis.plus.alias.TableAlias;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -19,7 +19,7 @@ import lombok.EqualsAndHashCode;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableAlias("su")
|
||||
@TableName("sys_user")
|
||||
@ApiModel(value = "系统用户表")
|
||||
@Schema(title = "系统用户表")
|
||||
public class SysUser extends LogicDeletedBaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -28,73 +28,73 @@ public class SysUser extends LogicDeletedBaseEntity {
|
||||
* 用户ID
|
||||
*/
|
||||
@TableId
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@Schema(title = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
/**
|
||||
* 登录账号
|
||||
*/
|
||||
@ApiModelProperty(value = "登录账号")
|
||||
@Schema(title = "登录账号")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
@ApiModelProperty(value = "昵称")
|
||||
@Schema(title = "昵称")
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
@ApiModelProperty(value = "密码")
|
||||
@Schema(title = "密码")
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* md5密码盐
|
||||
*/
|
||||
@ApiModelProperty(value = "md5密码盐")
|
||||
@Schema(title = "md5密码盐")
|
||||
private String salt;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
@ApiModelProperty(value = "头像")
|
||||
@Schema(title = "头像")
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 性别(0-默认未知,1-男,2-女)
|
||||
*/
|
||||
@ApiModelProperty(value = "性别(0-默认未知,1-男,2-女)")
|
||||
@Schema(title = "性别(0-默认未知,1-男,2-女)")
|
||||
private Integer sex;
|
||||
|
||||
/**
|
||||
* 电子邮件
|
||||
*/
|
||||
@ApiModelProperty(value = "电子邮件")
|
||||
@Schema(title = "电子邮件")
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 电话
|
||||
*/
|
||||
@ApiModelProperty(value = "电话")
|
||||
@Schema(title = "电话")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 状态(1-正常,0-冻结)
|
||||
*/
|
||||
@ApiModelProperty(value = "状态(1-正常, 0-冻结)")
|
||||
@Schema(title = "状态(1-正常, 0-冻结)")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 组织机构ID
|
||||
*/
|
||||
@ApiModelProperty(value = "组织机构ID")
|
||||
@Schema(title = "组织机构ID")
|
||||
private Integer organizationId;
|
||||
|
||||
/**
|
||||
* 用户类型
|
||||
*/
|
||||
@ApiModelProperty(value = "1:系统用户, 2:客户用户")
|
||||
@Schema(title = "1:系统用户, 2:客户用户")
|
||||
private Integer type;
|
||||
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.hccake.extend.mybatis.plus.alias.TableAlias;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -17,7 +17,7 @@ import lombok.Data;
|
||||
@Data
|
||||
@TableAlias("ur")
|
||||
@TableName("sys_user_role")
|
||||
@ApiModel(value = "用户角色")
|
||||
@Schema(title = "用户角色")
|
||||
public class SysUserRole {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -28,13 +28,13 @@ public class SysUserRole {
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ApiModelProperty(value = "用户id")
|
||||
@Schema(title = "用户id")
|
||||
private Integer userId;
|
||||
|
||||
/**
|
||||
* 角色Code
|
||||
*/
|
||||
@ApiModelProperty(value = "角色Code")
|
||||
@Schema(title = "角色Code")
|
||||
private String roleCode;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.hccake.ballcat.system.model.qo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springdoc.api.annotations.ParameterObject;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@@ -12,20 +13,21 @@ import javax.validation.constraints.NotNull;
|
||||
* @author Hccake
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "角色绑定用户查询对象")
|
||||
@Schema(title = "角色绑定用户查询对象")
|
||||
@ParameterObject
|
||||
public class RoleBindUserQO {
|
||||
|
||||
@NotNull(message = "角色标识不能为空!")
|
||||
@ApiModelProperty(value = "角色标识")
|
||||
@Schema(title = "角色标识")
|
||||
private String roleCode;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@Schema(title = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "用户名")
|
||||
@Schema(title = "用户名")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty(value = "组织ID")
|
||||
@Schema(title = "组织ID")
|
||||
private Integer organizationId;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.hccake.ballcat.system.model.qo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springdoc.api.annotations.ParameterObject;
|
||||
|
||||
/**
|
||||
* 系统配置表
|
||||
@@ -11,25 +12,26 @@ import lombok.Data;
|
||||
* @date 2019-10-14 17:42:23
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "基础配置")
|
||||
@Schema(title = "基础配置")
|
||||
@ParameterObject
|
||||
public class SysConfigQO {
|
||||
|
||||
/**
|
||||
* 配置名称
|
||||
*/
|
||||
@ApiModelProperty(value = "配置名称")
|
||||
@Schema(title = "配置名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 配置在缓存中的key名
|
||||
*/
|
||||
@ApiModelProperty(value = "配置在缓存中的key名")
|
||||
@Schema(title = "配置在缓存中的key名")
|
||||
private String confKey;
|
||||
|
||||
/**
|
||||
* 分类
|
||||
*/
|
||||
@ApiModelProperty(value = "分类")
|
||||
@Schema(title = "分类")
|
||||
private String category;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.hccake.ballcat.system.model.qo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springdoc.api.annotations.ParameterObject;
|
||||
|
||||
/**
|
||||
* 字典表 查询对象
|
||||
@@ -11,7 +12,8 @@ import lombok.Data;
|
||||
* @date 2020-03-26 18:40:20
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "字典表查询对象")
|
||||
@Schema(title = "字典表查询对象")
|
||||
@ParameterObject
|
||||
public class SysDictQO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -19,13 +21,13 @@ public class SysDictQO {
|
||||
/**
|
||||
* 字典标识
|
||||
*/
|
||||
@ApiModelProperty(value = "字典标识")
|
||||
@Schema(title = "字典标识")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 字典名称
|
||||
*/
|
||||
@ApiModelProperty(value = "字典名称")
|
||||
@Schema(title = "字典名称")
|
||||
private String title;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.hccake.ballcat.system.model.qo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springdoc.api.annotations.ParameterObject;
|
||||
|
||||
/**
|
||||
* 菜单权限 查询对象
|
||||
@@ -10,7 +11,8 @@ import lombok.Data;
|
||||
* @author hccake 2021-04-06 17:59:51
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "菜单权限查询对象")
|
||||
@Schema(title = "菜单权限查询对象")
|
||||
@ParameterObject
|
||||
public class SysMenuQO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -18,25 +20,25 @@ public class SysMenuQO {
|
||||
/**
|
||||
* 菜单ID
|
||||
*/
|
||||
@ApiModelProperty(value = "菜单ID")
|
||||
@Schema(title = "菜单ID")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
@ApiModelProperty(value = "菜单名称")
|
||||
@Schema(title = "菜单名称")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 授权标识
|
||||
*/
|
||||
@ApiModelProperty(value = "授权标识")
|
||||
@Schema(title = "授权标识")
|
||||
private String permission;
|
||||
|
||||
/**
|
||||
* 路由地址
|
||||
*/
|
||||
@ApiModelProperty(value = "路由地址")
|
||||
@Schema(title = "路由地址")
|
||||
private String path;
|
||||
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.hccake.ballcat.system.model.qo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springdoc.api.annotations.ParameterObject;
|
||||
|
||||
/**
|
||||
* 组织架构 查询对象
|
||||
@@ -10,7 +11,8 @@ import lombok.Data;
|
||||
* @author hccake 2020-09-23 12:09:43
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "组织架构查询对象")
|
||||
@Schema(title = "组织架构查询对象")
|
||||
@ParameterObject
|
||||
public class SysOrganizationQO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -18,7 +20,7 @@ public class SysOrganizationQO {
|
||||
/**
|
||||
* 组织名称
|
||||
*/
|
||||
@ApiModelProperty(value = "组织名称")
|
||||
@Schema(title = "组织名称")
|
||||
private String name;
|
||||
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.hccake.ballcat.system.model.qo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springdoc.api.annotations.ParameterObject;
|
||||
|
||||
/**
|
||||
* 角色查询对象
|
||||
@@ -10,21 +11,22 @@ import lombok.Data;
|
||||
* @author Hccake
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "角色查询对象")
|
||||
@Schema(title = "角色查询对象")
|
||||
@ParameterObject
|
||||
public class SysRoleQO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "角色名称")
|
||||
@Schema(title = "角色名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "角色标识")
|
||||
@Schema(title = "角色标识")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
@Schema(title = "开始时间")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
@Schema(title = "结束时间")
|
||||
private String endTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.hccake.ballcat.system.model.qo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springdoc.api.annotations.ParameterObject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -12,58 +13,59 @@ import java.util.List;
|
||||
* @date 2019/9/22 17:22
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("系统用户查询对象")
|
||||
@Schema(title = "系统用户查询对象")
|
||||
@ParameterObject
|
||||
public class SysUserQO {
|
||||
|
||||
/**
|
||||
* 登录账号
|
||||
*/
|
||||
@ApiModelProperty(value = "登录账号")
|
||||
@Schema(title = "登录账号")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
@ApiModelProperty(value = "昵称")
|
||||
@Schema(title = "昵称")
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 性别(0-默认未知,1-男,2-女)
|
||||
*/
|
||||
@ApiModelProperty(value = "性别(0-默认未知,1-男,2-女)")
|
||||
@Schema(title = "性别(0-默认未知,1-男,2-女)")
|
||||
private Integer sex;
|
||||
|
||||
/**
|
||||
* 电子邮件
|
||||
*/
|
||||
@ApiModelProperty(value = "电子邮件")
|
||||
@Schema(title = "电子邮件")
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 电话
|
||||
*/
|
||||
@ApiModelProperty(value = "电话")
|
||||
@Schema(title = "电话")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 状态(1-正常,2-冻结)
|
||||
*/
|
||||
@ApiModelProperty(value = "状态(1-正常,2-冻结)")
|
||||
@Schema(title = "状态(1-正常,2-冻结)")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 组织机构ID
|
||||
*/
|
||||
@ApiModelProperty(value = "organizationId")
|
||||
@Schema(title = "organizationId")
|
||||
private List<Integer> organizationId;
|
||||
|
||||
@ApiModelProperty(value = "用户类型:1:系统用户, 2:客户用户")
|
||||
@Schema(title = "用户类型:1:系统用户, 2:客户用户")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
@Schema(title = "开始时间")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
@Schema(title = "结束时间")
|
||||
private String endTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.hccake.ballcat.system.model.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
@@ -12,28 +11,28 @@ import java.util.List;
|
||||
* @date 2020/4/9 15:48
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "字典数据VO")
|
||||
@Schema(title = "字典数据VO")
|
||||
public class DictDataVO {
|
||||
|
||||
/**
|
||||
* 字典标识
|
||||
*/
|
||||
@ApiModelProperty(value = "字典标识")
|
||||
@Schema(title = "字典标识")
|
||||
private String dictCode;
|
||||
|
||||
@ApiModelProperty("字典值类型")
|
||||
@Schema(title = "字典值类型")
|
||||
private Integer valueType;
|
||||
|
||||
/**
|
||||
* 字典Hash值
|
||||
*/
|
||||
@ApiModelProperty(value = "字典Hash值")
|
||||
@Schema(title = "字典Hash值")
|
||||
private String hashCode;
|
||||
|
||||
/**
|
||||
* 字典项列表
|
||||
*/
|
||||
@ApiModelProperty(value = "字典项列表")
|
||||
@Schema(title = "字典项列表")
|
||||
private List<DictItemVO> dictItems;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.hccake.ballcat.system.model.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Map;
|
||||
@@ -13,30 +13,30 @@ import java.util.Map;
|
||||
* @date 2020-03-26 18:40:20
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "字典项VO")
|
||||
@Schema(title = "字典项VO")
|
||||
public class DictItemVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("id")
|
||||
@Schema(title = "id")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 数据值
|
||||
*/
|
||||
@ApiModelProperty(value = "数据值")
|
||||
@Schema(title = "数据值")
|
||||
private String value;
|
||||
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
@ApiModelProperty(value = "文本值")
|
||||
@Schema(title = "文本值")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 附加属性值
|
||||
*/
|
||||
@ApiModelProperty(value = "附加属性值")
|
||||
@Schema(title = "附加属性值")
|
||||
private Map<String, Object> attributes;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.hccake.ballcat.system.model.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -13,27 +13,27 @@ import java.io.Serializable;
|
||||
* @date 2019-09-12 20:39:31
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "角色绑定的用户VO")
|
||||
@Schema(title = "角色绑定的用户VO")
|
||||
public class RoleBindUserVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@Schema(title = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "登录账号")
|
||||
@Schema(title = "登录账号")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty(value = "昵称")
|
||||
@Schema(title = "昵称")
|
||||
private String nickname;
|
||||
|
||||
@ApiModelProperty(value = "1:系统用户, 2:客户用户")
|
||||
@Schema(title = "1:系统用户, 2:客户用户")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "组织机构ID")
|
||||
@Schema(title = "组织机构ID")
|
||||
private Integer organizationId;
|
||||
|
||||
@ApiModelProperty(value = "组织机构名称")
|
||||
@Schema(title = "组织机构名称")
|
||||
private String organizationName;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.hccake.ballcat.system.model.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@@ -13,55 +13,55 @@ import java.time.LocalDateTime;
|
||||
* @date 2019-10-14 17:42:23
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "基础配置")
|
||||
@Schema(title = "基础配置")
|
||||
public class SysConfigPageVO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty(value = "主键ID")
|
||||
@Schema(title = "主键ID")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 配置名称
|
||||
*/
|
||||
@ApiModelProperty(value = "配置名称")
|
||||
@Schema(title = "配置名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 配置在缓存中的key名
|
||||
*/
|
||||
@ApiModelProperty(value = "配置在缓存中的key名")
|
||||
@Schema(title = "配置在缓存中的key名")
|
||||
private String confKey;
|
||||
|
||||
/**
|
||||
* 配置值
|
||||
*/
|
||||
@ApiModelProperty(value = "配置值")
|
||||
@Schema(title = "配置值")
|
||||
private String confValue;
|
||||
|
||||
/**
|
||||
* 分类
|
||||
*/
|
||||
@ApiModelProperty(value = "分类")
|
||||
@Schema(title = "分类")
|
||||
private String category;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@ApiModelProperty(value = "描述")
|
||||
@Schema(title = "描述")
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@Schema(title = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@Schema(title = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@ package com.hccake.ballcat.system.model.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@@ -16,7 +16,7 @@ import java.util.Map;
|
||||
* @date 2020-03-26 18:40:20
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "字典项")
|
||||
@Schema(title = "字典项")
|
||||
public class SysDictItemPageVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -24,56 +24,56 @@ public class SysDictItemPageVO {
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@ApiModelProperty(value = "ID")
|
||||
@Schema(title = "ID")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 字典标识
|
||||
*/
|
||||
@ApiModelProperty(value = "字典标识")
|
||||
@Schema(title = "字典标识")
|
||||
private String dictCode;
|
||||
|
||||
/**
|
||||
* 数据值
|
||||
*/
|
||||
@ApiModelProperty(value = "数据值")
|
||||
@Schema(title = "数据值")
|
||||
private String value;
|
||||
|
||||
/**
|
||||
* 文本值
|
||||
*/
|
||||
@ApiModelProperty(value = "文本值")
|
||||
@Schema(title = "文本值")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 附加属性值
|
||||
*/
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
@ApiModelProperty(value = "附加属性值")
|
||||
@Schema(title = "附加属性值")
|
||||
private Map<String, Object> attributes;
|
||||
|
||||
/**
|
||||
* 排序(升序)
|
||||
*/
|
||||
@ApiModelProperty(value = "排序(升序)")
|
||||
@Schema(title = "排序(升序)")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
@Schema(title = "备注")
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@Schema(title = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
@Schema(title = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.hccake.ballcat.system.model.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@@ -13,7 +12,7 @@ import java.time.LocalDateTime;
|
||||
* @date 2020-03-26 18:40:20
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "字典表")
|
||||
@Schema(title = "字典表")
|
||||
public class SysDictPageVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -21,55 +20,55 @@ public class SysDictPageVO {
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@ApiModelProperty(value = "编号")
|
||||
@Schema(title = "编号")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 标识
|
||||
*/
|
||||
@ApiModelProperty(value = "标识")
|
||||
@Schema(title = "标识")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@ApiModelProperty(value = "名称")
|
||||
@Schema(title = "名称")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* Hash值
|
||||
*/
|
||||
@ApiModelProperty(value = "Hash值")
|
||||
@Schema(title = "Hash值")
|
||||
private String hashCode;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
@Schema(title = "备注")
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 可编辑的
|
||||
*/
|
||||
@ApiModelProperty(value = "1:是 0:否")
|
||||
@Schema(title = "1:是 0:否")
|
||||
private Integer editable;
|
||||
|
||||
/**
|
||||
* 数据类型
|
||||
*/
|
||||
@ApiModelProperty("数据类型,1:Number 2:String 3:Boolean")
|
||||
@Schema(title = "数据类型,1:Number 2:String 3:Boolean")
|
||||
private Integer valueType;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@Schema(title = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
@Schema(title = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@ package com.hccake.ballcat.system.model.vo;
|
||||
|
||||
import com.hccake.ballcat.common.i18n.I18nClass;
|
||||
import com.hccake.ballcat.common.i18n.I18nField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -13,7 +13,7 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
@I18nClass
|
||||
@ApiModel(value = "菜单权限授权对象")
|
||||
@Schema(title = "菜单权限授权对象")
|
||||
public class SysMenuGrantVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -21,26 +21,26 @@ public class SysMenuGrantVO {
|
||||
/**
|
||||
* 菜单ID
|
||||
*/
|
||||
@ApiModelProperty(value = "菜单ID")
|
||||
@Schema(title = "菜单ID")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 父级ID
|
||||
*/
|
||||
@ApiModelProperty(value = "父级ID")
|
||||
@Schema(title = "父级ID")
|
||||
private Integer parentId;
|
||||
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
@I18nField(condition = "type != 2")
|
||||
@ApiModelProperty(value = "菜单名称")
|
||||
@Schema(title = "菜单名称")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 菜单类型 (0目录,1菜单,2按钮)
|
||||
*/
|
||||
@ApiModelProperty(value = "菜单类型 (0目录,1菜单,2按钮)")
|
||||
@Schema(title = "菜单类型 (0目录,1菜单,2按钮)")
|
||||
private Integer type;
|
||||
|
||||
}
|
||||
@@ -2,8 +2,8 @@ package com.hccake.ballcat.system.model.vo;
|
||||
|
||||
import com.hccake.ballcat.common.i18n.I18nClass;
|
||||
import com.hccake.ballcat.common.i18n.I18nField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@@ -15,7 +15,7 @@ import java.time.LocalDateTime;
|
||||
*/
|
||||
@I18nClass
|
||||
@Data
|
||||
@ApiModel(value = "菜单权限分页视图对象")
|
||||
@Schema(title = "菜单权限分页视图对象")
|
||||
public class SysMenuPageVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -23,98 +23,98 @@ public class SysMenuPageVO {
|
||||
/**
|
||||
* 菜单ID
|
||||
*/
|
||||
@ApiModelProperty(value = "菜单ID")
|
||||
@Schema(title = "菜单ID")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 父级ID
|
||||
*/
|
||||
@ApiModelProperty(value = "父级ID")
|
||||
@Schema(title = "父级ID")
|
||||
private Integer parentId;
|
||||
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
@ApiModelProperty(value = "菜单名称")
|
||||
@Schema(title = "菜单名称")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
@I18nField(condition = "type != 2")
|
||||
@ApiModelProperty(value = "菜单名称")
|
||||
@Schema(title = "菜单名称")
|
||||
private String i18nTitle;
|
||||
|
||||
/**
|
||||
* 菜单图标
|
||||
*/
|
||||
@ApiModelProperty(value = "菜单图标")
|
||||
@Schema(title = "菜单图标")
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 授权标识
|
||||
*/
|
||||
@ApiModelProperty(value = "授权标识")
|
||||
@Schema(title = "授权标识")
|
||||
private String permission;
|
||||
|
||||
/**
|
||||
* 路由地址
|
||||
*/
|
||||
@ApiModelProperty(value = "路由地址")
|
||||
@Schema(title = "路由地址")
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 打开方式 (1组件 2内链 3外链)
|
||||
*/
|
||||
@ApiModelProperty(value = "打开方式 (1组件 2内链 3外链)")
|
||||
@Schema(title = "打开方式 (1组件 2内链 3外链)")
|
||||
private Integer targetType;
|
||||
|
||||
/**
|
||||
* 定位标识 (打开方式为组件时其值为组件相对路径,其他为URL地址)
|
||||
*/
|
||||
@ApiModelProperty(value = "定位标识 (打开方式为组件时其值为组件相对路径,其他为URL地址)")
|
||||
@Schema(title = "定位标识 (打开方式为组件时其值为组件相对路径,其他为URL地址)")
|
||||
private String uri;
|
||||
|
||||
/**
|
||||
* 显示排序
|
||||
*/
|
||||
@ApiModelProperty(value = "显示排序")
|
||||
@Schema(title = "显示排序")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 组件缓存:0-开启,1-关闭
|
||||
*/
|
||||
@ApiModelProperty(value = "组件缓存:0-开启,1-关闭")
|
||||
@Schema(title = "组件缓存:0-开启,1-关闭")
|
||||
private Integer keepAlive;
|
||||
|
||||
/**
|
||||
* 隐藏菜单: 0-否,1-是
|
||||
*/
|
||||
@ApiModelProperty(value = "隐藏菜单: 0-否,1-是")
|
||||
@Schema(title = "隐藏菜单: 0-否,1-是")
|
||||
private Integer hidden;
|
||||
|
||||
/**
|
||||
* 菜单类型 (0目录,1菜单,2按钮)
|
||||
*/
|
||||
@ApiModelProperty(value = "菜单类型 (0目录,1菜单,2按钮)")
|
||||
@Schema(title = "菜单类型 (0目录,1菜单,2按钮)")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
@ApiModelProperty(value = "备注信息")
|
||||
@Schema(title = "备注信息")
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@Schema(title = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
@Schema(title = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -2,8 +2,8 @@ package com.hccake.ballcat.system.model.vo;
|
||||
|
||||
import com.hccake.ballcat.common.i18n.I18nClass;
|
||||
import com.hccake.ballcat.common.i18n.I18nField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -13,7 +13,7 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
@I18nClass
|
||||
@ApiModel(value = "菜单权限视图对象")
|
||||
@Schema(title = "菜单权限视图对象")
|
||||
public class SysMenuRouterVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -21,68 +21,68 @@ public class SysMenuRouterVO {
|
||||
/**
|
||||
* 菜单ID
|
||||
*/
|
||||
@ApiModelProperty(value = "菜单ID")
|
||||
@Schema(title = "菜单ID")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 父级ID
|
||||
*/
|
||||
@ApiModelProperty(value = "父级ID")
|
||||
@Schema(title = "父级ID")
|
||||
private Integer parentId;
|
||||
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
@I18nField(condition = "type != 2")
|
||||
@ApiModelProperty(value = "菜单名称")
|
||||
@Schema(title = "菜单名称")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 菜单图标
|
||||
*/
|
||||
@ApiModelProperty(value = "菜单图标")
|
||||
@Schema(title = "菜单图标")
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 路由地址
|
||||
*/
|
||||
@ApiModelProperty(value = "路由地址")
|
||||
@Schema(title = "路由地址")
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 打开方式 (1组件 2内链 3外链)
|
||||
*/
|
||||
@ApiModelProperty(value = "打开方式 (1组件 2内链 3外链)")
|
||||
@Schema(title = "打开方式 (1组件 2内链 3外链)")
|
||||
private Integer targetType;
|
||||
|
||||
/**
|
||||
* 定位标识 (打开方式为组件时其值为组件相对路径,其他为URL地址)
|
||||
*/
|
||||
@ApiModelProperty(value = "定位标识 (打开方式为组件时其值为组件相对路径,其他为URL地址)")
|
||||
@Schema(title = "定位标识 (打开方式为组件时其值为组件相对路径,其他为URL地址)")
|
||||
private String uri;
|
||||
|
||||
/**
|
||||
* 组件缓存:0-开启,1-关闭
|
||||
*/
|
||||
@ApiModelProperty(value = "组件缓存:0-开启,1-关闭")
|
||||
@Schema(title = "组件缓存:0-开启,1-关闭")
|
||||
private Integer keepAlive;
|
||||
|
||||
/**
|
||||
* 隐藏菜单: 0-否,1-是
|
||||
*/
|
||||
@ApiModelProperty(value = "隐藏菜单: 0-否,1-是")
|
||||
@Schema(title = "隐藏菜单: 0-否,1-是")
|
||||
private Integer hidden;
|
||||
|
||||
/**
|
||||
* 菜单类型 (0目录,1菜单,2按钮)
|
||||
*/
|
||||
@ApiModelProperty(value = "菜单类型 (0目录,1菜单,2按钮)")
|
||||
@Schema(title = "菜单类型 (0目录,1菜单,2按钮)")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
@ApiModelProperty(value = "备注信息")
|
||||
@Schema(title = "备注信息")
|
||||
private String remarks;
|
||||
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.hccake.ballcat.system.model.vo;
|
||||
|
||||
import com.hccake.ballcat.common.util.tree.TreeNode;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@@ -15,7 +15,7 @@ import java.util.List;
|
||||
* @author hccake 2020-09-23 12:09:43
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "组织架构")
|
||||
@Schema(title = "组织架构")
|
||||
public class SysOrganizationTree implements TreeNode<Integer> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -23,61 +23,61 @@ public class SysOrganizationTree implements TreeNode<Integer> {
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@ApiModelProperty(value = "ID")
|
||||
@Schema(title = "ID")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 组织名称
|
||||
*/
|
||||
@ApiModelProperty(value = "组织名称")
|
||||
@Schema(title = "组织名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 父级ID
|
||||
*/
|
||||
@ApiModelProperty(value = "父级ID")
|
||||
@Schema(title = "父级ID")
|
||||
private Integer parentId;
|
||||
|
||||
/**
|
||||
* 层级信息,从根节点到当前节点的最短路径,使用-分割节点ID
|
||||
*/
|
||||
@ApiModelProperty(value = "层级信息,从根节点到当前节点的最短路径,使用-分割节点ID")
|
||||
@Schema(title = "层级信息,从根节点到当前节点的最短路径,使用-分割节点ID")
|
||||
private String hierarchy;
|
||||
|
||||
/**
|
||||
* 当前节点深度
|
||||
*/
|
||||
@ApiModelProperty(value = "当前节点深度")
|
||||
@Schema(title = "当前节点深度")
|
||||
private Integer depth;
|
||||
|
||||
/**
|
||||
* 排序字段,由小到大
|
||||
*/
|
||||
@ApiModelProperty(value = "排序字段,由小到大")
|
||||
@Schema(title = "排序字段,由小到大")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 描述信息
|
||||
*/
|
||||
@ApiModelProperty(value = "描述信息")
|
||||
@Schema(title = "描述信息")
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@Schema(title = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
@Schema(title = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 下级组织
|
||||
*/
|
||||
@ApiModelProperty(value = "下级组织")
|
||||
@Schema(title = "下级组织")
|
||||
List<SysOrganizationTree> children = new ArrayList<>();
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.hccake.ballcat.system.model.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@@ -15,36 +15,36 @@ import java.time.LocalDateTime;
|
||||
* @since 2017-10-29
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "角色")
|
||||
@Schema(title = "角色")
|
||||
public class SysRolePageVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "角色编号")
|
||||
@Schema(title = "角色编号")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "角色名称")
|
||||
@Schema(title = "角色名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "角色标识")
|
||||
@Schema(title = "角色标识")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty("角色类型,1:系统角色 2:业务角色")
|
||||
@Schema(title = "角色类型,1:系统角色 2:业务角色")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("数据权限类型")
|
||||
@Schema(title = "数据权限类型")
|
||||
private Integer scopeType;
|
||||
|
||||
@ApiModelProperty("数据范围资源,当数据范围类型为自定义时使用")
|
||||
@Schema(title = "数据范围资源,当数据范围类型为自定义时使用")
|
||||
private String scopeResources;
|
||||
|
||||
@ApiModelProperty(value = "角色备注")
|
||||
@Schema(title = "角色备注")
|
||||
private String remarks;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@Schema(title = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
@Schema(title = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.hccake.ballcat.system.model.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -13,7 +13,7 @@ import java.io.Serializable;
|
||||
* @date 2019-09-12 20:39:31
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "系统用户信息")
|
||||
@Schema(title = "系统用户信息")
|
||||
public class SysUserInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -21,37 +21,37 @@ public class SysUserInfo implements Serializable {
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@Schema(title = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
/**
|
||||
* 登录账号
|
||||
*/
|
||||
@ApiModelProperty(value = "登录账号")
|
||||
@Schema(title = "登录账号")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
@ApiModelProperty(value = "昵称")
|
||||
@Schema(title = "昵称")
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
@ApiModelProperty(value = "头像")
|
||||
@Schema(title = "头像")
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 组织机构ID
|
||||
*/
|
||||
@ApiModelProperty(value = "组织机构ID")
|
||||
@Schema(title = "组织机构ID")
|
||||
private Integer organizationId;
|
||||
|
||||
/**
|
||||
* 用户类型
|
||||
*/
|
||||
@ApiModelProperty(value = "用户类型:1-系统用户,2-客户用户")
|
||||
@Schema(title = "用户类型:1-系统用户,2-客户用户")
|
||||
private Integer type;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.hccake.ballcat.system.model.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -14,7 +14,7 @@ import java.time.LocalDateTime;
|
||||
* @date 2019-09-12 20:39:31
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "系统用户VO")
|
||||
@Schema(title = "系统用户VO")
|
||||
public class SysUserPageVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -22,76 +22,76 @@ public class SysUserPageVO implements Serializable {
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@Schema(title = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
/**
|
||||
* 登录账号
|
||||
*/
|
||||
@ApiModelProperty(value = "登录账号")
|
||||
@Schema(title = "登录账号")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
@ApiModelProperty(value = "昵称")
|
||||
@Schema(title = "昵称")
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
@ApiModelProperty(value = "头像")
|
||||
@Schema(title = "头像")
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 性别(0-默认未知,1-男,2-女)
|
||||
*/
|
||||
@ApiModelProperty(value = "性别(0-默认未知,1-男,2-女)")
|
||||
@Schema(title = "性别(0-默认未知,1-男,2-女)")
|
||||
private Integer sex;
|
||||
|
||||
/**
|
||||
* 电子邮件
|
||||
*/
|
||||
@ApiModelProperty(value = "电子邮件")
|
||||
@Schema(title = "电子邮件")
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 电话
|
||||
*/
|
||||
@ApiModelProperty(value = "电话")
|
||||
@Schema(title = "电话")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 状态(1-正常,0-冻结)
|
||||
*/
|
||||
@ApiModelProperty(value = "状态(1-正常, 0-冻结)")
|
||||
@Schema(title = "状态(1-正常, 0-冻结)")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "用户类型:1-系统用户,2-客户用户")
|
||||
@Schema(title = "用户类型:1-系统用户,2-客户用户")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 组织机构ID
|
||||
*/
|
||||
@ApiModelProperty(value = "组织机构ID")
|
||||
@Schema(title = "组织机构ID")
|
||||
private Integer organizationId;
|
||||
|
||||
/**
|
||||
* 组织机构名称
|
||||
*/
|
||||
@ApiModelProperty(value = "组织机构名称")
|
||||
@Schema(title = "组织机构名称")
|
||||
private String organizationName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@Schema(title = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
@Schema(title = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user