add 整合 springdoc-openapi-javadoc 基于代码注释生成文档
| | |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.springdoc</groupId> |
| | | <artifactId>springdoc-openapi-javadoc</artifactId> |
| | | <version>1.6.9</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.apache.poi</groupId> |
| | | <artifactId>poi</artifactId> |
| | | <version>${poi.version}</version> |
| | |
| | | <source>${java.version}</source> |
| | | <target>${java.version}</target> |
| | | <encoding>${project.build.sourceEncoding}</encoding> |
| | | <annotationProcessorPaths> |
| | | <path> |
| | | <groupId>com.github.therapi</groupId> |
| | | <artifactId>therapi-runtime-javadoc-scribe</artifactId> |
| | | <version>0.13.0</version> |
| | | </path> |
| | | <path> |
| | | <groupId>org.projectlombok</groupId> |
| | | <artifactId>lombok</artifactId> |
| | | <version>1.18.24</version> |
| | | </path> |
| | | </annotationProcessorPaths> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | |
| | | import com.ruoyi.sms.core.SmsTemplate; |
| | | import com.ruoyi.sms.entity.SmsResult; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | /** |
| | | * 短信验证码 |
| | | */ |
| | | @Operation(summary = "短信验证码") |
| | | @GetMapping("/captchaSms") |
| | | public R<Void> smsCaptcha(@Parameter(name = "用户手机号") |
| | | @NotBlank(message = "{user.phonenumber.not.blank}") |
| | |
| | | /** |
| | | * 生成验证码 |
| | | */ |
| | | @Operation(summary = "生成验证码") |
| | | @GetMapping("/captchaImage") |
| | | public R<Map<String, Object>> getCode() { |
| | | Map<String, Object> ajax = new HashMap<>(); |
| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.system.domain.SysCache; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.data.redis.connection.RedisServerCommands; |
| | |
| | | CACHES.add(new SysCache(CacheConstants.RATE_LIMIT_KEY, "限流处理")); |
| | | } |
| | | |
| | | @Operation(summary = "获取缓存监控详细信息") |
| | | @SaCheckPermission("monitor:cache:list") |
| | | @GetMapping() |
| | | public R<Map<String, Object>> getInfo() throws Exception { |
| | |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @Operation(summary = "获取缓存名称列表") |
| | | @SaCheckPermission("monitor:cache:list") |
| | | @GetMapping("/getNames") |
| | | public R<List<SysCache>> cache() { |
| | | return R.ok(CACHES); |
| | | } |
| | | |
| | | @Operation(summary = "获取KEYS基于缓存名") |
| | | @SaCheckPermission("monitor:cache:list") |
| | | @GetMapping("/getKeys/{cacheName}") |
| | | public R<Set<String>> getCacheKeys(@PathVariable String cacheName) { |
| | |
| | | return R.ok(cacheKyes); |
| | | } |
| | | |
| | | @Operation(summary = "获取值基于缓存名与KEY") |
| | | @SaCheckPermission("monitor:cache:list") |
| | | @GetMapping("/getValue/{cacheName}/{cacheKey}") |
| | | public R<SysCache> getCacheValue(@PathVariable String cacheName, @PathVariable String cacheKey) { |
| | |
| | | return R.ok(sysCache); |
| | | } |
| | | |
| | | @Operation(summary = "清空缓存名") |
| | | @SaCheckPermission("monitor:cache:list") |
| | | @DeleteMapping("/clearCacheName/{cacheName}") |
| | | public R<Void> clearCacheName(@PathVariable String cacheName) { |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Operation(summary = "清空缓存KEY") |
| | | @SaCheckPermission("monitor:cache:list") |
| | | @DeleteMapping("/clearCacheKey/{cacheKey}") |
| | | public R<Void> clearCacheKey(@PathVariable String cacheKey) { |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Operation(summary = "清空所有缓存") |
| | | @SaCheckPermission("monitor:cache:list") |
| | | @DeleteMapping("/clearCacheAll") |
| | | public R<Void> clearCacheAll() { |
| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.system.domain.SysLogininfor; |
| | | import com.ruoyi.system.service.ISysLogininforService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | |
| | | private final ISysLogininforService logininforService; |
| | | |
| | | @Operation(summary = "查询系统访问记录列表") |
| | | @SaCheckPermission("monitor:logininfor:list") |
| | | @GetMapping("/list") |
| | | public TableDataInfo<SysLogininfor> list(SysLogininfor logininfor, PageQuery pageQuery) { |
| | | return logininforService.selectPageLogininforList(logininfor, pageQuery); |
| | | } |
| | | |
| | | @Operation(summary = "导出系统访问记录列表") |
| | | @Log(title = "登录日志", businessType = BusinessType.EXPORT) |
| | | @SaCheckPermission("monitor:logininfor:export") |
| | | @PostMapping("/export") |
| | |
| | | ExcelUtil.exportExcel(list, "登录日志", SysLogininfor.class, response); |
| | | } |
| | | |
| | | @Operation(summary = "删除系统访问记录") |
| | | @SaCheckPermission("monitor:logininfor:remove") |
| | | @Log(title = "登录日志", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{infoIds}") |
| | |
| | | return toAjax(logininforService.deleteLogininforByIds(infoIds)); |
| | | } |
| | | |
| | | @Operation(summary = "清空系统访问记录") |
| | | @SaCheckPermission("monitor:logininfor:remove") |
| | | @Log(title = "登录日志", businessType = BusinessType.CLEAN) |
| | | @DeleteMapping("/clean") |
| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.system.domain.SysOperLog; |
| | | import com.ruoyi.system.service.ISysOperLogService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | |
| | | private final ISysOperLogService operLogService; |
| | | |
| | | @Operation(summary = "查询操作日志记录列表") |
| | | @SaCheckPermission("monitor:operlog:list") |
| | | @GetMapping("/list") |
| | | public TableDataInfo<SysOperLog> list(SysOperLog operLog, PageQuery pageQuery) { |
| | | return operLogService.selectPageOperLogList(operLog, pageQuery); |
| | | } |
| | | |
| | | @Operation(summary = "导出操作日志记录列表") |
| | | @Log(title = "操作日志", businessType = BusinessType.EXPORT) |
| | | @SaCheckPermission("monitor:operlog:export") |
| | | @PostMapping("/export") |
| | |
| | | ExcelUtil.exportExcel(list, "操作日志", SysOperLog.class, response); |
| | | } |
| | | |
| | | @Operation(summary = "删除操作日志记录") |
| | | @Log(title = "操作日志", businessType = BusinessType.DELETE) |
| | | @SaCheckPermission("monitor:operlog:remove") |
| | | @DeleteMapping("/{operIds}") |
| | |
| | | return toAjax(operLogService.deleteOperLogByIds(operIds)); |
| | | } |
| | | |
| | | @Operation(summary = "清空操作日志记录") |
| | | @Log(title = "操作日志", businessType = BusinessType.CLEAN) |
| | | @SaCheckPermission("monitor:operlog:remove") |
| | | @DeleteMapping("/clean") |
| | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.redis.RedisUtils; |
| | | import com.ruoyi.system.domain.SysUserOnline; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @RequestMapping("/monitor/online") |
| | | public class SysUserOnlineController extends BaseController { |
| | | |
| | | @Operation(summary = "在线用户列表") |
| | | @SaCheckPermission("monitor:online:list") |
| | | @GetMapping("/list") |
| | | public TableDataInfo<SysUserOnline> list(String ipaddr, String userName) { |
| | |
| | | /** |
| | | * 强退用户 |
| | | */ |
| | | @Operation(summary = "强退用户") |
| | | @SaCheckPermission("monitor:online:forceLogout") |
| | | @Log(title = "在线用户", businessType = BusinessType.FORCE) |
| | | @DeleteMapping("/{tokenId}") |
| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.system.domain.SysConfig; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | /** |
| | | * 获取参数配置列表 |
| | | */ |
| | | @Operation(summary = "获取参数配置列表") |
| | | @SaCheckPermission("system:config:list") |
| | | @GetMapping("/list") |
| | | public TableDataInfo<SysConfig> list(SysConfig config, PageQuery pageQuery) { |
| | | return configService.selectPageConfigList(config, pageQuery); |
| | | } |
| | | |
| | | @Operation(summary = "导出参数配置列表") |
| | | @Log(title = "参数管理", businessType = BusinessType.EXPORT) |
| | | @SaCheckPermission("system:config:export") |
| | | @PostMapping("/export") |
| | |
| | | /** |
| | | * 根据参数编号获取详细信息 |
| | | */ |
| | | @Operation(summary = "根据参数编号获取详细信息") |
| | | @SaCheckPermission("system:config:query") |
| | | @GetMapping(value = "/{configId}") |
| | | public R<SysConfig> getInfo(@Parameter(name = "参数ID") @PathVariable Long configId) { |
| | |
| | | /** |
| | | * 根据参数键名查询参数值 |
| | | */ |
| | | @Operation(summary = "根据参数键名查询参数值") |
| | | @GetMapping(value = "/configKey/{configKey}") |
| | | public R<Void> getConfigKey(@Parameter(name = "参数Key") @PathVariable String configKey) { |
| | | return R.ok(configService.selectConfigByKey(configKey)); |
| | |
| | | /** |
| | | * 新增参数配置 |
| | | */ |
| | | @Operation(summary = "新增参数配置") |
| | | @SaCheckPermission("system:config:add") |
| | | @Log(title = "参数管理", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | |
| | | /** |
| | | * 修改参数配置 |
| | | */ |
| | | @Operation(summary = "修改参数配置") |
| | | @SaCheckPermission("system:config:edit") |
| | | @Log(title = "参数管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | |
| | | /** |
| | | * 根据参数键名修改参数配置 |
| | | */ |
| | | @Operation(summary = "根据参数键名修改参数配置") |
| | | @SaCheckPermission("system:config:edit") |
| | | @Log(title = "参数管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/updateByKey") |
| | |
| | | /** |
| | | * 删除参数配置 |
| | | */ |
| | | @Operation(summary = "删除参数配置") |
| | | @SaCheckPermission("system:config:remove") |
| | | @Log(title = "参数管理", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{configIds}") |
| | |
| | | /** |
| | | * 刷新参数缓存 |
| | | */ |
| | | @Operation(summary = "刷新参数缓存") |
| | | @SaCheckPermission("system:config:remove") |
| | | @Log(title = "参数管理", businessType = BusinessType.CLEAN) |
| | | @DeleteMapping("/refreshCache") |
| | |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.system.service.ISysDeptService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | /** |
| | | * 获取部门列表 |
| | | */ |
| | | @Operation(summary = "获取部门列表") |
| | | @SaCheckPermission("system:dept:list") |
| | | @GetMapping("/list") |
| | | public R<List<SysDept>> list(SysDept dept) { |
| | |
| | | /** |
| | | * 查询部门列表(排除节点) |
| | | */ |
| | | @Operation(summary = "查询部门列表(排除节点)") |
| | | @SaCheckPermission("system:dept:list") |
| | | @GetMapping("/list/exclude/{deptId}") |
| | | public R<List<SysDept>> excludeChild(@Parameter(name = "部门ID") @PathVariable(value = "deptId", required = false) Long deptId) { |
| | |
| | | /** |
| | | * 根据部门编号获取详细信息 |
| | | */ |
| | | @Operation(summary = "根据部门编号获取详细信息") |
| | | @SaCheckPermission("system:dept:query") |
| | | @GetMapping(value = "/{deptId}") |
| | | public R<SysDept> getInfo(@Parameter(name = "部门ID") @PathVariable Long deptId) { |
| | |
| | | /** |
| | | * 获取部门下拉树列表 |
| | | */ |
| | | @Operation(summary = "获取部门下拉树列表") |
| | | @GetMapping("/treeselect") |
| | | public R<List<Tree<Long>>> treeselect(SysDept dept) { |
| | | List<SysDept> depts = deptService.selectDeptList(dept); |
| | |
| | | /** |
| | | * 加载对应角色部门列表树 |
| | | */ |
| | | @Operation(summary = "加载对应角色部门列表树") |
| | | @GetMapping(value = "/roleDeptTreeselect/{roleId}") |
| | | public R<Map<String, Object>> roleDeptTreeselect(@Parameter(name = "角色ID") @PathVariable("roleId") Long roleId) { |
| | | List<SysDept> depts = deptService.selectDeptList(new SysDept()); |
| | |
| | | /** |
| | | * 新增部门 |
| | | */ |
| | | @Operation(summary = "新增部门") |
| | | @SaCheckPermission("system:dept:add") |
| | | @Log(title = "部门管理", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | |
| | | /** |
| | | * 修改部门 |
| | | */ |
| | | @Operation(summary = "修改部门") |
| | | @SaCheckPermission("system:dept:edit") |
| | | @Log(title = "部门管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | |
| | | /** |
| | | * 删除部门 |
| | | */ |
| | | @Operation(summary = "删除部门") |
| | | @SaCheckPermission("system:dept:remove") |
| | | @Log(title = "部门管理", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{deptId}") |
| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.system.service.ISysDictDataService; |
| | | import com.ruoyi.system.service.ISysDictTypeService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | private final ISysDictDataService dictDataService; |
| | | private final ISysDictTypeService dictTypeService; |
| | | |
| | | @Operation(summary = "查询字典数据列表") |
| | | @SaCheckPermission("system:dict:list") |
| | | @GetMapping("/list") |
| | | public TableDataInfo<SysDictData> list(SysDictData dictData, PageQuery pageQuery) { |
| | | return dictDataService.selectPageDictDataList(dictData, pageQuery); |
| | | } |
| | | |
| | | @Operation(summary = "导出字典数据列表") |
| | | @Log(title = "字典数据", businessType = BusinessType.EXPORT) |
| | | @SaCheckPermission("system:dict:export") |
| | | @PostMapping("/export") |
| | |
| | | /** |
| | | * 查询字典数据详细 |
| | | */ |
| | | @Operation(summary = "查询字典数据详细") |
| | | @SaCheckPermission("system:dict:query") |
| | | @GetMapping(value = "/{dictCode}") |
| | | public R<SysDictData> getInfo(@Parameter(name = "字典code") @PathVariable Long dictCode) { |
| | |
| | | /** |
| | | * 根据字典类型查询字典数据信息 |
| | | */ |
| | | @Operation(summary = "根据字典类型查询字典数据信息") |
| | | @GetMapping(value = "/type/{dictType}") |
| | | public R<List<SysDictData>> dictType(@Parameter(name = "字典类型") @PathVariable String dictType) { |
| | | List<SysDictData> data = dictTypeService.selectDictDataByType(dictType); |
| | |
| | | /** |
| | | * 新增字典类型 |
| | | */ |
| | | @Operation(summary = "新增字典类型") |
| | | @SaCheckPermission("system:dict:add") |
| | | @Log(title = "字典数据", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | |
| | | /** |
| | | * 修改保存字典类型 |
| | | */ |
| | | @Operation(summary = "修改保存字典类型") |
| | | @SaCheckPermission("system:dict:edit") |
| | | @Log(title = "字典数据", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | |
| | | /** |
| | | * 删除字典类型 |
| | | */ |
| | | @Operation(summary = "删除字典类型") |
| | | @SaCheckPermission("system:dict:remove") |
| | | @Log(title = "字典类型", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{dictCodes}") |
| | |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.system.service.ISysDictTypeService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | |
| | | private final ISysDictTypeService dictTypeService; |
| | | |
| | | @Operation(summary = "查询字典类型列表") |
| | | @SaCheckPermission("system:dict:list") |
| | | @GetMapping("/list") |
| | | public TableDataInfo<SysDictType> list(SysDictType dictType, PageQuery pageQuery) { |
| | | return dictTypeService.selectPageDictTypeList(dictType, pageQuery); |
| | | } |
| | | |
| | | @Operation(summary = "导出字典类型列表") |
| | | @Log(title = "字典类型", businessType = BusinessType.EXPORT) |
| | | @SaCheckPermission("system:dict:export") |
| | | @PostMapping("/export") |
| | |
| | | /** |
| | | * 查询字典类型详细 |
| | | */ |
| | | @Operation(summary = "查询字典类型详细") |
| | | @SaCheckPermission("system:dict:query") |
| | | @GetMapping(value = "/{dictId}") |
| | | public R<SysDictType> getInfo(@Parameter(name = "字典ID") @PathVariable Long dictId) { |
| | |
| | | /** |
| | | * 新增字典类型 |
| | | */ |
| | | @Operation(summary = "新增字典类型") |
| | | @SaCheckPermission("system:dict:add") |
| | | @Log(title = "字典类型", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | |
| | | /** |
| | | * 修改字典类型 |
| | | */ |
| | | @Operation(summary = "修改字典类型") |
| | | @SaCheckPermission("system:dict:edit") |
| | | @Log(title = "字典类型", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | |
| | | /** |
| | | * 删除字典类型 |
| | | */ |
| | | @Operation(summary = "删除字典类型") |
| | | @SaCheckPermission("system:dict:remove") |
| | | @Log(title = "字典类型", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{dictIds}") |
| | |
| | | /** |
| | | * 刷新字典缓存 |
| | | */ |
| | | @Operation(summary = "刷新字典缓存") |
| | | @SaCheckPermission("system:dict:remove") |
| | | @Log(title = "字典类型", businessType = BusinessType.CLEAN) |
| | | @DeleteMapping("/refreshCache") |
| | |
| | | /** |
| | | * 获取字典选择框列表 |
| | | */ |
| | | @Operation(summary = "获取字典选择框列表") |
| | | @GetMapping("/optionselect") |
| | | public R<List<SysDictType>> optionselect() { |
| | | List<SysDictType> dictTypes = dictTypeService.selectDictTypeAll(); |
| | |
| | | |
| | | import com.ruoyi.common.config.RuoYiConfig; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | /** |
| | | * 访问首页,提示语 |
| | | */ |
| | | @Operation(summary = "访问首页,提示语") |
| | | @GetMapping("/") |
| | | public String index() { |
| | | return StringUtils.format("欢迎使用{}后台管理框架,当前版本:v{},请通过前端地址访问。", ruoyiConfig.getName(), ruoyiConfig.getVersion()); |
| | |
| | | import com.ruoyi.system.service.ISysUserService; |
| | | import com.ruoyi.system.service.SysLoginService; |
| | | import com.ruoyi.system.service.SysPermissionService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | * @return 结果 |
| | | */ |
| | | @Anonymous |
| | | @Operation(summary = "登录方法") |
| | | @PostMapping("/login") |
| | | public R<Map<String, Object>> login(@Validated @RequestBody LoginBody loginBody) { |
| | | Map<String, Object> ajax = new HashMap<>(); |
| | |
| | | * @return 结果 |
| | | */ |
| | | @Anonymous |
| | | @Operation(summary = "短信登录(示例)") |
| | | @PostMapping("/smsLogin") |
| | | public R<Map<String, Object>> smsLogin(@Validated @RequestBody SmsLoginBody smsLoginBody) { |
| | | Map<String, Object> ajax = new HashMap<>(); |
| | |
| | | * @return 结果 |
| | | */ |
| | | @Anonymous |
| | | @Operation(summary = "小程序登录(示例)") |
| | | @PostMapping("/xcxLogin") |
| | | public R<Map<String, Object>> xcxLogin(@NotBlank(message = "{xcx.code.not.blank}") String xcxCode) { |
| | | Map<String, Object> ajax = new HashMap<>(); |
| | |
| | | } |
| | | |
| | | @Anonymous |
| | | @Operation(summary = "登出方法") |
| | | @PostMapping("/logout") |
| | | public R<Void> logout() { |
| | | loginService.logout(); |
| | |
| | | * |
| | | * @return 用户信息 |
| | | */ |
| | | @Operation(summary = "获取用户信息") |
| | | @GetMapping("getInfo") |
| | | public R<Map<String, Object>> getInfo() { |
| | | SysUser user = userService.selectUserById(LoginHelper.getUserId()); |
| | |
| | | * |
| | | * @return 路由信息 |
| | | */ |
| | | @Operation(summary = "获取路由信息") |
| | | @GetMapping("getRouters") |
| | | public R<List<RouterVo>> getRouters() { |
| | | Long userId = LoginHelper.getUserId(); |
| | |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.system.service.ISysMenuService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | /** |
| | | * 获取菜单列表 |
| | | */ |
| | | @Operation(summary = "获取菜单列表") |
| | | @SaCheckPermission("system:menu:list") |
| | | @GetMapping("/list") |
| | | public R<List<SysMenu>> list(SysMenu menu) { |
| | |
| | | /** |
| | | * 根据菜单编号获取详细信息 |
| | | */ |
| | | @Operation(summary = "根据菜单编号获取详细信息") |
| | | @SaCheckPermission("system:menu:query") |
| | | @GetMapping(value = "/{menuId}") |
| | | public R<SysMenu> getInfo(@Parameter(name = "菜单ID") @PathVariable Long menuId) { |
| | |
| | | /** |
| | | * 获取菜单下拉树列表 |
| | | */ |
| | | @Operation(summary = "获取菜单下拉树列表") |
| | | @GetMapping("/treeselect") |
| | | public R<List<Tree<Long>>> treeselect(SysMenu menu) { |
| | | List<SysMenu> menus = menuService.selectMenuList(menu, getUserId()); |
| | |
| | | /** |
| | | * 加载对应角色菜单列表树 |
| | | */ |
| | | @Operation(summary = "加载对应角色菜单列表树") |
| | | @GetMapping(value = "/roleMenuTreeselect/{roleId}") |
| | | public R<Map<String, Object>> roleMenuTreeselect(@Parameter(name = "角色ID") @PathVariable("roleId") Long roleId) { |
| | | List<SysMenu> menus = menuService.selectMenuList(getUserId()); |
| | |
| | | /** |
| | | * 新增菜单 |
| | | */ |
| | | @Operation(summary = "新增菜单") |
| | | @SaCheckPermission("system:menu:add") |
| | | @Log(title = "菜单管理", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | |
| | | /** |
| | | * 修改菜单 |
| | | */ |
| | | @Operation(summary = "修改菜单") |
| | | @SaCheckPermission("system:menu:edit") |
| | | @Log(title = "菜单管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | |
| | | /** |
| | | * 删除菜单 |
| | | */ |
| | | @Operation(summary = "删除菜单") |
| | | @SaCheckPermission("system:menu:remove") |
| | | @Log(title = "菜单管理", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{menuId}") |
| | |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.system.domain.SysNotice; |
| | | import com.ruoyi.system.service.ISysNoticeService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | /** |
| | | * 获取通知公告列表 |
| | | */ |
| | | @Operation(summary = "获取通知公告列表") |
| | | @SaCheckPermission("system:notice:list") |
| | | @GetMapping("/list") |
| | | public TableDataInfo<SysNotice> list(SysNotice notice, PageQuery pageQuery) { |
| | |
| | | /** |
| | | * 根据通知公告编号获取详细信息 |
| | | */ |
| | | @Operation(summary = "根据通知公告编号获取详细信息") |
| | | @SaCheckPermission("system:notice:query") |
| | | @GetMapping(value = "/{noticeId}") |
| | | public R<SysNotice> getInfo(@Parameter(name = "公告ID") @PathVariable Long noticeId) { |
| | |
| | | /** |
| | | * 新增通知公告 |
| | | */ |
| | | @Operation(summary = "新增通知公告") |
| | | @SaCheckPermission("system:notice:add") |
| | | @Log(title = "通知公告", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | |
| | | /** |
| | | * 修改通知公告 |
| | | */ |
| | | @Operation(summary = "修改通知公告") |
| | | @SaCheckPermission("system:notice:edit") |
| | | @Log(title = "通知公告", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | |
| | | /** |
| | | * 删除通知公告 |
| | | */ |
| | | @Operation(summary = "删除通知公告") |
| | | @SaCheckPermission("system:notice:remove") |
| | | @Log(title = "通知公告", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{noticeIds}") |
| | |
| | | import com.ruoyi.system.domain.bo.SysOssConfigBo; |
| | | import com.ruoyi.system.domain.vo.SysOssConfigVo; |
| | | import com.ruoyi.system.service.ISysOssConfigService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | /** |
| | | * 查询对象存储配置列表 |
| | | */ |
| | | @Operation(summary = "查询对象存储配置列表") |
| | | @SaCheckPermission("system:oss:list") |
| | | @GetMapping("/list") |
| | | public TableDataInfo<SysOssConfigVo> list(@Validated(QueryGroup.class) SysOssConfigBo bo, PageQuery pageQuery) { |
| | |
| | | /** |
| | | * 获取对象存储配置详细信息 |
| | | */ |
| | | @Operation(summary = "获取对象存储配置详细信息") |
| | | @SaCheckPermission("system:oss:query") |
| | | @GetMapping("/{ossConfigId}") |
| | | public R<SysOssConfigVo> getInfo(@Parameter(name = "OSS配置ID") |
| | |
| | | /** |
| | | * 新增对象存储配置 |
| | | */ |
| | | @Operation(summary = "新增对象存储配置") |
| | | @SaCheckPermission("system:oss:add") |
| | | @Log(title = "对象存储配置", businessType = BusinessType.INSERT) |
| | | @RepeatSubmit() |
| | |
| | | /** |
| | | * 修改对象存储配置 |
| | | */ |
| | | @Operation(summary = "修改对象存储配置") |
| | | @SaCheckPermission("system:oss:edit") |
| | | @Log(title = "对象存储配置", businessType = BusinessType.UPDATE) |
| | | @RepeatSubmit() |
| | |
| | | /** |
| | | * 删除对象存储配置 |
| | | */ |
| | | @Operation(summary = "删除对象存储配置") |
| | | @SaCheckPermission("system:oss:remove") |
| | | @Log(title = "对象存储配置", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ossConfigIds}") |
| | |
| | | /** |
| | | * 状态修改 |
| | | */ |
| | | @Operation(summary = "状态修改") |
| | | @SaCheckPermission("system:oss:edit") |
| | | @Log(title = "对象存储状态修改", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/changeStatus") |
| | |
| | | import com.ruoyi.system.domain.bo.SysOssBo; |
| | | import com.ruoyi.system.domain.vo.SysOssVo; |
| | | import com.ruoyi.system.service.ISysOssService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.Parameters; |
| | | import io.swagger.v3.oas.annotations.enums.ParameterIn; |
| | |
| | | /** |
| | | * 查询OSS对象存储列表 |
| | | */ |
| | | @Operation(summary = "查询OSS对象存储列表") |
| | | @SaCheckPermission("system:oss:list") |
| | | @GetMapping("/list") |
| | | public TableDataInfo<SysOssVo> list(@Validated(QueryGroup.class) SysOssBo bo, PageQuery pageQuery) { |
| | |
| | | /** |
| | | * 查询OSS对象基于id串 |
| | | */ |
| | | @Operation(summary = "查询OSS对象基于ID") |
| | | @SaCheckPermission("system:oss:list") |
| | | @GetMapping("/listByIds/{ossIds}") |
| | | public R<List<SysOssVo>> listByIds(@Parameter(name = "OSS对象ID串") |
| | |
| | | /** |
| | | * 上传OSS对象存储 |
| | | */ |
| | | @Operation(summary = "上传OSS对象存储") |
| | | @Parameters({ |
| | | @Parameter(name = "file", description = "文件", in = ParameterIn.QUERY, required = true) |
| | | }) |
| | |
| | | return R.ok(map); |
| | | } |
| | | |
| | | @Operation(summary = "下载OSS对象存储") |
| | | @SaCheckPermission("system:oss:download") |
| | | @GetMapping("/download/{ossId}") |
| | | public void download(@Parameter(name = "OSS对象ID") @PathVariable Long ossId, HttpServletResponse response) throws IOException { |
| | |
| | | /** |
| | | * 删除OSS对象存储 |
| | | */ |
| | | @Operation(summary = "删除OSS对象存储") |
| | | @SaCheckPermission("system:oss:remove") |
| | | @Log(title = "OSS对象存储", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ossIds}") |
| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.system.domain.SysPost; |
| | | import com.ruoyi.system.service.ISysPostService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | /** |
| | | * 获取岗位列表 |
| | | */ |
| | | @Operation(summary = "获取岗位列表") |
| | | @SaCheckPermission("system:post:list") |
| | | @GetMapping("/list") |
| | | public TableDataInfo<SysPost> list(SysPost post, PageQuery pageQuery) { |
| | | return postService.selectPagePostList(post, pageQuery); |
| | | } |
| | | |
| | | @Operation(summary = "导出岗位列表") |
| | | @Log(title = "岗位管理", businessType = BusinessType.EXPORT) |
| | | @SaCheckPermission("system:post:export") |
| | | @PostMapping("/export") |
| | |
| | | /** |
| | | * 根据岗位编号获取详细信息 |
| | | */ |
| | | @Operation(summary = "根据岗位编号获取详细信息") |
| | | @SaCheckPermission("system:post:query") |
| | | @GetMapping(value = "/{postId}") |
| | | public R<SysPost> getInfo(@Parameter(name = "岗位ID") @PathVariable Long postId) { |
| | |
| | | /** |
| | | * 新增岗位 |
| | | */ |
| | | @Operation(summary = "新增岗位") |
| | | @SaCheckPermission("system:post:add") |
| | | @Log(title = "岗位管理", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | |
| | | /** |
| | | * 修改岗位 |
| | | */ |
| | | @Operation(summary = "修改岗位") |
| | | @SaCheckPermission("system:post:edit") |
| | | @Log(title = "岗位管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | |
| | | /** |
| | | * 删除岗位 |
| | | */ |
| | | @Operation(summary = "删除岗位") |
| | | @SaCheckPermission("system:post:remove") |
| | | @Log(title = "岗位管理", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{postIds}") |
| | |
| | | /** |
| | | * 获取岗位选择框列表 |
| | | */ |
| | | @Operation(summary = "获取岗位选择框列表") |
| | | @GetMapping("/optionselect") |
| | | public R<List<SysPost>> optionselect() { |
| | | List<SysPost> posts = postService.selectPostAll(); |
| | |
| | | import com.ruoyi.system.domain.SysOss; |
| | | import com.ruoyi.system.service.ISysOssService; |
| | | import com.ruoyi.system.service.ISysUserService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.Parameters; |
| | | import io.swagger.v3.oas.annotations.enums.ParameterIn; |
| | |
| | | /** |
| | | * 个人信息 |
| | | */ |
| | | @Operation(summary = "个人信息") |
| | | @GetMapping |
| | | public R<Map<String, Object>> profile() { |
| | | SysUser user = userService.selectUserById(getUserId()); |
| | |
| | | /** |
| | | * 修改用户 |
| | | */ |
| | | @Operation(summary = "修改用户") |
| | | @Log(title = "个人信息", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public R<Void> updateProfile(@RequestBody SysUser user) { |
| | |
| | | /** |
| | | * 重置密码 |
| | | */ |
| | | @Operation(summary = "重置密码") |
| | | @Parameters({ |
| | | @Parameter(name = "oldPassword", description = "旧密码", in = ParameterIn.QUERY), |
| | | @Parameter(name = "newPassword", description = "新密码", in = ParameterIn.QUERY) |
| | |
| | | /** |
| | | * 头像上传 |
| | | */ |
| | | @Operation(summary = "头像上传") |
| | | @Parameters({ |
| | | @Parameter(name = "avatarfile", description = "用户头像", in = ParameterIn.QUERY, required = true) |
| | | }) |
| | |
| | | import com.ruoyi.common.core.domain.model.RegisterBody; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | | import com.ruoyi.system.service.SysRegisterService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | private final ISysConfigService configService; |
| | | |
| | | @Anonymous |
| | | @Operation(summary = "用户注册") |
| | | @PostMapping("/register") |
| | | public R<Void> register(@Validated @RequestBody RegisterBody user) { |
| | | if (!("true".equals(configService.selectConfigByKey("sys.account.registerUser")))) { |
| | |
| | | import com.ruoyi.system.service.ISysRoleService; |
| | | import com.ruoyi.system.service.ISysUserService; |
| | | import com.ruoyi.system.service.SysPermissionService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.Parameters; |
| | | import io.swagger.v3.oas.annotations.enums.ParameterIn; |
| | |
| | | private final ISysUserService userService; |
| | | private final SysPermissionService permissionService; |
| | | |
| | | @Operation(summary = "查询角色信息列表") |
| | | @SaCheckPermission("system:role:list") |
| | | @GetMapping("/list") |
| | | public TableDataInfo<SysRole> list(SysRole role, PageQuery pageQuery) { |
| | | return roleService.selectPageRoleList(role, pageQuery); |
| | | } |
| | | |
| | | @Operation(summary = "导出角色信息列表") |
| | | @Log(title = "角色管理", businessType = BusinessType.EXPORT) |
| | | @SaCheckPermission("system:role:export") |
| | | @PostMapping("/export") |
| | |
| | | /** |
| | | * 根据角色编号获取详细信息 |
| | | */ |
| | | @Operation(summary = "根据角色编号获取详细信息") |
| | | @SaCheckPermission("system:role:query") |
| | | @GetMapping(value = "/{roleId}") |
| | | public R<SysRole> getInfo(@Parameter(name = "角色ID") @PathVariable Long roleId) { |
| | |
| | | /** |
| | | * 新增角色 |
| | | */ |
| | | @Operation(summary = "新增角色") |
| | | @SaCheckPermission("system:role:add") |
| | | @Log(title = "角色管理", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | |
| | | /** |
| | | * 修改保存角色 |
| | | */ |
| | | @Operation(summary = "修改保存角色") |
| | | @SaCheckPermission("system:role:edit") |
| | | @Log(title = "角色管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | |
| | | /** |
| | | * 修改保存数据权限 |
| | | */ |
| | | @Operation(summary = "修改保存数据权限") |
| | | @SaCheckPermission("system:role:edit") |
| | | @Log(title = "角色管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/dataScope") |
| | |
| | | /** |
| | | * 状态修改 |
| | | */ |
| | | @Operation(summary = "状态修改") |
| | | @SaCheckPermission("system:role:edit") |
| | | @Log(title = "角色管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/changeStatus") |
| | |
| | | /** |
| | | * 删除角色 |
| | | */ |
| | | @Operation(summary = "删除角色") |
| | | @SaCheckPermission("system:role:remove") |
| | | @Log(title = "角色管理", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{roleIds}") |
| | |
| | | /** |
| | | * 获取角色选择框列表 |
| | | */ |
| | | @Operation(summary = "获取角色选择框列表") |
| | | @SaCheckPermission("system:role:query") |
| | | @GetMapping("/optionselect") |
| | | public R<List<SysRole>> optionselect() { |
| | |
| | | /** |
| | | * 查询已分配用户角色列表 |
| | | */ |
| | | @Operation(summary = "查询已分配用户角色列表") |
| | | @SaCheckPermission("system:role:list") |
| | | @GetMapping("/authUser/allocatedList") |
| | | public TableDataInfo<SysUser> allocatedList(SysUser user, PageQuery pageQuery) { |
| | |
| | | /** |
| | | * 查询未分配用户角色列表 |
| | | */ |
| | | @Operation(summary = "查询未分配用户角色列表") |
| | | @SaCheckPermission("system:role:list") |
| | | @GetMapping("/authUser/unallocatedList") |
| | | public TableDataInfo<SysUser> unallocatedList(SysUser user, PageQuery pageQuery) { |
| | |
| | | /** |
| | | * 取消授权用户 |
| | | */ |
| | | @Operation(summary = "取消授权用户") |
| | | @SaCheckPermission("system:role:edit") |
| | | @Log(title = "角色管理", businessType = BusinessType.GRANT) |
| | | @PutMapping("/authUser/cancel") |
| | |
| | | /** |
| | | * 批量取消授权用户 |
| | | */ |
| | | @Operation(summary = "批量取消授权用户") |
| | | @Parameters({ |
| | | @Parameter(name = "roleId", description = "角色ID", in = ParameterIn.QUERY), |
| | | @Parameter(name = "userIds", description = "用户ID串", in = ParameterIn.QUERY) |
| | |
| | | /** |
| | | * 批量选择用户授权 |
| | | */ |
| | | @Operation(summary = "批量选择用户授权") |
| | | @Parameters({ |
| | | @Parameter(name = "roleId", description = "角色ID", in = ParameterIn.QUERY), |
| | | @Parameter(name = "userIds", description = "用户ID串", in = ParameterIn.QUERY) |
| | |
| | | import com.ruoyi.system.service.ISysPostService; |
| | | import com.ruoyi.system.service.ISysRoleService; |
| | | import com.ruoyi.system.service.ISysUserService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.Parameters; |
| | | import io.swagger.v3.oas.annotations.enums.ParameterIn; |
| | |
| | | /** |
| | | * 获取用户列表 |
| | | */ |
| | | @Operation(summary = "获取用户列表") |
| | | @SaCheckPermission("system:user:list") |
| | | @GetMapping("/list") |
| | | public TableDataInfo<SysUser> list(SysUser user, PageQuery pageQuery) { |
| | | return userService.selectPageUserList(user, pageQuery); |
| | | } |
| | | |
| | | @Operation(summary = "导出用户列表") |
| | | @Log(title = "用户管理", businessType = BusinessType.EXPORT) |
| | | @SaCheckPermission("system:user:export") |
| | | @PostMapping("/export") |
| | |
| | | ExcelUtil.exportExcel(listVo, "用户数据", SysUserExportVo.class, response); |
| | | } |
| | | |
| | | @Operation(summary = "导入用户列表") |
| | | @Parameters({ |
| | | @Parameter(name = "file", description = "导入文件", required = true), |
| | | }) |
| | |
| | | return R.ok(result.getAnalysis()); |
| | | } |
| | | |
| | | @Operation(summary = "下载导入模板") |
| | | @PostMapping("/importTemplate") |
| | | public void importTemplate(HttpServletResponse response) { |
| | | ExcelUtil.exportExcel(new ArrayList<>(), "用户数据", SysUserImportVo.class, response); |
| | |
| | | /** |
| | | * 根据用户编号获取详细信息 |
| | | */ |
| | | @Operation(summary = "根据用户编号获取详细信息") |
| | | @SaCheckPermission("system:user:query") |
| | | @GetMapping(value = {"/", "/{userId}"}) |
| | | public R<Map<String, Object>> getInfo(@Parameter(name = "用户ID") @PathVariable(value = "userId", required = false) Long userId) { |
| | |
| | | /** |
| | | * 新增用户 |
| | | */ |
| | | @Operation(summary = "新增用户") |
| | | @SaCheckPermission("system:user:add") |
| | | @Log(title = "用户管理", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | |
| | | /** |
| | | * 修改用户 |
| | | */ |
| | | @Operation(summary = "修改用户") |
| | | @SaCheckPermission("system:user:edit") |
| | | @Log(title = "用户管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | |
| | | /** |
| | | * 删除用户 |
| | | */ |
| | | @Operation(summary = "删除用户") |
| | | @SaCheckPermission("system:user:remove") |
| | | @Log(title = "用户管理", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{userIds}") |
| | |
| | | /** |
| | | * 重置密码 |
| | | */ |
| | | @Operation(summary = "重置密码") |
| | | @SaCheckPermission("system:user:resetPwd") |
| | | @Log(title = "用户管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/resetPwd") |
| | |
| | | /** |
| | | * 状态修改 |
| | | */ |
| | | @Operation(summary = "状态修改") |
| | | @SaCheckPermission("system:user:edit") |
| | | @Log(title = "用户管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/changeStatus") |
| | |
| | | /** |
| | | * 根据用户编号获取授权角色 |
| | | */ |
| | | @Operation(summary = "根据用户编号获取授权角色") |
| | | @SaCheckPermission("system:user:query") |
| | | @GetMapping("/authRole/{userId}") |
| | | public R<Map<String, Object>> authRole(@Parameter(name = "用户ID") @PathVariable("userId") Long userId) { |
| | |
| | | /** |
| | | * 用户授权角色 |
| | | */ |
| | | @Operation(summary = "用户授权角色") |
| | | @Parameters({ |
| | | @Parameter(name = "userId", description = "用户Id", in = ParameterIn.QUERY), |
| | | @Parameter(name = "roleIds", description = "角色ID串", in = ParameterIn.QUERY) |
| | |
| | | enabled: true |
| | | #这里定义了两个分组,可定义多个,也可以不定义 |
| | | group-configs: |
| | | - group: 演示模块 |
| | | - group: 1.演示模块 |
| | | packages-to-scan: com.ruoyi.demo |
| | | - group: 系统模块 |
| | | - group: 2.系统模块 |
| | | packages-to-scan: com.ruoyi.web |
| | | - group: 代码生成模块 |
| | | - group: 3.代码生成模块 |
| | | packages-to-scan: com.ruoyi.generator |
| | | |
| | | # 防止XSS攻击 |
| | |
| | | <artifactId>springdoc-openapi-ui</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.springdoc</groupId> |
| | | <artifactId>springdoc-openapi-javadoc</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- 自动生成YML配置关联JSON文件 --> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | /** |
| | | * 搜索值 |
| | | */ |
| | | @Schema(name = "搜索值") |
| | | @TableField(exist = false) |
| | | private String searchValue; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @Schema(name = "创建者") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private String createBy; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @Schema(name = "创建时间") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 更新者 |
| | | */ |
| | | @Schema(name = "更新者") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private String updateBy; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @Schema(name = "更新时间") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 请求参数 |
| | | */ |
| | | @Schema(name = "请求参数") |
| | | @TableField(exist = false) |
| | | private Map<String, Object> params = new HashMap<>(); |
| | | |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.sql.SqlUtil; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | /** |
| | | * 分页大小 |
| | | */ |
| | | @Schema(name = "分页大小") |
| | | private Integer pageSize; |
| | | |
| | | /** |
| | | * 当前页数 |
| | | */ |
| | | @Schema(name = "当前页数") |
| | | private Integer pageNum; |
| | | |
| | | /** |
| | | * 排序列 |
| | | */ |
| | | @Schema(name = "排序列") |
| | | private String orderByColumn; |
| | | |
| | | /** |
| | | * 排序的方向desc或者asc |
| | | */ |
| | | @Schema(name = "排序的方向", example = "asc,desc") |
| | | private String isAsc; |
| | | |
| | | /** |
| | |
| | | package com.ruoyi.common.core.domain; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | |
| | | */ |
| | | @Data |
| | | @NoArgsConstructor |
| | | @Schema(name = "请求响应对象") |
| | | public class R<T> implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | */ |
| | | public static final int FAIL = 500; |
| | | |
| | | @Schema(name = "消息状态码") |
| | | private int code; |
| | | |
| | | @Schema(name = "消息内容") |
| | | private String msg; |
| | | |
| | | @Schema(name = "数据对象") |
| | | private T data; |
| | | |
| | | public static <T> R<T> ok() { |
| | |
| | | package com.ruoyi.common.core.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | * 父菜单名称 |
| | | */ |
| | | @TableField(exist = false) |
| | | @Schema(name = "父菜单名称") |
| | | private String parentName; |
| | | |
| | | /** |
| | | * 父菜单ID |
| | | */ |
| | | @Schema(name = "父菜单ID") |
| | | private Long parentId; |
| | | |
| | | /** |
| | | * 子部门 |
| | | */ |
| | | @TableField(exist = false) |
| | | @Schema(name = "子部门") |
| | | private List<T> children = new ArrayList<>(); |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ruoyi.common.core.domain.TreeEntity; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @TableName("sys_dept") |
| | | @Schema(name = "部门业务对象") |
| | | public class SysDept extends TreeEntity<SysDept> { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 部门ID |
| | | */ |
| | | @Schema(name = "部门id") |
| | | @TableId(value = "dept_id") |
| | | private Long deptId; |
| | | |
| | | /** |
| | | * 部门名称 |
| | | */ |
| | | @Schema(name = "部门名称") |
| | | @NotBlank(message = "部门名称不能为空") |
| | | @Size(min = 0, max = 30, message = "部门名称长度不能超过30个字符") |
| | | private String deptName; |
| | |
| | | /** |
| | | * 显示顺序 |
| | | */ |
| | | @Schema(name = "显示顺序") |
| | | @NotNull(message = "显示顺序不能为空") |
| | | private Integer orderNum; |
| | | |
| | | /** |
| | | * 负责人 |
| | | */ |
| | | @Schema(name = "负责人") |
| | | private String leader; |
| | | |
| | | /** |
| | | * 联系电话 |
| | | */ |
| | | @Schema(name = "联系电话") |
| | | @Size(min = 0, max = 11, message = "联系电话长度不能超过11个字符") |
| | | private String phone; |
| | | |
| | | /** |
| | | * 邮箱 |
| | | */ |
| | | @Schema(name = "邮箱") |
| | | @Email(message = "邮箱格式不正确") |
| | | @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符") |
| | | private String email; |
| | |
| | | /** |
| | | * 部门状态:0正常,1停用 |
| | | */ |
| | | @Schema(name = "部门状态:0正常,1停用") |
| | | private String status; |
| | | |
| | | /** |
| | | * 删除标志(0代表存在 2代表删除) |
| | | */ |
| | | @Schema(name = "删除标志(0代表存在 2代表删除)") |
| | | @TableLogic |
| | | private String delFlag; |
| | | |
| | | /** |
| | | * 祖级列表 |
| | | */ |
| | | @Schema(name = "祖级列表") |
| | | private String ancestors; |
| | | |
| | | } |
| | |
| | | import com.ruoyi.common.constant.UserConstants; |
| | | import com.ruoyi.common.convert.ExcelDictConvert; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @TableName("sys_dict_data") |
| | | @ExcelIgnoreUnannotated |
| | | @Schema(name = "字典数据业务对象") |
| | | public class SysDictData extends BaseEntity { |
| | | |
| | | /** |
| | | * 字典编码 |
| | | */ |
| | | @Schema(name = "字典编码") |
| | | @ExcelProperty(value = "字典编码") |
| | | @TableId(value = "dict_code") |
| | | private Long dictCode; |
| | |
| | | /** |
| | | * 字典排序 |
| | | */ |
| | | @Schema(name = "字典排序") |
| | | @ExcelProperty(value = "字典排序") |
| | | private Integer dictSort; |
| | | |
| | | /** |
| | | * 字典标签 |
| | | */ |
| | | @Schema(name = "字典标签") |
| | | @ExcelProperty(value = "字典标签") |
| | | @NotBlank(message = "字典标签不能为空") |
| | | @Size(min = 0, max = 100, message = "字典标签长度不能超过100个字符") |
| | |
| | | /** |
| | | * 字典键值 |
| | | */ |
| | | @Schema(name = "字典键值") |
| | | @ExcelProperty(value = "字典键值") |
| | | @NotBlank(message = "字典键值不能为空") |
| | | @Size(min = 0, max = 100, message = "字典键值长度不能超过100个字符") |
| | |
| | | /** |
| | | * 字典类型 |
| | | */ |
| | | @Schema(name = "字典类型") |
| | | @ExcelProperty(value = "字典类型") |
| | | @NotBlank(message = "字典类型不能为空") |
| | | @Size(min = 0, max = 100, message = "字典类型长度不能超过100个字符") |
| | |
| | | /** |
| | | * 样式属性(其他样式扩展) |
| | | */ |
| | | @Schema(name = "样式属性(其他样式扩展)") |
| | | @Size(min = 0, max = 100, message = "样式属性长度不能超过100个字符") |
| | | private String cssClass; |
| | | |
| | | /** |
| | | * 表格字典样式 |
| | | */ |
| | | @Schema(name = "表格字典样式") |
| | | private String listClass; |
| | | |
| | | /** |
| | | * 是否默认(Y是 N否) |
| | | */ |
| | | @Schema(name = "是否默认(Y是 N否)") |
| | | @ExcelProperty(value = "是否默认", converter = ExcelDictConvert.class) |
| | | @ExcelDictFormat(dictType = "sys_yes_no") |
| | | private String isDefault; |
| | |
| | | /** |
| | | * 状态(0正常 1停用) |
| | | */ |
| | | @Schema(name = "状态(0正常 1停用)") |
| | | @ExcelProperty(value = "状态", converter = ExcelDictConvert.class) |
| | | @ExcelDictFormat(dictType = "sys_normal_disable") |
| | | private String status; |
| | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @Schema(name = "备注") |
| | | private String remark; |
| | | |
| | | public boolean getDefault() { |
| | |
| | | import com.ruoyi.common.annotation.ExcelDictFormat; |
| | | import com.ruoyi.common.convert.ExcelDictConvert; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @TableName("sys_dict_type") |
| | | @ExcelIgnoreUnannotated |
| | | @Schema(name = "字典类型业务对象") |
| | | public class SysDictType extends BaseEntity { |
| | | |
| | | /** |
| | | * 字典主键 |
| | | */ |
| | | @Schema(name = "字典主键") |
| | | @ExcelProperty(value = "字典主键") |
| | | @TableId(value = "dict_id") |
| | | private Long dictId; |
| | |
| | | /** |
| | | * 字典名称 |
| | | */ |
| | | @Schema(name = "字典名称") |
| | | @ExcelProperty(value = "字典名称") |
| | | @NotBlank(message = "字典名称不能为空") |
| | | @Size(min = 0, max = 100, message = "字典类型名称长度不能超过100个字符") |
| | |
| | | /** |
| | | * 字典类型 |
| | | */ |
| | | @Schema(name = "字典类型") |
| | | @ExcelProperty(value = "字典类型") |
| | | @NotBlank(message = "字典类型不能为空") |
| | | @Size(min = 0, max = 100, message = "字典类型类型长度不能超过100个字符") |
| | |
| | | /** |
| | | * 状态(0正常 1停用) |
| | | */ |
| | | @Schema(name = "状态(0正常 1停用)") |
| | | @ExcelProperty(value = "状态", converter = ExcelDictConvert.class) |
| | | @ExcelDictFormat(dictType = "sys_normal_disable") |
| | | private String status; |
| | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @Schema(name = "备注") |
| | | private String remark; |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonInclude; |
| | | import com.ruoyi.common.core.domain.TreeEntity; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @TableName("sys_menu") |
| | | @Schema(name = "菜单权限业务对象") |
| | | public class SysMenu extends TreeEntity<SysMenu> { |
| | | |
| | | /** |
| | | * 菜单ID |
| | | */ |
| | | @Schema(name = "菜单ID") |
| | | @TableId(value = "menu_id") |
| | | private Long menuId; |
| | | |
| | | /** |
| | | * 菜单名称 |
| | | */ |
| | | @Schema(name = "菜单名称") |
| | | @NotBlank(message = "菜单名称不能为空") |
| | | @Size(min = 0, max = 50, message = "菜单名称长度不能超过50个字符") |
| | | private String menuName; |
| | |
| | | /** |
| | | * 显示顺序 |
| | | */ |
| | | @Schema(name = "显示顺序") |
| | | @NotNull(message = "显示顺序不能为空") |
| | | private Integer orderNum; |
| | | |
| | | /** |
| | | * 路由地址 |
| | | */ |
| | | @Schema(name = "路由地址") |
| | | @Size(min = 0, max = 200, message = "路由地址不能超过200个字符") |
| | | private String path; |
| | | |
| | | /** |
| | | * 组件路径 |
| | | */ |
| | | @Schema(name = "组件路径") |
| | | @Size(min = 0, max = 200, message = "组件路径不能超过255个字符") |
| | | private String component; |
| | | |
| | | /** |
| | | * 路由参数 |
| | | */ |
| | | @Schema(name = "路由参数") |
| | | private String queryParam; |
| | | |
| | | /** |
| | | * 是否为外链(0是 1否) |
| | | */ |
| | | @Schema(name = "是否为外链(0是 1否)") |
| | | private String isFrame; |
| | | |
| | | /** |
| | | * 是否缓存(0缓存 1不缓存) |
| | | */ |
| | | @Schema(name = "是否缓存(0缓存 1不缓存)") |
| | | private String isCache; |
| | | |
| | | /** |
| | | * 类型(M目录 C菜单 F按钮) |
| | | */ |
| | | @Schema(name = "类型(M目录 C菜单 F按钮)") |
| | | @NotBlank(message = "菜单类型不能为空") |
| | | private String menuType; |
| | | |
| | | /** |
| | | * 显示状态(0显示 1隐藏) |
| | | */ |
| | | @Schema(name = "显示状态(0显示 1隐藏)") |
| | | private String visible; |
| | | |
| | | /** |
| | | * 菜单状态(0显示 1隐藏) |
| | | */ |
| | | @Schema(name = "菜单状态(0显示 1隐藏)") |
| | | private String status; |
| | | |
| | | /** |
| | | * 权限字符串 |
| | | */ |
| | | @Schema(name = "权限字符串") |
| | | @JsonInclude(JsonInclude.Include.NON_NULL) |
| | | @Size(min = 0, max = 100, message = "权限标识长度不能超过100个字符") |
| | | private String perms; |
| | |
| | | /** |
| | | * 菜单图标 |
| | | */ |
| | | @Schema(name = "菜单图标") |
| | | private String icon; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @Schema(name = "备注") |
| | | private String remark; |
| | | |
| | | } |
| | |
| | | import com.ruoyi.common.constant.UserConstants; |
| | | import com.ruoyi.common.convert.ExcelDictConvert; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.NoArgsConstructor; |
| | |
| | | /** |
| | | * 角色ID |
| | | */ |
| | | @Schema(name = "角色ID") |
| | | @ExcelProperty(value = "角色序号") |
| | | @TableId(value = "role_id") |
| | | private Long roleId; |
| | |
| | | /** |
| | | * 角色名称 |
| | | */ |
| | | @Schema(name = "角色名称") |
| | | @ExcelProperty(value = "角色名称") |
| | | @NotBlank(message = "角色名称不能为空") |
| | | @Size(min = 0, max = 30, message = "角色名称长度不能超过30个字符") |
| | |
| | | /** |
| | | * 角色权限 |
| | | */ |
| | | @Schema(name = "角色权限") |
| | | @ExcelProperty(value = "角色权限") |
| | | @NotBlank(message = "权限字符不能为空") |
| | | @Size(min = 0, max = 100, message = "权限字符长度不能超过100个字符") |
| | |
| | | /** |
| | | * 角色排序 |
| | | */ |
| | | @Schema(name = "角色排序") |
| | | @ExcelProperty(value = "角色排序") |
| | | @NotNull(message = "显示顺序不能为空") |
| | | private Integer roleSort; |
| | |
| | | /** |
| | | * 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限;5:仅本人数据权限) |
| | | */ |
| | | @Schema(name = "数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限;5:仅本人数据权限)") |
| | | @ExcelProperty(value = "数据范围", converter = ExcelDictConvert.class) |
| | | @ExcelDictFormat(readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限,5=仅本人数据权限") |
| | | private String dataScope; |
| | |
| | | /** |
| | | * 菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示) |
| | | */ |
| | | @Schema(name = "菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示)") |
| | | private Boolean menuCheckStrictly; |
| | | |
| | | /** |
| | | * 部门树选择项是否关联显示(0:父子不互相关联显示 1:父子互相关联显示 ) |
| | | */ |
| | | @Schema(name = "部门树选择项是否关联显示(0:父子不互相关联显示 1:父子互相关联显示 )") |
| | | private Boolean deptCheckStrictly; |
| | | |
| | | /** |
| | | * 角色状态(0正常 1停用) |
| | | */ |
| | | @Schema(name = "角色状态(0正常 1停用)") |
| | | @ExcelProperty(value = "角色状态", converter = ExcelDictConvert.class) |
| | | @ExcelDictFormat(dictType = "sys_common_status") |
| | | private String status; |
| | |
| | | /** |
| | | * 删除标志(0代表存在 2代表删除) |
| | | */ |
| | | @Schema(name = "删除标志(0代表存在 2代表删除)") |
| | | @TableLogic |
| | | private String delFlag; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @Schema(name = "备注") |
| | | private String remark; |
| | | |
| | | /** |
| | | * 用户是否存在此角色标识 默认不存在 |
| | | */ |
| | | @Schema(name = "用户是否存在此角色标识 默认不存在") |
| | | @TableField(exist = false) |
| | | private boolean flag = false; |
| | | |
| | | /** |
| | | * 菜单组 |
| | | */ |
| | | @Schema(name = "菜单组") |
| | | @TableField(exist = false) |
| | | private Long[] menuIds; |
| | | |
| | | /** |
| | | * 部门组(数据权限) |
| | | */ |
| | | @Schema(name = "部门组(数据权限)") |
| | | @TableField(exist = false) |
| | | private Long[] deptIds; |
| | | |
| | |
| | | this.roleId = roleId; |
| | | } |
| | | |
| | | @Schema(name = "是否管理员") |
| | | public boolean isAdmin() { |
| | | return UserConstants.ADMIN_ID.equals(this.roleId); |
| | | } |
| | |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import com.ruoyi.common.enums.SensitiveStrategy; |
| | | import com.ruoyi.common.xss.Xss; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.NoArgsConstructor; |
| | |
| | | @NoArgsConstructor |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @TableName("sys_user") |
| | | @Schema(name = "用户信息业务对象") |
| | | public class SysUser extends BaseEntity { |
| | | |
| | | /** |
| | | * 用户ID |
| | | */ |
| | | @Schema(name = "用户ID") |
| | | @TableId(value = "user_id") |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 部门ID |
| | | */ |
| | | @Schema(name = "部门ID") |
| | | private Long deptId; |
| | | |
| | | /** |
| | | * 用户账号 |
| | | */ |
| | | @Schema(name = "用户账号") |
| | | @Xss(message = "用户账号不能包含脚本字符") |
| | | @NotBlank(message = "用户账号不能为空") |
| | | @Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符") |
| | |
| | | /** |
| | | * 用户昵称 |
| | | */ |
| | | @Schema(name = "用户昵称") |
| | | @Xss(message = "用户昵称不能包含脚本字符") |
| | | @Size(min = 0, max = 30, message = "用户昵称长度不能超过30个字符") |
| | | private String nickName; |
| | |
| | | /** |
| | | * 用户类型(sys_user系统用户) |
| | | */ |
| | | @Schema(name = "用户类型") |
| | | private String userType; |
| | | |
| | | /** |
| | | * 用户邮箱 |
| | | */ |
| | | @Sensitive(strategy = SensitiveStrategy.EMAIL) |
| | | @Schema(name = "用户邮箱") |
| | | @Email(message = "邮箱格式不正确") |
| | | @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符") |
| | | private String email; |
| | |
| | | * 手机号码 |
| | | */ |
| | | @Sensitive(strategy = SensitiveStrategy.PHONE) |
| | | @Schema(name = "手机号码") |
| | | private String phonenumber; |
| | | |
| | | /** |
| | | * 用户性别 |
| | | */ |
| | | @Schema(name = "用户性别") |
| | | private String sex; |
| | | |
| | | /** |
| | | * 用户头像 |
| | | */ |
| | | @Schema(name = "用户头像") |
| | | private String avatar; |
| | | |
| | | /** |
| | | * 密码 |
| | | */ |
| | | @Schema(name = "密码") |
| | | @TableField( |
| | | insertStrategy = FieldStrategy.NOT_EMPTY, |
| | | updateStrategy = FieldStrategy.NOT_EMPTY, |
| | |
| | | /** |
| | | * 帐号状态(0正常 1停用) |
| | | */ |
| | | @Schema(name = "帐号状态(0正常 1停用)") |
| | | private String status; |
| | | |
| | | /** |
| | | * 删除标志(0代表存在 2代表删除) |
| | | */ |
| | | @Schema(name = "删除标志(0代表存在 2代表删除)") |
| | | @TableLogic |
| | | private String delFlag; |
| | | |
| | | /** |
| | | * 最后登录IP |
| | | */ |
| | | @Schema(name = "最后登录IP") |
| | | private String loginIp; |
| | | |
| | | /** |
| | | * 最后登录时间 |
| | | */ |
| | | @Schema(name = "最后登录时间") |
| | | private Date loginDate; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @Schema(name = "备注") |
| | | private String remark; |
| | | |
| | | /** |
| | | * 部门对象 |
| | | */ |
| | | @Schema(name = "部门对象") |
| | | @TableField(exist = false) |
| | | private SysDept dept; |
| | | |
| | | /** |
| | | * 角色对象 |
| | | */ |
| | | @Schema(name = "角色对象") |
| | | @TableField(exist = false) |
| | | private List<SysRole> roles; |
| | | |
| | | /** |
| | | * 角色组 |
| | | */ |
| | | @Schema(name = "角色组") |
| | | @TableField(exist = false) |
| | | private Long[] roleIds; |
| | | |
| | | /** |
| | | * 岗位组 |
| | | */ |
| | | @Schema(name = "岗位组") |
| | | @TableField(exist = false) |
| | | private Long[] postIds; |
| | | |
| | | /** |
| | | * 数据权限 当前角色ID |
| | | */ |
| | | @Schema(name = "角色ID") |
| | | @TableField(exist = false) |
| | | private Long roleId; |
| | | |
| | |
| | | this.userId = userId; |
| | | } |
| | | |
| | | @Schema(name = "是否管理员") |
| | | public boolean isAdmin() { |
| | | return UserConstants.ADMIN_ID.equals(this.userId); |
| | | } |
| | |
| | | package com.ruoyi.common.core.domain.model; |
| | | |
| | | import com.ruoyi.common.constant.UserConstants; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | |
| | | */ |
| | | |
| | | @Data |
| | | @Schema(name = "用户登录对象") |
| | | public class LoginBody { |
| | | |
| | | /** |
| | |
| | | */ |
| | | @NotBlank(message = "{user.username.not.blank}") |
| | | @Length(min = UserConstants.USERNAME_MIN_LENGTH, max = UserConstants.USERNAME_MAX_LENGTH, message = "{user.username.length.valid}") |
| | | @Schema(name = "用户名") |
| | | private String username; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @NotBlank(message = "{user.password.not.blank}") |
| | | @Length(min = UserConstants.PASSWORD_MIN_LENGTH, max = UserConstants.PASSWORD_MAX_LENGTH, message = "{user.password.length.valid}") |
| | | @Schema(name = "用户密码") |
| | | private String password; |
| | | |
| | | /** |
| | | * 验证码 |
| | | */ |
| | | @Schema(name = "验证码") |
| | | private String code; |
| | | |
| | | /** |
| | | * 唯一标识 |
| | | */ |
| | | @Schema(name = "唯一标识") |
| | | private String uuid; |
| | | |
| | | } |
| | |
| | | package com.ruoyi.common.core.domain.model; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @Schema(name = "用户注册对象") |
| | | public class RegisterBody extends LoginBody { |
| | | |
| | | @Schema(name = "用户类型") |
| | | private String userType; |
| | | |
| | | } |
| | |
| | | package com.ruoyi.common.core.domain.model; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | |
| | | */ |
| | | |
| | | @Data |
| | | @Schema(name = "短信登录对象") |
| | | public class SmsLoginBody { |
| | | |
| | | /** |
| | | * 用户名 |
| | | */ |
| | | @NotBlank(message = "{user.phonenumber.not.blank}") |
| | | @Schema(name = "用户手机号") |
| | | private String phonenumber; |
| | | |
| | | /** |
| | | * 用户密码 |
| | | */ |
| | | @NotBlank(message = "{sms.code.not.blank}") |
| | | @Schema(name = "短信验证码") |
| | | private String smsCode; |
| | | |
| | | } |
| | |
| | | |
| | | import cn.hutool.http.HttpStatus; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | |
| | | |
| | | @Data |
| | | @NoArgsConstructor |
| | | @Schema(name = "分页响应对象") |
| | | public class TableDataInfo<T> implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 总记录数 |
| | | */ |
| | | @Schema(name = "总记录数") |
| | | private long total; |
| | | |
| | | /** |
| | | * 列表数据 |
| | | */ |
| | | @Schema(name = "列表数据") |
| | | private List<T> rows; |
| | | |
| | | /** |
| | | * 消息状态码 |
| | | */ |
| | | @Schema(name = "消息状态码") |
| | | private int code; |
| | | |
| | | /** |
| | | * 消息内容 |
| | | */ |
| | | @Schema(name = "消息内容") |
| | | private String msg; |
| | | |
| | | /** |
| | |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.utils.email.MailUtils; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | @RequestMapping("/demo/mail") |
| | | public class MailController { |
| | | |
| | | @Operation(summary = "发送邮件") |
| | | @GetMapping("/sendSimpleMessage") |
| | | public R<Void> sendSimpleMessage(@Parameter(name = "接收人") String to, |
| | | @Parameter(name = "标题") String subject, |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Operation(summary = "发送邮件(带附件)") |
| | | @GetMapping("/sendMessageWithAttachment") |
| | | public R<Void> sendMessageWithAttachment(@Parameter(name = "接收人") String to, |
| | | @Parameter(name = "标题") String subject, |
| | |
| | | * <p> |
| | | * cacheNames 为配置文件内 groupId |
| | | */ |
| | | @Operation(summary = "测试 @Cacheable") |
| | | @Cacheable(cacheNames = "redissonCacheMap", key = "#key", condition = "#key != null") |
| | | @GetMapping("/test1") |
| | | public R<String> test1(String key, String value) { |
| | |
| | | * <p> |
| | | * cacheNames 为 配置文件内 groupId |
| | | */ |
| | | @Operation(summary = "测试 @CachePut") |
| | | @CachePut(cacheNames = "redissonCacheMap", key = "#key", condition = "#key != null") |
| | | @GetMapping("/test2") |
| | | public R<String> test2(String key, String value) { |
| | |
| | | * <p> |
| | | * cacheNames 为 配置文件内 groupId |
| | | */ |
| | | @Operation(summary = "测试 @CacheEvict") |
| | | @CacheEvict(cacheNames = "redissonCacheMap", key = "#key", condition = "#key != null") |
| | | @GetMapping("/test3") |
| | | public R<String> test3(String key, String value) { |
| | |
| | | * 手动设置过期时间10秒 |
| | | * 11秒后获取 判断是否相等 |
| | | */ |
| | | @Operation(summary = "测试设置过期时间") |
| | | @GetMapping("/test6") |
| | | public R<Boolean> test6(String key, String value) { |
| | | RedisUtils.setCacheObject(key, value); |
| | |
| | | import com.baomidou.lock.annotation.Lock4j; |
| | | import com.baomidou.lock.executor.RedissonLockExecutor; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | /** |
| | | * 测试lock4j 注解 |
| | | */ |
| | | @Operation(summary = "测试lock4j 注解") |
| | | @Lock4j(keys = {"#key"}) |
| | | @GetMapping("/testLock4j") |
| | | public R<String> testLock4j(String key, String value) { |
| | |
| | | /** |
| | | * 测试lock4j 工具 |
| | | */ |
| | | @Operation(summary = "测试lock4j 工具") |
| | | @GetMapping("/testLock4jLockTemplate") |
| | | public R<String> testLock4jLockTemplate(String key, String value) { |
| | | final LockInfo lockInfo = lockTemplate.lock(key, 30000L, 5000L, RedissonLockExecutor.class); |
| | |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.utils.redis.RedisUtils; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | @RequestMapping("/demo/redis/pubsub") |
| | | public class RedisPubSubController { |
| | | |
| | | @Operation(summary = "发布消息") |
| | | @GetMapping("/pub") |
| | | public R<Void> pub(@Parameter(name = "通道Key") String key, @Parameter(name = "发送内容") String value) { |
| | | RedisUtils.publish(key, value, consumer -> { |
| | |
| | | return R.ok("操作成功"); |
| | | } |
| | | |
| | | @Operation(summary = "订阅消息") |
| | | @GetMapping("/sub") |
| | | public R<Void> sub(@Parameter(name = "通道Key") String key) { |
| | | RedisUtils.subscribe(key, String.class, msg -> { |
| | |
| | | import com.ruoyi.common.annotation.RateLimiter; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.enums.LimitType; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | * 测试全局限流 |
| | | * 全局影响 |
| | | */ |
| | | @Operation(summary = "测试全局限流") |
| | | @RateLimiter(count = 2, time = 10) |
| | | @GetMapping("/test") |
| | | public R<String> test(String value) { |
| | |
| | | * 测试请求IP限流 |
| | | * 同一IP请求受影响 |
| | | */ |
| | | @Operation(summary = "测试请求IP限流") |
| | | @RateLimiter(count = 2, time = 10, limitType = LimitType.IP) |
| | | @GetMapping("/testip") |
| | | public R<String> testip(String value) { |
| | |
| | | * 测试集群实例限流 |
| | | * 启动两个后端服务互不影响 |
| | | */ |
| | | @Operation(summary = "测试集群实例限流") |
| | | @RateLimiter(count = 2, time = 10, limitType = LimitType.CLUSTER) |
| | | @GetMapping("/testcluster") |
| | | public R<String> testcluster(String value) { |
| | |
| | | import com.ruoyi.common.utils.spring.SpringUtils; |
| | | import com.ruoyi.sms.config.properties.SmsProperties; |
| | | import com.ruoyi.sms.core.SmsTemplate; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | // private final SmsTemplate smsTemplate; // 可以使用spring注入 |
| | | // private final AliyunSmsTemplate smsTemplate; // 也可以注入某个厂家的模板工具 |
| | | |
| | | @Operation(summary = "发送短信Aliyun") |
| | | @GetMapping("/sendAliyun") |
| | | public R<Object> sendAliyun(@Parameter(name = "电话号") String phones, |
| | | @Parameter(name = "模板ID") String templateId) { |
| | |
| | | return R.ok(send); |
| | | } |
| | | |
| | | @Operation(summary = "发送短信Tencent") |
| | | @GetMapping("/sendTencent") |
| | | public R<Object> sendTencent(@Parameter(name = "电话号") String phones, |
| | | @Parameter(name = "模板ID") String templateId) { |
| | |
| | | package com.ruoyi.demo.controller; |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.Parameters; |
| | | import io.swagger.v3.oas.annotations.enums.ParameterIn; |
| | |
| | | * 上传请求 |
| | | * 必须使用 @RequestPart 注解标注为文件 |
| | | */ |
| | | @Operation(summary = "通用上传请求") |
| | | @Parameters({ |
| | | @Parameter(name = "file", description = "文件", in = ParameterIn.QUERY, required = true) |
| | | }) |
| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.demo.domain.TestDemo; |
| | | import com.ruoyi.demo.mapper.TestDemoMapper; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | |
| | | * <p> |
| | | * 3.5.0 版本 增加 rewriteBatchedStatements=true 批处理参数 使 MP 原生批处理可以达到同样的速度 |
| | | */ |
| | | @Operation(summary = "新增批量方法") |
| | | @PostMapping("/add") |
| | | // @DS("slave") |
| | | public R<Void> add() { |
| | |
| | | * <p> |
| | | * 3.5.0 版本 增加 rewriteBatchedStatements=true 批处理参数 使 MP 原生批处理可以达到同样的速度 |
| | | */ |
| | | @Operation(summary = "新增或更新批量方法") |
| | | @PostMapping("/addOrUpdate") |
| | | // @DS("slave") |
| | | public R<Void> addOrUpdate() { |
| | |
| | | /** |
| | | * 删除批量方法 |
| | | */ |
| | | @Operation(summary = "删除批量方法") |
| | | @DeleteMapping() |
| | | // @DS("slave") |
| | | public R<Void> remove() { |
| | |
| | | import com.ruoyi.demo.domain.bo.TestDemoImportVo; |
| | | import com.ruoyi.demo.domain.vo.TestDemoVo; |
| | | import com.ruoyi.demo.service.ITestDemoService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.Parameters; |
| | | import io.swagger.v3.oas.annotations.enums.ParameterIn; |
| | |
| | | /** |
| | | * 查询测试单表列表 |
| | | */ |
| | | @Operation(summary = "查询测试单表列表") |
| | | @SaCheckPermission("demo:demo:list") |
| | | @GetMapping("/list") |
| | | public TableDataInfo<TestDemoVo> list(@Validated(QueryGroup.class) TestDemoBo bo, PageQuery pageQuery) { |
| | |
| | | /** |
| | | * 自定义分页查询 |
| | | */ |
| | | @Operation(summary = "自定义分页查询") |
| | | @SaCheckPermission("demo:demo:list") |
| | | @GetMapping("/page") |
| | | public TableDataInfo<TestDemoVo> page(@Validated(QueryGroup.class) TestDemoBo bo, PageQuery pageQuery) { |
| | | return iTestDemoService.customPageList(bo, pageQuery); |
| | | } |
| | | |
| | | @Operation(summary = "导入测试-校验") |
| | | @Parameters({ |
| | | @Parameter(name = "file", description = "导入文件", in = ParameterIn.QUERY, required = true), |
| | | }) |
| | |
| | | /** |
| | | * 导出测试单表列表 |
| | | */ |
| | | @Operation(summary = "导出测试单表列表") |
| | | @SaCheckPermission("demo:demo:export") |
| | | @Log(title = "测试单表", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | |
| | | /** |
| | | * 获取测试单表详细信息 |
| | | */ |
| | | @Operation(summary = "获取测试单表详细信息") |
| | | @SaCheckPermission("demo:demo:query") |
| | | @GetMapping("/{id}") |
| | | public R<TestDemoVo> getInfo(@Parameter(name = "测试ID") |
| | |
| | | /** |
| | | * 新增测试单表 |
| | | */ |
| | | @Operation(summary = "新增测试单表") |
| | | @SaCheckPermission("demo:demo:add") |
| | | @Log(title = "测试单表", businessType = BusinessType.INSERT) |
| | | @RepeatSubmit(interval = 2, timeUnit = TimeUnit.SECONDS, message = "{repeat.submit.message}") |
| | |
| | | /** |
| | | * 修改测试单表 |
| | | */ |
| | | @Operation(summary = "修改测试单表") |
| | | @SaCheckPermission("demo:demo:edit") |
| | | @Log(title = "测试单表", businessType = BusinessType.UPDATE) |
| | | @RepeatSubmit |
| | |
| | | /** |
| | | * 删除测试单表 |
| | | */ |
| | | @Operation(summary = "删除测试单表") |
| | | @SaCheckPermission("demo:demo:remove") |
| | | @Log(title = "测试单表", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | |
| | | /** |
| | | * 单列表多数据 |
| | | */ |
| | | @Operation(summary = "单列表多数据") |
| | | @GetMapping("/exportTemplateOne") |
| | | public void exportTemplateOne(HttpServletResponse response) { |
| | | Map<String,String> map = new HashMap<>(); |
| | |
| | | /** |
| | | * 多列表多数据 |
| | | */ |
| | | @Operation(summary = "多列表多数据") |
| | | @GetMapping("/exportTemplateMuliti") |
| | | public void exportTemplateMuliti(HttpServletResponse response) { |
| | | Map<String,String> map = new HashMap<>(); |
| | |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.utils.MessageUtils; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.Data; |
| | |
| | | * <p> |
| | | * 测试使用 user.register.success |
| | | */ |
| | | @Operation(summary = "通过code获取国际化内容") |
| | | @GetMapping() |
| | | public R<Void> get(@Parameter(name = "国际化code") String code) { |
| | | return R.ok(MessageUtils.message(code)); |
| | |
| | | * <p> |
| | | * 测试使用 not.null |
| | | */ |
| | | @Operation(summary = "Validator 校验国际化") |
| | | @GetMapping("/test1") |
| | | public R<Void> test1(@NotBlank(message = "{not.null}") String str) { |
| | | return R.ok(str); |
| | |
| | | * <p> |
| | | * 测试使用 not.null |
| | | */ |
| | | @Operation(summary = "Bean 校验国际化") |
| | | @GetMapping("/test2") |
| | | public R<TestI18nBo> test2(@Validated TestI18nBo bo) { |
| | | return R.ok(bo); |
| | |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.enums.SensitiveStrategy; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.Data; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | /** |
| | | * 测试数据脱敏 |
| | | */ |
| | | @Operation(summary = "查询测试单表列表") |
| | | @GetMapping("/test") |
| | | public R<TestSensitive> test() { |
| | | TestSensitive testSensitive = new TestSensitive(); |
| | |
| | | import com.ruoyi.demo.domain.bo.TestTreeBo; |
| | | import com.ruoyi.demo.domain.vo.TestTreeVo; |
| | | import com.ruoyi.demo.service.ITestTreeService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | /** |
| | | * 查询测试树表列表 |
| | | */ |
| | | @Operation(summary = "查询测试树表列表") |
| | | @SaCheckPermission("demo:tree:list") |
| | | @GetMapping("/list") |
| | | public R<List<TestTreeVo>> list(@Validated(QueryGroup.class) TestTreeBo bo) { |
| | |
| | | /** |
| | | * 导出测试树表列表 |
| | | */ |
| | | @Operation(summary = "导出测试树表列表") |
| | | @SaCheckPermission("demo:tree:export") |
| | | @Log(title = "测试树表", businessType = BusinessType.EXPORT) |
| | | @GetMapping("/export") |
| | |
| | | /** |
| | | * 获取测试树表详细信息 |
| | | */ |
| | | @Operation(summary = "获取测试树表详细信息") |
| | | @SaCheckPermission("demo:tree:query") |
| | | @GetMapping("/{id}") |
| | | public R<TestTreeVo> getInfo(@Parameter(name = "测试树ID") |
| | |
| | | /** |
| | | * 新增测试树表 |
| | | */ |
| | | @Operation(summary = "新增测试树表") |
| | | @SaCheckPermission("demo:tree:add") |
| | | @Log(title = "测试树表", businessType = BusinessType.INSERT) |
| | | @RepeatSubmit |
| | |
| | | /** |
| | | * 修改测试树表 |
| | | */ |
| | | @Operation(summary = "修改测试树表") |
| | | @SaCheckPermission("demo:tree:edit") |
| | | @Log(title = "测试树表", businessType = BusinessType.UPDATE) |
| | | @RepeatSubmit |
| | |
| | | /** |
| | | * 删除测试树表 |
| | | */ |
| | | @Operation(summary = "删除测试树表") |
| | | @SaCheckPermission("demo:tree:remove") |
| | | @Log(title = "测试树表", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.utils.redis.QueueUtils; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | public class BoundedQueueController { |
| | | |
| | | |
| | | @Operation(summary = "添加队列数据") |
| | | @GetMapping("/add") |
| | | public R<Void> add(@Parameter(name = "队列名") String queueName, |
| | | @Parameter(name = "容量") int capacity) { |
| | |
| | | return R.ok("操作成功"); |
| | | } |
| | | |
| | | @Operation(summary = "删除队列数据") |
| | | @GetMapping("/remove") |
| | | public R<Void> remove(@Parameter(name = "队列名") String queueName) { |
| | | String data = "data-" + 5; |
| | |
| | | return R.ok("操作成功"); |
| | | } |
| | | |
| | | @Operation(summary = "获取队列数据") |
| | | @GetMapping("/get") |
| | | public R<Void> get(@Parameter(name = "队列名") String queueName) { |
| | | String data; |
| | |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.utils.redis.QueueUtils; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | @RequestMapping("/demo/queue/delayed") |
| | | public class DelayedQueueController { |
| | | |
| | | @Operation(summary = "订阅队列") |
| | | @GetMapping("/subscribe") |
| | | public R<Void> subscribe(@Parameter(name = "队列名") String queueName) { |
| | | log.info("通道: {} 监听中......", queueName); |
| | |
| | | return R.ok("操作成功"); |
| | | } |
| | | |
| | | @Operation(summary = "添加队列数据") |
| | | @GetMapping("/add") |
| | | public R<Void> add(@Parameter(name = "队列名") String queueName, |
| | | @Parameter(name = "订单号") String orderNum, |
| | |
| | | return R.ok("操作成功"); |
| | | } |
| | | |
| | | @Operation(summary = "删除队列数据") |
| | | @GetMapping("/remove") |
| | | public R<Void> remove(@Parameter(name = "队列名") String queueName, |
| | | @Parameter(name = "订单号") String orderNum) { |
| | |
| | | return R.ok("操作成功"); |
| | | } |
| | | |
| | | @Operation(summary = "销毁队列") |
| | | @GetMapping("/destroy") |
| | | public R<Void> destroy(@Parameter(name = "队列名") String queueName) { |
| | | // 用完了一定要销毁 否则会一直存在 |
| | |
| | | import cn.hutool.core.util.RandomUtil; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.utils.redis.QueueUtils; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | @RequestMapping("/demo/queue/priority") |
| | | public class PriorityQueueController { |
| | | |
| | | @Operation(summary = "添加队列数据") |
| | | @GetMapping("/add") |
| | | public R<Void> add(@Parameter(name = "队列名") String queueName) { |
| | | // 用完了一定要销毁 否则会一直存在 |
| | |
| | | return R.ok("操作成功"); |
| | | } |
| | | |
| | | @Operation(summary = "删除队列数据") |
| | | @GetMapping("/remove") |
| | | public R<Void> remove(@Parameter(name = "队列名") String queueName, |
| | | @Parameter(name = "对象名") String name, |
| | |
| | | return R.ok("操作成功"); |
| | | } |
| | | |
| | | @Operation(summary = "获取队列数据") |
| | | @GetMapping("/get") |
| | | public R<Void> get(@Parameter(name = "队列名") String queueName) { |
| | | PriorityDemo data; |
| | |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import com.ruoyi.common.core.validate.AddGroup; |
| | | import com.ruoyi.common.core.validate.EditGroup; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @Schema(name = "测试单表业务对象") |
| | | public class TestDemoBo extends BaseEntity { |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @Schema(name = "主键") |
| | | @NotNull(message = "主键不能为空", groups = {EditGroup.class}) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 部门id |
| | | */ |
| | | @Schema(name = "部门id") |
| | | @NotNull(message = "部门id不能为空", groups = {AddGroup.class, EditGroup.class}) |
| | | private Long deptId; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @Schema(name = "用户id") |
| | | @NotNull(message = "用户id不能为空", groups = {AddGroup.class, EditGroup.class}) |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 排序号 |
| | | */ |
| | | @Schema(name = "排序号") |
| | | @NotNull(message = "排序号不能为空", groups = {AddGroup.class, EditGroup.class}) |
| | | private Integer orderNum; |
| | | |
| | | /** |
| | | * key键 |
| | | */ |
| | | @Schema(name = "key键") |
| | | @NotBlank(message = "key键不能为空", groups = {AddGroup.class, EditGroup.class}) |
| | | private String testKey; |
| | | |
| | | /** |
| | | * 值 |
| | | */ |
| | | @Schema(name = "值") |
| | | @NotBlank(message = "值不能为空", groups = {AddGroup.class, EditGroup.class}) |
| | | private String value; |
| | | |
| | |
| | | package com.ruoyi.demo.domain.bo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | |
| | | * @date 2021-07-26 |
| | | */ |
| | | @Data |
| | | @Schema(name = "测试单表业务对象") |
| | | public class TestDemoImportVo { |
| | | |
| | | /** |
| | | * 部门id |
| | | */ |
| | | @Schema(name = "部门id") |
| | | @NotNull(message = "部门id不能为空") |
| | | @ExcelProperty(value = "部门id") |
| | | private Long deptId; |
| | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @Schema(name = "用户id") |
| | | @NotNull(message = "用户id不能为空") |
| | | @ExcelProperty(value = "用户id") |
| | | private Long userId; |
| | |
| | | /** |
| | | * 排序号 |
| | | */ |
| | | @Schema(name = "排序号") |
| | | @NotNull(message = "排序号不能为空") |
| | | @ExcelProperty(value = "排序号") |
| | | private Long orderNum; |
| | |
| | | /** |
| | | * key键 |
| | | */ |
| | | @Schema(name = "key键") |
| | | @NotBlank(message = "key键不能为空") |
| | | @ExcelProperty(value = "key键") |
| | | private String testKey; |
| | |
| | | /** |
| | | * 值 |
| | | */ |
| | | @Schema(name = "值") |
| | | @NotBlank(message = "值不能为空") |
| | | @ExcelProperty(value = "值") |
| | | private String value; |
| | |
| | | import com.ruoyi.common.core.domain.TreeEntity; |
| | | import com.ruoyi.common.core.validate.AddGroup; |
| | | import com.ruoyi.common.core.validate.EditGroup; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @Schema(name = "测试树表业务对象") |
| | | public class TestTreeBo extends TreeEntity<TestTreeBo> { |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @Schema(name = "主键") |
| | | @NotNull(message = "主键不能为空", groups = {EditGroup.class}) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 部门id |
| | | */ |
| | | @Schema(name = "部门id") |
| | | @NotNull(message = "部门id不能为空", groups = {AddGroup.class, EditGroup.class}) |
| | | private Long deptId; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @Schema(name = "用户id") |
| | | @NotNull(message = "用户id不能为空", groups = {AddGroup.class, EditGroup.class}) |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 树节点名 |
| | | */ |
| | | @Schema(name = "树节点名") |
| | | @NotBlank(message = "树节点名不能为空", groups = {AddGroup.class, EditGroup.class}) |
| | | private String treeName; |
| | | |
| | |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | |
| | | * @date 2021-07-26 |
| | | */ |
| | | @Data |
| | | @Schema(name = "测试单表视图对象") |
| | | @ExcelIgnoreUnannotated |
| | | public class TestDemoVo { |
| | | |
| | |
| | | * 主键 |
| | | */ |
| | | @ExcelProperty(value = "主键") |
| | | @Schema(name = "主键") |
| | | private Long id; |
| | | |
| | | /** |
| | | * 部门id |
| | | */ |
| | | @ExcelProperty(value = "部门id") |
| | | @Schema(name = "部门id") |
| | | private Long deptId; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @ExcelProperty(value = "用户id") |
| | | @Schema(name = "用户id") |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 排序号 |
| | | */ |
| | | @ExcelProperty(value = "排序号") |
| | | @Schema(name = "排序号") |
| | | private Integer orderNum; |
| | | |
| | | /** |
| | | * key键 |
| | | */ |
| | | @ExcelProperty(value = "key键") |
| | | @Schema(name = "key键") |
| | | private String testKey; |
| | | |
| | | /** |
| | | * 值 |
| | | */ |
| | | @ExcelProperty(value = "值") |
| | | @Schema(name = "值") |
| | | private String value; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ExcelProperty(value = "创建时间") |
| | | @Schema(name = "创建时间") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | @ExcelProperty(value = "创建人") |
| | | @Schema(name = "创建人") |
| | | private String createBy; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @ExcelProperty(value = "更新时间") |
| | | @Schema(name = "更新时间") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 更新人 |
| | | */ |
| | | @ExcelProperty(value = "更新人") |
| | | @Schema(name = "更新人") |
| | | private String updateBy; |
| | | |
| | | |
| | |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | |
| | | * @date 2021-07-26 |
| | | */ |
| | | @Data |
| | | @Schema(name = "测试树表视图对象") |
| | | @ExcelIgnoreUnannotated |
| | | public class TestTreeVo { |
| | | |
| | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @Schema(name = "主键") |
| | | private Long id; |
| | | |
| | | /** |
| | | * 父id |
| | | */ |
| | | @ExcelProperty(value = "父id") |
| | | @Schema(name = "父id") |
| | | private Long parentId; |
| | | |
| | | /** |
| | | * 部门id |
| | | */ |
| | | @ExcelProperty(value = "部门id") |
| | | @Schema(name = "部门id") |
| | | private Long deptId; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @ExcelProperty(value = "用户id") |
| | | @Schema(name = "用户id") |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 树节点名 |
| | | */ |
| | | @ExcelProperty(value = "树节点名") |
| | | @Schema(name = "树节点名") |
| | | private String treeName; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ExcelProperty(value = "创建时间") |
| | | @Schema(name = "创建时间") |
| | | private Date createTime; |
| | | |
| | | |
| | |
| | | import com.ruoyi.generator.domain.GenTable; |
| | | import com.ruoyi.generator.domain.GenTableColumn; |
| | | import com.ruoyi.generator.service.IGenTableService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | /** |
| | | * 查询代码生成列表 |
| | | */ |
| | | @Operation(summary = "查询代码生成列表") |
| | | @SaCheckPermission("tool:gen:list") |
| | | @GetMapping("/list") |
| | | public TableDataInfo<GenTable> genList(GenTable genTable, PageQuery pageQuery) { |
| | |
| | | /** |
| | | * 修改代码生成业务 |
| | | */ |
| | | @Operation(summary = "修改代码生成业务") |
| | | @SaCheckPermission("tool:gen:query") |
| | | @GetMapping(value = "/{tableId}") |
| | | public R<Map<String, Object>> getInfo(@PathVariable Long tableId) { |
| | |
| | | /** |
| | | * 查询数据库列表 |
| | | */ |
| | | @Operation(summary = "查询数据库列表") |
| | | @SaCheckPermission("tool:gen:list") |
| | | @GetMapping("/db/list") |
| | | public TableDataInfo<GenTable> dataList(GenTable genTable, PageQuery pageQuery) { |
| | |
| | | /** |
| | | * 查询数据表字段列表 |
| | | */ |
| | | @Operation(summary = "查询数据表字段列表") |
| | | @SaCheckPermission("tool:gen:list") |
| | | @GetMapping(value = "/column/{tableId}") |
| | | public TableDataInfo<GenTableColumn> columnList(Long tableId) { |
| | |
| | | /** |
| | | * 导入表结构(保存) |
| | | */ |
| | | @Operation(summary = "导入表结构(保存)") |
| | | @SaCheckPermission("tool:gen:import") |
| | | @Log(title = "代码生成", businessType = BusinessType.IMPORT) |
| | | @PostMapping("/importTable") |
| | |
| | | /** |
| | | * 修改保存代码生成业务 |
| | | */ |
| | | @Operation(summary = "修改保存代码生成业务") |
| | | @SaCheckPermission("tool:gen:edit") |
| | | @Log(title = "代码生成", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | |
| | | /** |
| | | * 删除代码生成 |
| | | */ |
| | | @Operation(summary = "删除代码生成") |
| | | @SaCheckPermission("tool:gen:remove") |
| | | @Log(title = "代码生成", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{tableIds}") |
| | |
| | | /** |
| | | * 预览代码 |
| | | */ |
| | | @Operation(summary = "预览代码") |
| | | @SaCheckPermission("tool:gen:preview") |
| | | @GetMapping("/preview/{tableId}") |
| | | public R<Map<String, String>> preview(@PathVariable("tableId") Long tableId) throws IOException { |
| | |
| | | /** |
| | | * 生成代码(下载方式) |
| | | */ |
| | | @Operation(summary = "生成代码(下载方式)") |
| | | @SaCheckPermission("tool:gen:code") |
| | | @Log(title = "代码生成", businessType = BusinessType.GENCODE) |
| | | @GetMapping("/download/{tableName}") |
| | |
| | | /** |
| | | * 生成代码(自定义路径) |
| | | */ |
| | | @Operation(summary = "生成代码(自定义路径)") |
| | | @SaCheckPermission("tool:gen:code") |
| | | @Log(title = "代码生成", businessType = BusinessType.GENCODE) |
| | | @GetMapping("/genCode/{tableName}") |
| | |
| | | /** |
| | | * 同步数据库 |
| | | */ |
| | | @Operation(summary = "同步数据库") |
| | | @SaCheckPermission("tool:gen:edit") |
| | | @Log(title = "代码生成", businessType = BusinessType.UPDATE) |
| | | @GetMapping("/synchDb/{tableName}") |
| | |
| | | /** |
| | | * 批量生成代码 |
| | | */ |
| | | @Operation(summary = "批量生成代码") |
| | | @SaCheckPermission("tool:gen:code") |
| | | @Log(title = "代码生成", businessType = BusinessType.GENCODE) |
| | | @GetMapping("/batchGenCode") |
| | |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @Schema(name = "${functionName}业务对象") |
| | | public class ${ClassName}Bo extends ${Entity} { |
| | | |
| | | #foreach ($column in $columns) |
| | |
| | | #set($Group="EditGroup.class") |
| | | #end |
| | | #if($column.isRequired == 1) |
| | | @Schema(name = "$column.columnComment", required = true) |
| | | #if($column.javaType == 'String') |
| | | @NotBlank(message = "$column.columnComment不能为空", groups = { $Group }) |
| | | #else |
| | | @NotNull(message = "$column.columnComment不能为空", groups = { $Group }) |
| | | #end |
| | | #else |
| | | @Schema(name = "$column.columnComment") |
| | | #end |
| | | private $column.javaType $column.javaField; |
| | | |
| | |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | #elseif($table.tree) |
| | | #end |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 查询${functionName}列表 |
| | | */ |
| | | @Operation(summary = "查询${functionName}列表") |
| | | @SaCheckPermission("${permissionPrefix}:list") |
| | | @GetMapping("/list") |
| | | #if($table.crud || $table.sub) |
| | |
| | | /** |
| | | * 导出${functionName}列表 |
| | | */ |
| | | @Operation(summary = "导出${functionName}列表") |
| | | @SaCheckPermission("${permissionPrefix}:export") |
| | | @Log(title = "${functionName}", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | |
| | | /** |
| | | * 获取${functionName}详细信息 |
| | | */ |
| | | @Operation(summary = "获取${functionName}详细信息") |
| | | @SaCheckPermission("${permissionPrefix}:query") |
| | | @GetMapping("/{${pkColumn.javaField}}") |
| | | public R<${ClassName}Vo> getInfo(@Parameter(name = "主键") |
| | |
| | | /** |
| | | * 新增${functionName} |
| | | */ |
| | | @Operation(summary = "新增${functionName}") |
| | | @SaCheckPermission("${permissionPrefix}:add") |
| | | @Log(title = "${functionName}", businessType = BusinessType.INSERT) |
| | | @RepeatSubmit() |
| | |
| | | /** |
| | | * 修改${functionName} |
| | | */ |
| | | @Operation(summary = "修改${functionName}") |
| | | @SaCheckPermission("${permissionPrefix}:edit") |
| | | @Log(title = "${functionName}", businessType = BusinessType.UPDATE) |
| | | @RepeatSubmit() |
| | |
| | | /** |
| | | * 删除${functionName} |
| | | */ |
| | | @Operation(summary = "删除${functionName}") |
| | | @SaCheckPermission("${permissionPrefix}:remove") |
| | | @Log(title = "${functionName}", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{${pkColumn.javaField}s}") |
| | |
| | | * @date ${datetime} |
| | | */ |
| | | @Data |
| | | @Schema(name = "${functionName}视图对象") |
| | | @ExcelIgnoreUnannotated |
| | | public class ${ClassName}Vo { |
| | | |
| | |
| | | #else |
| | | @ExcelProperty(value = "${comment}") |
| | | #end |
| | | @Schema(name = "$column.columnComment") |
| | | private $column.javaType $column.javaField; |
| | | |
| | | #end |
| | |
| | | package com.ruoyi.system.domain; |
| | | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | |
| | | */ |
| | | @Data |
| | | @NoArgsConstructor |
| | | @Schema(name = "缓存信息") |
| | | public class SysCache { |
| | | |
| | | /** |
| | | * 缓存名称 |
| | | */ |
| | | @Schema(name = "缓存名称") |
| | | private String cacheName = ""; |
| | | |
| | | /** |
| | | * 缓存键名 |
| | | */ |
| | | @Schema(name = "缓存键名") |
| | | private String cacheKey = ""; |
| | | |
| | | /** |
| | | * 缓存内容 |
| | | */ |
| | | @Schema(name = "缓存内容") |
| | | private String cacheValue = ""; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @Schema(name = "备注") |
| | | private String remark = ""; |
| | | |
| | | public SysCache(String cacheName, String remark) { |
| | |
| | | import com.ruoyi.common.annotation.ExcelDictFormat; |
| | | import com.ruoyi.common.convert.ExcelDictConvert; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @TableName("sys_config") |
| | | @ExcelIgnoreUnannotated |
| | | @Schema(name = "参数配置业务对象") |
| | | public class SysConfig extends BaseEntity { |
| | | |
| | | /** |
| | | * 参数主键 |
| | | */ |
| | | @Schema(name = "参数主键") |
| | | @ExcelProperty(value = "参数主键") |
| | | @TableId(value = "config_id") |
| | | private Long configId; |
| | |
| | | /** |
| | | * 参数名称 |
| | | */ |
| | | @Schema(name = "参数名称") |
| | | @ExcelProperty(value = "参数名称") |
| | | @NotBlank(message = "参数名称不能为空") |
| | | @Size(min = 0, max = 100, message = "参数名称不能超过100个字符") |
| | |
| | | /** |
| | | * 参数键名 |
| | | */ |
| | | @Schema(name = "参数键名") |
| | | @ExcelProperty(value = "参数键名") |
| | | @NotBlank(message = "参数键名长度不能为空") |
| | | @Size(min = 0, max = 100, message = "参数键名长度不能超过100个字符") |
| | |
| | | /** |
| | | * 参数键值 |
| | | */ |
| | | @Schema(name = "参数键值") |
| | | @ExcelProperty(value = "参数键值") |
| | | @NotBlank(message = "参数键值不能为空") |
| | | @Size(min = 0, max = 500, message = "参数键值长度不能超过500个字符") |
| | |
| | | /** |
| | | * 系统内置(Y是 N否) |
| | | */ |
| | | @Schema(name = "系统内置(Y是 N否)") |
| | | @ExcelProperty(value = "系统内置", converter = ExcelDictConvert.class) |
| | | @ExcelDictFormat(dictType = "sys_yes_no") |
| | | private String configType; |
| | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @Schema(name = "备注") |
| | | private String remark; |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ruoyi.common.annotation.ExcelDictFormat; |
| | | import com.ruoyi.common.convert.ExcelDictConvert; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | @Data |
| | | @TableName("sys_logininfor") |
| | | @ExcelIgnoreUnannotated |
| | | @Schema(name = "系统访问记录业务对象") |
| | | public class SysLogininfor implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @Schema(name = "访问ID") |
| | | @ExcelProperty(value = "序号") |
| | | @TableId(value = "info_id") |
| | | private Long infoId; |
| | |
| | | /** |
| | | * 用户账号 |
| | | */ |
| | | @Schema(name = "用户账号") |
| | | @ExcelProperty(value = "用户账号") |
| | | private String userName; |
| | | |
| | | /** |
| | | * 登录状态 0成功 1失败 |
| | | */ |
| | | @Schema(name = "登录状态 0成功 1失败") |
| | | @ExcelProperty(value = "登录状态", converter = ExcelDictConvert.class) |
| | | @ExcelDictFormat(dictType = "sys_common_status") |
| | | private String status; |
| | |
| | | /** |
| | | * 登录IP地址 |
| | | */ |
| | | @Schema(name = "登录IP地址") |
| | | @ExcelProperty(value = "登录地址") |
| | | private String ipaddr; |
| | | |
| | | /** |
| | | * 登录地点 |
| | | */ |
| | | @Schema(name = "登录地点") |
| | | @ExcelProperty(value = "登录地点") |
| | | private String loginLocation; |
| | | |
| | | /** |
| | | * 浏览器类型 |
| | | */ |
| | | @Schema(name = "浏览器类型") |
| | | @ExcelProperty(value = "浏览器") |
| | | private String browser; |
| | | |
| | | /** |
| | | * 操作系统 |
| | | */ |
| | | @Schema(name = "操作系统") |
| | | @ExcelProperty(value = "操作系统") |
| | | private String os; |
| | | |
| | | /** |
| | | * 提示消息 |
| | | */ |
| | | @Schema(name = "提示消息") |
| | | @ExcelProperty(value = "提示消息") |
| | | private String msg; |
| | | |
| | | /** |
| | | * 访问时间 |
| | | */ |
| | | @Schema(name = "访问时间") |
| | | @ExcelProperty(value = "访问时间") |
| | | private Date loginTime; |
| | | |
| | | /** |
| | | * 请求参数 |
| | | */ |
| | | @Schema(name = "请求参数") |
| | | @TableField(exist = false) |
| | | private Map<String, Object> params = new HashMap<>(); |
| | | |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import com.ruoyi.common.xss.Xss; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | /** |
| | | * 公告ID |
| | | */ |
| | | @Schema(name = "公告ID") |
| | | @TableId(value = "notice_id") |
| | | private Long noticeId; |
| | | |
| | |
| | | * 公告标题 |
| | | */ |
| | | @Xss(message = "公告标题不能包含脚本字符") |
| | | @Schema(name = "公告标题") |
| | | @NotBlank(message = "公告标题不能为空") |
| | | @Size(min = 0, max = 50, message = "公告标题不能超过50个字符") |
| | | private String noticeTitle; |
| | |
| | | /** |
| | | * 公告类型(1通知 2公告) |
| | | */ |
| | | @Schema(name = "公告类型(1通知 2公告)") |
| | | private String noticeType; |
| | | |
| | | /** |
| | | * 公告内容 |
| | | */ |
| | | @Schema(name = "公告内容") |
| | | private String noticeContent; |
| | | |
| | | /** |
| | | * 公告状态(0正常 1关闭) |
| | | */ |
| | | @Schema(name = "公告状态(0正常 1关闭)") |
| | | private String status; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @Schema(name = "备注") |
| | | private String remark; |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ruoyi.common.annotation.ExcelDictFormat; |
| | | import com.ruoyi.common.convert.ExcelDictConvert; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | @Data |
| | | @TableName("sys_oper_log") |
| | | @ExcelIgnoreUnannotated |
| | | @Schema(name = "操作日志记录业务对象") |
| | | public class SysOperLog implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | |
| | | /** |
| | | * 日志主键 |
| | | */ |
| | | @Schema(name = "日志主键") |
| | | @ExcelProperty(value = "日志主键") |
| | | @TableId(value = "oper_id") |
| | | private Long operId; |
| | |
| | | /** |
| | | * 操作模块 |
| | | */ |
| | | @Schema(name = "操作模块") |
| | | @ExcelProperty(value = "操作模块") |
| | | private String title; |
| | | |
| | | /** |
| | | * 业务类型(0其它 1新增 2修改 3删除) |
| | | */ |
| | | @Schema(name = "业务类型(0其它 1新增 2修改 3删除)") |
| | | @ExcelProperty(value = "业务类型", converter = ExcelDictConvert.class) |
| | | @ExcelDictFormat(dictType = "sys_oper_type") |
| | | private Integer businessType; |
| | |
| | | /** |
| | | * 业务类型数组 |
| | | */ |
| | | @Schema(name = "业务类型数组") |
| | | @TableField(exist = false) |
| | | private Integer[] businessTypes; |
| | | |
| | | /** |
| | | * 请求方法 |
| | | */ |
| | | @Schema(name = "请求方法") |
| | | @ExcelProperty(value = "请求方法") |
| | | private String method; |
| | | |
| | | /** |
| | | * 请求方式 |
| | | */ |
| | | @Schema(name = "请求方式") |
| | | @ExcelProperty(value = "请求方式") |
| | | private String requestMethod; |
| | | |
| | | /** |
| | | * 操作类别(0其它 1后台用户 2手机端用户) |
| | | */ |
| | | @Schema(name = "操作类别(0其它 1后台用户 2手机端用户)") |
| | | @ExcelProperty(value = "操作类别", converter = ExcelDictConvert.class) |
| | | @ExcelDictFormat(readConverterExp = "0=其它,1=后台用户,2=手机端用户") |
| | | private Integer operatorType; |
| | |
| | | /** |
| | | * 操作人员 |
| | | */ |
| | | @Schema(name = "操作人员") |
| | | @ExcelProperty(value = "操作人员") |
| | | private String operName; |
| | | |
| | | /** |
| | | * 部门名称 |
| | | */ |
| | | @Schema(name = "部门名称") |
| | | @ExcelProperty(value = "部门名称") |
| | | private String deptName; |
| | | |
| | | /** |
| | | * 请求url |
| | | */ |
| | | @Schema(name = "请求url") |
| | | @ExcelProperty(value = "请求地址") |
| | | private String operUrl; |
| | | |
| | | /** |
| | | * 操作地址 |
| | | */ |
| | | @Schema(name = "操作地址") |
| | | @ExcelProperty(value = "操作地址") |
| | | private String operIp; |
| | | |
| | | /** |
| | | * 操作地点 |
| | | */ |
| | | @Schema(name = "操作地点") |
| | | @ExcelProperty(value = "操作地点") |
| | | private String operLocation; |
| | | |
| | | /** |
| | | * 请求参数 |
| | | */ |
| | | @Schema(name = "请求参数") |
| | | @ExcelProperty(value = "请求参数") |
| | | private String operParam; |
| | | |
| | | /** |
| | | * 返回参数 |
| | | */ |
| | | @Schema(name = "返回参数") |
| | | @ExcelProperty(value = "返回参数") |
| | | private String jsonResult; |
| | | |
| | | /** |
| | | * 操作状态(0正常 1异常) |
| | | */ |
| | | @Schema(name = "操作状态(0正常 1异常)") |
| | | @ExcelProperty(value = "状态", converter = ExcelDictConvert.class) |
| | | @ExcelDictFormat(dictType = "sys_common_status") |
| | | private Integer status; |
| | |
| | | /** |
| | | * 错误消息 |
| | | */ |
| | | @Schema(name = "错误消息") |
| | | @ExcelProperty(value = "错误消息") |
| | | private String errorMsg; |
| | | |
| | | /** |
| | | * 操作时间 |
| | | */ |
| | | @Schema(name = "操作时间") |
| | | @ExcelProperty(value = "操作时间") |
| | | private Date operTime; |
| | | |
| | | /** |
| | | * 请求参数 |
| | | */ |
| | | @Schema(name = "请求参数") |
| | | @TableField(exist = false) |
| | | private Map<String, Object> params = new HashMap<>(); |
| | | |
| | |
| | | import com.ruoyi.common.annotation.ExcelDictFormat; |
| | | import com.ruoyi.common.convert.ExcelDictConvert; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @TableName("sys_post") |
| | | @ExcelIgnoreUnannotated |
| | | @Schema(name = "岗位信息业务对象") |
| | | public class SysPost extends BaseEntity { |
| | | |
| | | /** |
| | | * 岗位序号 |
| | | */ |
| | | @Schema(name = "岗位序号") |
| | | @ExcelProperty(value = "岗位序号") |
| | | @TableId(value = "post_id") |
| | | private Long postId; |
| | |
| | | /** |
| | | * 岗位编码 |
| | | */ |
| | | @Schema(name = "岗位编码") |
| | | @ExcelProperty(value = "岗位编码") |
| | | @NotBlank(message = "岗位编码不能为空") |
| | | @Size(min = 0, max = 64, message = "岗位编码长度不能超过64个字符") |
| | |
| | | /** |
| | | * 岗位名称 |
| | | */ |
| | | @Schema(name = "岗位名称") |
| | | @ExcelProperty(value = "岗位名称") |
| | | @NotBlank(message = "岗位名称不能为空") |
| | | @Size(min = 0, max = 50, message = "岗位名称长度不能超过50个字符") |
| | |
| | | /** |
| | | * 岗位排序 |
| | | */ |
| | | @Schema(name = "岗位排序") |
| | | @ExcelProperty(value = "岗位排序") |
| | | @NotNull(message = "显示顺序不能为空") |
| | | private Integer postSort; |
| | |
| | | /** |
| | | * 状态(0正常 1停用) |
| | | */ |
| | | @Schema(name = "状态(0正常 1停用)") |
| | | @ExcelProperty(value = "状态", converter = ExcelDictConvert.class) |
| | | @ExcelDictFormat(dictType = "sys_common_status") |
| | | private String status; |
| | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @Schema(name = "备注") |
| | | private String remark; |
| | | |
| | | /** |
| | | * 用户是否存在此岗位标识 默认不存在 |
| | | */ |
| | | @Schema(name = "用户是否存在此岗位标识 默认不存在") |
| | | @TableField(exist = false) |
| | | private boolean flag = false; |
| | | |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | |
| | | |
| | | @Data |
| | | @TableName("sys_role_dept") |
| | | @Schema(name = "角色和部门关联") |
| | | public class SysRoleDept { |
| | | |
| | | /** |
| | | * 角色ID |
| | | */ |
| | | @TableId(type = IdType.INPUT) |
| | | @Schema(name = "角色ID") |
| | | private Long roleId; |
| | | |
| | | /** |
| | | * 部门ID |
| | | */ |
| | | @Schema(name = "部门ID") |
| | | private Long deptId; |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | |
| | | |
| | | @Data |
| | | @TableName("sys_role_menu") |
| | | @Schema(name = "角色和菜单关联") |
| | | public class SysRoleMenu { |
| | | |
| | | /** |
| | | * 角色ID |
| | | */ |
| | | @TableId(type = IdType.INPUT) |
| | | @Schema(name = "角色ID") |
| | | private Long roleId; |
| | | |
| | | /** |
| | | * 菜单ID |
| | | */ |
| | | @Schema(name = "角色ID") |
| | | private Long menuId; |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.domain; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | |
| | | */ |
| | | |
| | | @Data |
| | | @Schema(name = "当前在线会话业务对象") |
| | | public class SysUserOnline { |
| | | |
| | | /** |
| | | * 会话编号 |
| | | */ |
| | | @Schema(name = "会话编号") |
| | | private String tokenId; |
| | | |
| | | /** |
| | | * 部门名称 |
| | | */ |
| | | @Schema(name = "部门名称") |
| | | private String deptName; |
| | | |
| | | /** |
| | | * 用户名称 |
| | | */ |
| | | @Schema(name = "用户名称") |
| | | private String userName; |
| | | |
| | | /** |
| | | * 登录IP地址 |
| | | */ |
| | | @Schema(name = "登录IP地址") |
| | | private String ipaddr; |
| | | |
| | | /** |
| | | * 登录地址 |
| | | */ |
| | | @Schema(name = "登录地址") |
| | | private String loginLocation; |
| | | |
| | | /** |
| | | * 浏览器类型 |
| | | */ |
| | | @Schema(name = "浏览器类型") |
| | | private String browser; |
| | | |
| | | /** |
| | | * 操作系统 |
| | | */ |
| | | @Schema(name = "操作系统") |
| | | private String os; |
| | | |
| | | /** |
| | | * 登录时间 |
| | | */ |
| | | @Schema(name = "登录时间") |
| | | private Long loginTime; |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | |
| | | |
| | | @Data |
| | | @TableName("sys_user_post") |
| | | @Schema(name = "用户和岗位关联") |
| | | public class SysUserPost { |
| | | |
| | | /** |
| | | * 用户ID |
| | | */ |
| | | @TableId(type = IdType.INPUT) |
| | | @Schema(name = "用户ID") |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 岗位ID |
| | | */ |
| | | @Schema(name = "岗位ID") |
| | | private Long postId; |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | |
| | | |
| | | @Data |
| | | @TableName("sys_user_role") |
| | | @Schema(name = "用户和角色关联") |
| | | public class SysUserRole { |
| | | |
| | | /** |
| | | * 用户ID |
| | | */ |
| | | @TableId(type = IdType.INPUT) |
| | | @Schema(name = "用户ID") |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 角色ID |
| | | */ |
| | | @Schema(name = "角色ID") |
| | | private Long roleId; |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.domain.bo; |
| | | |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @Schema(name = "OSS对象存储分页查询对象") |
| | | public class SysOssBo extends BaseEntity { |
| | | |
| | | /** |
| | | * 文件名 |
| | | */ |
| | | @Schema(name = "文件名") |
| | | private String fileName; |
| | | /** |
| | | * 原名 |
| | | */ |
| | | @Schema(name = "原名") |
| | | private String originalName; |
| | | /** |
| | | * 文件后缀名 |
| | | */ |
| | | @Schema(name = "文件后缀名") |
| | | private String fileSuffix; |
| | | /** |
| | | * URL地址 |
| | | */ |
| | | @Schema(name = "URL地址") |
| | | private String url; |
| | | /** |
| | | * 服务商 |
| | | */ |
| | | @Schema(name = "服务商") |
| | | private String service; |
| | | |
| | | } |
| | |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import com.ruoyi.common.core.validate.AddGroup; |
| | | import com.ruoyi.common.core.validate.EditGroup; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @Schema(name = "对象存储配置业务对象") |
| | | public class SysOssConfigBo extends BaseEntity { |
| | | |
| | | /** |
| | | * 主建 |
| | | */ |
| | | @Schema(name = "主建", required = true) |
| | | @NotNull(message = "主建不能为空", groups = {EditGroup.class}) |
| | | private Long ossConfigId; |
| | | |
| | | /** |
| | | * 配置key |
| | | */ |
| | | @Schema(name = "配置key", required = true) |
| | | @NotBlank(message = "配置key不能为空", groups = {AddGroup.class, EditGroup.class}) |
| | | @Size(min = 2, max = 100, message = "configKey长度必须介于2和20 之间") |
| | | private String configKey; |
| | |
| | | /** |
| | | * accessKey |
| | | */ |
| | | @Schema(name = "accessKey", required = true) |
| | | @NotBlank(message = "accessKey不能为空", groups = {AddGroup.class, EditGroup.class}) |
| | | @Size(min = 2, max = 100, message = "accessKey长度必须介于2和100 之间") |
| | | private String accessKey; |
| | |
| | | /** |
| | | * 秘钥 |
| | | */ |
| | | @Schema(name = "secretKey", required = true) |
| | | @NotBlank(message = "secretKey不能为空", groups = {AddGroup.class, EditGroup.class}) |
| | | @Size(min = 2, max = 100, message = "secretKey长度必须介于2和100 之间") |
| | | private String secretKey; |
| | |
| | | /** |
| | | * 桶名称 |
| | | */ |
| | | @Schema(name = "桶名称", required = true) |
| | | @NotBlank(message = "桶名称不能为空", groups = {AddGroup.class, EditGroup.class}) |
| | | @Size(min = 2, max = 100, message = "bucketName长度必须介于2和100之间") |
| | | private String bucketName; |
| | |
| | | /** |
| | | * 前缀 |
| | | */ |
| | | @Schema(name = "前缀") |
| | | private String prefix; |
| | | |
| | | /** |
| | | * 访问站点 |
| | | */ |
| | | @Schema(name = "访问站点", required = true) |
| | | @NotBlank(message = "访问站点不能为空", groups = {AddGroup.class, EditGroup.class}) |
| | | @Size(min = 2, max = 100, message = "endpoint长度必须介于2和100之间") |
| | | private String endpoint; |
| | |
| | | /** |
| | | * 自定义域名 |
| | | */ |
| | | @Schema(name = "自定义域名") |
| | | private String domain; |
| | | |
| | | /** |
| | | * 是否https(Y=是,N=否) |
| | | */ |
| | | @Schema(name = "是否https(Y=是,N=否)") |
| | | private String isHttps; |
| | | |
| | | /** |
| | | * 状态(0=正常,1=停用) |
| | | */ |
| | | @Schema(name = "状态(0=正常,1=停用)") |
| | | private String status; |
| | | |
| | | /** |
| | | * 域 |
| | | */ |
| | | @Schema(name = "域") |
| | | private String region; |
| | | |
| | | /** |
| | | * 扩展字段 |
| | | */ |
| | | @Schema(name = "扩展字段") |
| | | private String ext1; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @Schema(name = "备注") |
| | | private String remark; |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.domain.vo; |
| | | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | |
| | | */ |
| | | |
| | | @Data |
| | | @Schema(name = "路由显示信息") |
| | | public class MetaVo { |
| | | |
| | | /** |
| | | * 设置该路由在侧边栏和面包屑中展示的名字 |
| | | */ |
| | | @Schema(name = "设置该路由在侧边栏和面包屑中展示的名字") |
| | | private String title; |
| | | |
| | | /** |
| | | * 设置该路由的图标,对应路径src/assets/icons/svg |
| | | */ |
| | | @Schema(name = "设置该路由的图标,对应路径src/assets/icons/svg") |
| | | private String icon; |
| | | |
| | | /** |
| | | * 设置为true,则不会被 <keep-alive>缓存 |
| | | */ |
| | | @Schema(name = "设置为true,则不会被 <keep-alive>缓存") |
| | | private boolean noCache; |
| | | |
| | | /** |
| | | * 内链地址(http(s)://开头) |
| | | */ |
| | | @Schema(name = "内链地址(http(s)://开头)") |
| | | private String link; |
| | | |
| | | public MetaVo(String title, String icon) { |
| | |
| | | package com.ruoyi.system.domain.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonInclude; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | |
| | | */ |
| | | @Data |
| | | @JsonInclude(JsonInclude.Include.NON_EMPTY) |
| | | @Schema(name = "路由配置信息") |
| | | public class RouterVo { |
| | | |
| | | /** |
| | | * 路由名字 |
| | | */ |
| | | @Schema(name = "路由名字") |
| | | private String name; |
| | | |
| | | /** |
| | | * 路由地址 |
| | | */ |
| | | @Schema(name = "路由地址") |
| | | private String path; |
| | | |
| | | /** |
| | | * 是否隐藏路由,当设置 true 的时候该路由不会再侧边栏出现 |
| | | */ |
| | | @Schema(name = "是否隐藏路由,当设置 true 的时候该路由不会再侧边栏出现") |
| | | private boolean hidden; |
| | | |
| | | /** |
| | | * 重定向地址,当设置 noRedirect 的时候该路由在面包屑导航中不可被点击 |
| | | */ |
| | | @Schema(name = "重定向地址,当设置 noRedirect 的时候该路由在面包屑导航中不可被点击") |
| | | private String redirect; |
| | | |
| | | /** |
| | | * 组件地址 |
| | | */ |
| | | @Schema(name = "组件地址") |
| | | private String component; |
| | | |
| | | /** |
| | | * 路由参数:如 {"id": 1, "name": "ry"} |
| | | */ |
| | | @Schema(name = "路由参数:如 {\"id\": 1, \"name\": \"ry\"}") |
| | | private String query; |
| | | |
| | | /** |
| | | * 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式--如组件页面 |
| | | */ |
| | | @Schema(name = "当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式--如组件页面") |
| | | private Boolean alwaysShow; |
| | | |
| | | /** |
| | | * 其他元素 |
| | | */ |
| | | @Schema(name = "其他元素") |
| | | private MetaVo meta; |
| | | |
| | | /** |
| | | * 子路由 |
| | | */ |
| | | @Schema(name = "子路由") |
| | | private List<RouterVo> children; |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.domain.vo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | |
| | |
| | | * @date 2021-08-13 |
| | | */ |
| | | @Data |
| | | @Schema(name = "对象存储配置视图对象") |
| | | @ExcelIgnoreUnannotated |
| | | public class SysOssConfigVo { |
| | | |
| | |
| | | /** |
| | | * 主建 |
| | | */ |
| | | @Schema(name = "主建") |
| | | private Long ossConfigId; |
| | | |
| | | /** |
| | | * 配置key |
| | | */ |
| | | @Schema(name = "配置key") |
| | | private String configKey; |
| | | |
| | | /** |
| | | * accessKey |
| | | */ |
| | | @Schema(name = "accessKey") |
| | | private String accessKey; |
| | | |
| | | /** |
| | | * 秘钥 |
| | | */ |
| | | @Schema(name = "secretKey") |
| | | private String secretKey; |
| | | |
| | | /** |
| | | * 桶名称 |
| | | */ |
| | | @Schema(name = "桶名称") |
| | | private String bucketName; |
| | | |
| | | /** |
| | | * 前缀 |
| | | */ |
| | | @Schema(name = "前缀") |
| | | private String prefix; |
| | | |
| | | /** |
| | | * 访问站点 |
| | | */ |
| | | @Schema(name = "访问站点") |
| | | private String endpoint; |
| | | |
| | | /** |
| | | * 自定义域名 |
| | | */ |
| | | @Schema(name = "自定义域名") |
| | | private String domain; |
| | | |
| | | /** |
| | | * 是否https(Y=是,N=否) |
| | | */ |
| | | @Schema(name = "是否https(Y=是,N=否)") |
| | | private String isHttps; |
| | | |
| | | /** |
| | | * 域 |
| | | */ |
| | | @Schema(name = "域") |
| | | private String region; |
| | | |
| | | /** |
| | | * 状态(0=正常,1=停用) |
| | | */ |
| | | @Schema(name = "状态(0=正常,1=停用)") |
| | | private String status; |
| | | |
| | | /** |
| | | * 扩展字段 |
| | | */ |
| | | @Schema(name = "扩展字段") |
| | | private String ext1; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @Schema(name = "备注") |
| | | private String remark; |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.domain.vo; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | |
| | | * @author Lion Li |
| | | */ |
| | | @Data |
| | | @Schema(name = "OSS对象存储视图对象") |
| | | public class SysOssVo { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | |
| | | /** |
| | | * 对象存储主键 |
| | | */ |
| | | @Schema(name = "对象存储主键") |
| | | private Long ossId; |
| | | |
| | | /** |
| | | * 文件名 |
| | | */ |
| | | @Schema(name = "文件名") |
| | | private String fileName; |
| | | |
| | | /** |
| | | * 原名 |
| | | */ |
| | | @Schema(name = "原名") |
| | | private String originalName; |
| | | |
| | | /** |
| | | * 文件后缀名 |
| | | */ |
| | | @Schema(name = "文件后缀名") |
| | | private String fileSuffix; |
| | | |
| | | /** |
| | | * URL地址 |
| | | */ |
| | | @Schema(name = "URL地址") |
| | | private String url; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @Schema(name = "创建时间") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 上传人 |
| | | */ |
| | | @Schema(name = "上传人") |
| | | private String createBy; |
| | | |
| | | /** |
| | | * 服务商 |
| | | */ |
| | | @Schema(name = "服务商") |
| | | private String service; |
| | | |
| | | |