mirror of
https://gitee.com/log4j/pig.git
synced 2024-12-22 20:54:25 +08:00
🔖 Releasing / Version tags. 2.7.0
This commit is contained in:
parent
d8396db61f
commit
10eaaf8a79
@ -212,7 +212,7 @@ INSERT INTO `sys_menu` VALUES (2403, '客户端删除', 'sys_client_del', NULL,
|
|||||||
INSERT INTO `sys_menu` VALUES (2500, '服务监控', NULL, 'http://127.0.0.1:5001', 2000, 'icon-server', NULL, 10, '0', '0', '2018-06-26 10:50:32', '2019-02-01 20:41:30', '0');
|
INSERT INTO `sys_menu` VALUES (2500, '服务监控', NULL, 'http://127.0.0.1:5001', 2000, 'icon-server', NULL, 10, '0', '0', '2018-06-26 10:50:32', '2019-02-01 20:41:30', '0');
|
||||||
INSERT INTO `sys_menu` VALUES (3000, '开发平台', NULL, '/gen', -1, 'icon-shejiyukaifa-', NULL, 3, '1', '0', '2020-03-11 22:15:40', '2020-03-11 23:52:54', '0');
|
INSERT INTO `sys_menu` VALUES (3000, '开发平台', NULL, '/gen', -1, 'icon-shejiyukaifa-', NULL, 3, '1', '0', '2020-03-11 22:15:40', '2020-03-11 23:52:54', '0');
|
||||||
INSERT INTO `sys_menu` VALUES (3100, '数据源管理', NULL, '/gen/datasource', 3000, 'icon-mysql', NULL, 1, '1', '0', '2020-03-11 22:17:05', '2020-03-12 00:16:09', '0');
|
INSERT INTO `sys_menu` VALUES (3100, '数据源管理', NULL, '/gen/datasource', 3000, 'icon-mysql', NULL, 1, '1', '0', '2020-03-11 22:17:05', '2020-03-12 00:16:09', '0');
|
||||||
INSERT INTO `sys_menu` VALUES (3200, '代码生成', NULL, '/gen/index', 3000, 'icon-weibiaoti46', NULL, 2, '1', '0', '2020-03-11 22:23:42', '2020-03-12 00:16:14', '0');
|
INSERT INTO `sys_menu` VALUES (3200, '代码生成', NULL, '/gen/index', 3000, 'icon-weibiaoti46', NULL, 2, '0', '0', '2020-03-11 22:23:42', '2020-03-12 00:16:14', '0');
|
||||||
INSERT INTO `sys_menu` VALUES (3300, '表单管理', NULL, '/gen/form', 3000, 'icon-record', NULL, 3, '1', '0', '2020-03-11 22:19:32', '2020-03-12 00:16:18', '0');
|
INSERT INTO `sys_menu` VALUES (3300, '表单管理', NULL, '/gen/form', 3000, 'icon-record', NULL, 3, '1', '0', '2020-03-11 22:19:32', '2020-03-12 00:16:18', '0');
|
||||||
INSERT INTO `sys_menu` VALUES (3301, '表单新增', 'gen_form_add', NULL, 3300, '', NULL, 0, '0', '1', '2018-05-15 21:35:18', '2020-03-11 22:39:08', '0');
|
INSERT INTO `sys_menu` VALUES (3301, '表单新增', 'gen_form_add', NULL, 3300, '', NULL, 0, '0', '1', '2018-05-15 21:35:18', '2020-03-11 22:39:08', '0');
|
||||||
INSERT INTO `sys_menu` VALUES (3302, '表单修改', 'gen_form_edit', NULL, 3300, '', NULL, 1, '0', '1', '2018-05-15 21:35:18', '2020-03-11 22:39:09', '0');
|
INSERT INTO `sys_menu` VALUES (3302, '表单修改', 'gen_form_edit', NULL, 3300, '', NULL, 1, '0', '1', '2018-05-15 21:35:18', '2020-03-11 22:39:09', '0');
|
||||||
|
@ -23,6 +23,7 @@ import com.pig4cloud.pig.codegen.entity.GenDatasourceConf;
|
|||||||
import com.pig4cloud.pig.codegen.service.GenDatasourceConfService;
|
import com.pig4cloud.pig.codegen.service.GenDatasourceConfService;
|
||||||
import com.pig4cloud.pig.common.core.util.R;
|
import com.pig4cloud.pig.common.core.util.R;
|
||||||
import com.pig4cloud.pig.common.log.annotation.SysLog;
|
import com.pig4cloud.pig.common.log.annotation.SysLog;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@ -36,6 +37,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
@RestController
|
@RestController
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RequestMapping("/dsconf")
|
@RequestMapping("/dsconf")
|
||||||
|
@Api(value = "dsconf", tags = "数据源管理模块")
|
||||||
public class GenDsConfController {
|
public class GenDsConfController {
|
||||||
private final GenDatasourceConfService datasourceConfService;
|
private final GenDatasourceConfService datasourceConfService;
|
||||||
|
|
||||||
|
@ -83,34 +83,6 @@ public class GenFormConfController {
|
|||||||
return R.ok(genRecordService.getForm(dsName, tableName));
|
return R.ok(genRecordService.getForm(dsName, tableName));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增生成记录
|
|
||||||
*
|
|
||||||
* @param formConf 生成记录
|
|
||||||
* @return R
|
|
||||||
*/
|
|
||||||
@ApiOperation(value = "新增生成记录", notes = "新增生成记录")
|
|
||||||
@SysLog("新增生成记录")
|
|
||||||
@PostMapping
|
|
||||||
@PreAuthorize("@pms.hasPermission('gen_form_add')")
|
|
||||||
public R save(@RequestBody GenFormConf formConf) {
|
|
||||||
return R.ok(genRecordService.save(formConf));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改生成记录
|
|
||||||
*
|
|
||||||
* @param formConf 生成记录
|
|
||||||
* @return R
|
|
||||||
*/
|
|
||||||
@ApiOperation(value = "修改生成记录", notes = "修改生成记录")
|
|
||||||
@SysLog("修改生成记录")
|
|
||||||
@PutMapping
|
|
||||||
@PreAuthorize("@pms.hasPermission('gen_form_edit')")
|
|
||||||
public R updateById(@RequestBody GenFormConf formConf) {
|
|
||||||
return R.ok(genRecordService.updateById(formConf));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id删除生成记录
|
* 通过id删除生成记录
|
||||||
*
|
*
|
||||||
|
@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.pig4cloud.pig.codegen.entity.GenConfig;
|
import com.pig4cloud.pig.codegen.entity.GenConfig;
|
||||||
import com.pig4cloud.pig.codegen.service.GeneratorService;
|
import com.pig4cloud.pig.codegen.service.GeneratorService;
|
||||||
import com.pig4cloud.pig.common.core.util.R;
|
import com.pig4cloud.pig.common.core.util.R;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.SneakyThrows;
|
import lombok.SneakyThrows;
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
@ -39,6 +40,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
@RestController
|
@RestController
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RequestMapping("/generator")
|
@RequestMapping("/generator")
|
||||||
|
@Api(value = "generator", tags = "代码生成模块")
|
||||||
public class GeneratorController {
|
public class GeneratorController {
|
||||||
private final GeneratorService generatorService;
|
private final GeneratorService generatorService;
|
||||||
|
|
||||||
|
@ -19,8 +19,8 @@ package ${package}.${moduleName}.controller;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.pig4cloud.pigx.common.core.util.R;
|
import com.pig4cloud.pig.common.core.util.R;
|
||||||
import com.pig4cloud.pigx.common.log.annotation.SysLog;
|
import com.pig4cloud.pig.common.log.annotation.SysLog;
|
||||||
import ${package}.${moduleName}.entity.${className};
|
import ${package}.${moduleName}.entity.${className};
|
||||||
import ${package}.${moduleName}.service.${className}Service;
|
import ${package}.${moduleName}.service.${className}Service;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
@ -70,9 +70,9 @@
|
|||||||
<version>${swagger.fox.version}</version>
|
<version>${swagger.fox.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.pig4cloud</groupId>
|
<groupId>io.springfox</groupId>
|
||||||
<artifactId>pig-common-swagger</artifactId>
|
<artifactId>springfox-swagger2</artifactId>
|
||||||
<version>2.7.0</version>
|
<version>${swagger.fox.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2018-2025, lengleng All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* Neither the name of the pig4cloud.com developer nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived from
|
||||||
|
* this software without specific prior written permission.
|
||||||
|
* Author: lengleng (wangiegie@gmail.com)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.pig4cloud.pig.admin.api.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lengleng
|
||||||
|
* @date 2020/2/10
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "前端角色展示对象")
|
||||||
|
public class RoleVo {
|
||||||
|
/**
|
||||||
|
* 角色id
|
||||||
|
*/
|
||||||
|
private Integer roleId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单列表
|
||||||
|
*/
|
||||||
|
private String menuIds;
|
||||||
|
}
|
@ -21,6 +21,7 @@ import com.pig4cloud.pig.admin.api.entity.SysDept;
|
|||||||
import com.pig4cloud.pig.admin.service.SysDeptService;
|
import com.pig4cloud.pig.admin.service.SysDeptService;
|
||||||
import com.pig4cloud.pig.common.core.util.R;
|
import com.pig4cloud.pig.common.core.util.R;
|
||||||
import com.pig4cloud.pig.common.log.annotation.SysLog;
|
import com.pig4cloud.pig.common.log.annotation.SysLog;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@ -39,6 +40,7 @@ import java.time.LocalDateTime;
|
|||||||
@RestController
|
@RestController
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RequestMapping("/dept")
|
@RequestMapping("/dept")
|
||||||
|
@Api(value = "dept", tags = "部门管理模块")
|
||||||
public class DeptController {
|
public class DeptController {
|
||||||
private final SysDeptService sysDeptService;
|
private final SysDeptService sysDeptService;
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ import com.pig4cloud.pig.admin.api.entity.SysLog;
|
|||||||
import com.pig4cloud.pig.admin.service.SysLogService;
|
import com.pig4cloud.pig.admin.service.SysLogService;
|
||||||
import com.pig4cloud.pig.common.core.util.R;
|
import com.pig4cloud.pig.common.core.util.R;
|
||||||
import com.pig4cloud.pig.common.security.annotation.Inner;
|
import com.pig4cloud.pig.common.security.annotation.Inner;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@ -40,6 +41,7 @@ import javax.validation.Valid;
|
|||||||
@RestController
|
@RestController
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RequestMapping("/log")
|
@RequestMapping("/log")
|
||||||
|
@Api(value = "log", tags = "日志管理模块")
|
||||||
public class LogController {
|
public class LogController {
|
||||||
private final SysLogService sysLogService;
|
private final SysLogService sysLogService;
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ import com.pig4cloud.pig.admin.api.entity.SysOauthClientDetails;
|
|||||||
import com.pig4cloud.pig.admin.service.SysOauthClientDetailsService;
|
import com.pig4cloud.pig.admin.service.SysOauthClientDetailsService;
|
||||||
import com.pig4cloud.pig.common.core.util.R;
|
import com.pig4cloud.pig.common.core.util.R;
|
||||||
import com.pig4cloud.pig.common.log.annotation.SysLog;
|
import com.pig4cloud.pig.common.log.annotation.SysLog;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@ -41,6 +42,7 @@ import javax.validation.Valid;
|
|||||||
@RestController
|
@RestController
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RequestMapping("/client")
|
@RequestMapping("/client")
|
||||||
|
@Api(value = "client", tags = "客户端管理模块")
|
||||||
public class OauthClientDetailsController {
|
public class OauthClientDetailsController {
|
||||||
private final SysOauthClientDetailsService sysOauthClientDetailsService;
|
private final SysOauthClientDetailsService sysOauthClientDetailsService;
|
||||||
|
|
||||||
|
@ -21,10 +21,12 @@ package com.pig4cloud.pig.admin.controller;
|
|||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.pig4cloud.pig.admin.api.entity.SysRole;
|
import com.pig4cloud.pig.admin.api.entity.SysRole;
|
||||||
|
import com.pig4cloud.pig.admin.api.vo.RoleVo;
|
||||||
import com.pig4cloud.pig.admin.service.SysRoleMenuService;
|
import com.pig4cloud.pig.admin.service.SysRoleMenuService;
|
||||||
import com.pig4cloud.pig.admin.service.SysRoleService;
|
import com.pig4cloud.pig.admin.service.SysRoleService;
|
||||||
import com.pig4cloud.pig.common.core.util.R;
|
import com.pig4cloud.pig.common.core.util.R;
|
||||||
import com.pig4cloud.pig.common.log.annotation.SysLog;
|
import com.pig4cloud.pig.common.log.annotation.SysLog;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@ -38,6 +40,7 @@ import javax.validation.Valid;
|
|||||||
@RestController
|
@RestController
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RequestMapping("/role")
|
@RequestMapping("/role")
|
||||||
|
@Api(value = "role", tags = "角色管理模块")
|
||||||
public class RoleController {
|
public class RoleController {
|
||||||
private final SysRoleService sysRoleService;
|
private final SysRoleService sysRoleService;
|
||||||
private final SysRoleMenuService sysRoleMenuService;
|
private final SysRoleMenuService sysRoleMenuService;
|
||||||
@ -116,15 +119,15 @@ public class RoleController {
|
|||||||
/**
|
/**
|
||||||
* 更新角色菜单
|
* 更新角色菜单
|
||||||
*
|
*
|
||||||
* @param roleId 角色ID
|
* @param roleVo 角色对象
|
||||||
* @param menuIds 菜单ID拼成的字符串,每个id之间根据逗号分隔
|
|
||||||
* @return success、false
|
* @return success、false
|
||||||
*/
|
*/
|
||||||
@SysLog("更新角色菜单")
|
@SysLog("更新角色菜单")
|
||||||
@PutMapping("/menu")
|
@PutMapping("/menu")
|
||||||
@PreAuthorize("@pms.hasPermission('sys_role_perm')")
|
@PreAuthorize("@pms.hasPermission('sys_role_perm')")
|
||||||
public R saveRoleMenus(Integer roleId, @RequestParam(value = "menuIds", required = false) String menuIds) {
|
public R saveRoleMenus(@RequestBody RoleVo roleVo) {
|
||||||
SysRole sysRole = sysRoleService.getById(roleId);
|
SysRole sysRole = sysRoleService.getById(roleVo.getRoleId());
|
||||||
return R.ok(sysRoleMenuService.saveRoleMenus(sysRole.getRoleCode(), roleId, menuIds));
|
return R.ok(sysRoleMenuService.saveRoleMenus(sysRole.getRoleCode()
|
||||||
|
, roleVo.getRoleId(), roleVo.getMenuIds()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@ package com.pig4cloud.pig.admin.controller;
|
|||||||
import com.pig4cloud.pig.admin.api.feign.RemoteTokenService;
|
import com.pig4cloud.pig.admin.api.feign.RemoteTokenService;
|
||||||
import com.pig4cloud.pig.common.core.constant.SecurityConstants;
|
import com.pig4cloud.pig.common.core.constant.SecurityConstants;
|
||||||
import com.pig4cloud.pig.common.core.util.R;
|
import com.pig4cloud.pig.common.core.util.R;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@ -35,6 +36,7 @@ import java.util.Map;
|
|||||||
@RestController
|
@RestController
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RequestMapping("/token")
|
@RequestMapping("/token")
|
||||||
|
@Api(value = "token", tags = "令牌管理模块")
|
||||||
public class TokenController {
|
public class TokenController {
|
||||||
private final RemoteTokenService remoteTokenService;
|
private final RemoteTokenService remoteTokenService;
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ import com.pig4cloud.pig.common.core.util.R;
|
|||||||
import com.pig4cloud.pig.common.log.annotation.SysLog;
|
import com.pig4cloud.pig.common.log.annotation.SysLog;
|
||||||
import com.pig4cloud.pig.common.security.annotation.Inner;
|
import com.pig4cloud.pig.common.security.annotation.Inner;
|
||||||
import com.pig4cloud.pig.common.security.util.SecurityUtils;
|
import com.pig4cloud.pig.common.security.util.SecurityUtils;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@ -41,6 +42,7 @@ import javax.validation.Valid;
|
|||||||
@RestController
|
@RestController
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RequestMapping("/user")
|
@RequestMapping("/user")
|
||||||
|
@Api(value = "user", tags = "用户管理模块")
|
||||||
public class UserController {
|
public class UserController {
|
||||||
private final SysUserService userService;
|
private final SysUserService userService;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user