fix(): 修改项目编码规范
parent
d03437431a
commit
2d87ebddd8
|
@ -8,6 +8,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
@ -26,8 +27,8 @@ public class SysFileController {
|
||||||
/**
|
/**
|
||||||
* 文件上传请求
|
* 文件上传请求
|
||||||
*/
|
*/
|
||||||
@PostMapping("upload")
|
@PostMapping("/upload")
|
||||||
public Result<SysFile> upload (MultipartFile file) {
|
public Result<SysFile> upload (@RequestPart(value = "file") MultipartFile file) {
|
||||||
try {
|
try {
|
||||||
// 上传并返回访问地址
|
// 上传并返回访问地址
|
||||||
String url = sysFileService.uploadFile(file);
|
String url = sysFileService.uploadFile(file);
|
||||||
|
|
|
@ -52,7 +52,7 @@ public class GenController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("tool:gen:query")
|
@RequiresPermissions("tool:gen:query")
|
||||||
@GetMapping(value = "/{tableId}")
|
@GetMapping(value = "/{tableId}")
|
||||||
public Result getInfo (@PathVariable Long tableId) {
|
public Result getInfo (@PathVariable("tableId") Long tableId) {
|
||||||
GenTable table = genTableService.selectGenTableById(tableId);
|
GenTable table = genTableService.selectGenTableById(tableId);
|
||||||
List<GenTable> tables = genTableService.selectGenTableAll();
|
List<GenTable> tables = genTableService.selectGenTableAll();
|
||||||
List<GenTableColumn> list = genTableColumnService.selectGenTableColumnListByTableId(tableId);
|
List<GenTableColumn> list = genTableColumnService.selectGenTableColumnListByTableId(tableId);
|
||||||
|
@ -120,7 +120,7 @@ public class GenController extends BaseController {
|
||||||
@RequiresPermissions("tool:gen:remove")
|
@RequiresPermissions("tool:gen:remove")
|
||||||
@Log(title = "代码生成", businessType = BusinessType.DELETE)
|
@Log(title = "代码生成", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{tableIds}")
|
@DeleteMapping("/{tableIds}")
|
||||||
public Result remove (@PathVariable Long[] tableIds) {
|
public Result remove (@PathVariable("tableIds") Long[] tableIds) {
|
||||||
genTableService.deleteGenTableByIds(tableIds);
|
genTableService.deleteGenTableByIds(tableIds);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,7 +109,7 @@ public class ${ClassName}Controller extends BaseController
|
||||||
@RequiresPermissions("${permissionPrefix}:remove")
|
@RequiresPermissions("${permissionPrefix}:remove")
|
||||||
@Log(title = "${functionName}", businessType = BusinessType.DELETE)
|
@Log(title = "${functionName}", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{${pkColumn.javaField}s}")
|
@DeleteMapping("/{${pkColumn.javaField}s}")
|
||||||
public Result remove(@PathVariable ${pkColumn.javaType}[] ${pkColumn.javaField}s)
|
public Result remove(@PathVariable("${pkColumn.javaField}s") ${pkColumn.javaType}[] ${pkColumn.javaField}s)
|
||||||
{
|
{
|
||||||
return toAjax(${className}Service.delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaField}s));
|
return toAjax(${className}Service.delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaField}s));
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,7 +142,7 @@ public class SysJobController extends BaseController {
|
||||||
@RequiresPermissions("monitor:job:remove")
|
@RequiresPermissions("monitor:job:remove")
|
||||||
@Log(title = "定时任务", businessType = BusinessType.DELETE)
|
@Log(title = "定时任务", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{jobIds}")
|
@DeleteMapping("/{jobIds}")
|
||||||
public Result remove (@PathVariable Long[] jobIds) throws SchedulerException, TaskException {
|
public Result remove (@PathVariable("jobIds") Long[] jobIds) throws SchedulerException, TaskException {
|
||||||
jobService.deleteJobByIds(jobIds);
|
jobService.deleteJobByIds(jobIds);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class SysJobLogController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("monitor:job:query")
|
@RequiresPermissions("monitor:job:query")
|
||||||
@GetMapping(value = "/{jobLogId}")
|
@GetMapping(value = "/{jobLogId}")
|
||||||
public Result getInfo (@PathVariable Long jobLogId) {
|
public Result getInfo (@PathVariable("jobLogId") Long jobLogId) {
|
||||||
return success(jobLogService.selectJobLogById(jobLogId));
|
return success(jobLogService.selectJobLogById(jobLogId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ public class SysJobLogController extends BaseController {
|
||||||
@RequiresPermissions("monitor:job:remove")
|
@RequiresPermissions("monitor:job:remove")
|
||||||
@Log(title = "定时任务调度日志", businessType = BusinessType.DELETE)
|
@Log(title = "定时任务调度日志", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{jobLogIds}")
|
@DeleteMapping("/{jobLogIds}")
|
||||||
public Result remove (@PathVariable Long[] jobLogIds) {
|
public Result remove (@PathVariable("jobLogIds") Long[] jobLogIds) {
|
||||||
return toAjax(jobLogService.deleteJobLogByIds(jobLogIds));
|
return toAjax(jobLogService.deleteJobLogByIds(jobLogIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ import java.util.List;
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/config")
|
@RequestMapping("/config")
|
||||||
public class SysConfigController extends BaseController {
|
public class SysConfigController extends BaseController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysConfigService configService;
|
private SysConfigService configService;
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ public class SysConfigController extends BaseController {
|
||||||
* 根据参数编号获取详细信息
|
* 根据参数编号获取详细信息
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/{configId}")
|
@GetMapping(value = "/{configId}")
|
||||||
public Result getInfo (@PathVariable Long configId) {
|
public Result getInfo (@PathVariable("configId") Long configId) {
|
||||||
return success(configService.getById(configId));
|
return success(configService.getById(configId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class SysConfigController extends BaseController {
|
||||||
* 根据参数键名查询参数值
|
* 根据参数键名查询参数值
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/configKey/{configKey}")
|
@GetMapping(value = "/configKey/{configKey}")
|
||||||
public Result getConfigKey (@PathVariable String configKey) {
|
public Result<String> getConfigKey (@PathVariable("configKey") String configKey) {
|
||||||
return success(configService.selectConfigByKey(configKey));
|
return success(configService.selectConfigByKey(configKey));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ public class SysConfigController extends BaseController {
|
||||||
@RequiresPermissions("system:config:remove")
|
@RequiresPermissions("system:config:remove")
|
||||||
@Log(title = "参数管理", businessType = BusinessType.DELETE)
|
@Log(title = "参数管理", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{configIds}")
|
@DeleteMapping("/{configIds}")
|
||||||
public Result remove (@PathVariable Long[] configIds) {
|
public Result remove (@PathVariable("configIds") Long[] configIds) {
|
||||||
configService.removeBatchByIds(Arrays.asList(configIds));
|
configService.removeBatchByIds(Arrays.asList(configIds));
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class SysDeptController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("system:dept:query")
|
@RequiresPermissions("system:dept:query")
|
||||||
@GetMapping(value = "/{deptId}")
|
@GetMapping(value = "/{deptId}")
|
||||||
public Result getInfo (@PathVariable Long deptId) {
|
public Result getInfo (@PathVariable("deptId") Long deptId) {
|
||||||
deptService.checkDeptDataScope(deptId);
|
deptService.checkDeptDataScope(deptId);
|
||||||
return success(deptService.selectDeptById(deptId));
|
return success(deptService.selectDeptById(deptId));
|
||||||
}
|
}
|
||||||
|
@ -100,7 +100,7 @@ public class SysDeptController extends BaseController {
|
||||||
@RequiresPermissions("system:dept:remove")
|
@RequiresPermissions("system:dept:remove")
|
||||||
@Log(title = "部门管理", businessType = BusinessType.DELETE)
|
@Log(title = "部门管理", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{deptId}")
|
@DeleteMapping("/{deptId}")
|
||||||
public Result remove (@PathVariable Long deptId) {
|
public Result remove (@PathVariable("deptId") Long deptId) {
|
||||||
if (deptService.hasChildByDeptId(deptId)) {
|
if (deptService.hasChildByDeptId(deptId)) {
|
||||||
return warn("存在下级部门,不允许删除");
|
return warn("存在下级部门,不允许删除");
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ public class SysDictDataController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("system:dict:query")
|
@RequiresPermissions("system:dict:query")
|
||||||
@GetMapping(value = "/{dictCode}")
|
@GetMapping(value = "/{dictCode}")
|
||||||
public Result getInfo (@PathVariable Long dictCode) {
|
public Result getInfo (@PathVariable("dictCode") Long dictCode) {
|
||||||
return success(dictDataService.selectDictDataById(dictCode));
|
return success(dictDataService.selectDictDataById(dictCode));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ public class SysDictDataController extends BaseController {
|
||||||
* 根据字典类型查询字典数据信息
|
* 根据字典类型查询字典数据信息
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/type/{dictType}")
|
@GetMapping(value = "/type/{dictType}")
|
||||||
public Result dictType (@PathVariable String dictType) {
|
public Result dictType (@PathVariable("dictType") String dictType) {
|
||||||
List<SysDictData> data = dictTypeService.selectDictDataByType(dictType);
|
List<SysDictData> data = dictTypeService.selectDictDataByType(dictType);
|
||||||
if (StringUtils.isNull(data)) {
|
if (StringUtils.isNull(data)) {
|
||||||
data = new ArrayList<SysDictData>();
|
data = new ArrayList<SysDictData>();
|
||||||
|
@ -100,7 +100,7 @@ public class SysDictDataController extends BaseController {
|
||||||
@RequiresPermissions("system:dict:remove")
|
@RequiresPermissions("system:dict:remove")
|
||||||
@Log(title = "字典类型", businessType = BusinessType.DELETE)
|
@Log(title = "字典类型", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{dictCodes}")
|
@DeleteMapping("/{dictCodes}")
|
||||||
public Result remove (@PathVariable Long[] dictCodes) {
|
public Result remove (@PathVariable("dictCode") Long[] dictCodes) {
|
||||||
dictDataService.deleteDictDataByIds(dictCodes);
|
dictDataService.deleteDictDataByIds(dictCodes);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class SysDictTypeController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("system:dict:query")
|
@RequiresPermissions("system:dict:query")
|
||||||
@GetMapping(value = "/{dictId}")
|
@GetMapping(value = "/{dictId}")
|
||||||
public Result getInfo (@PathVariable Long dictId) {
|
public Result getInfo (@PathVariable("dictId") Long dictId) {
|
||||||
return success(dictTypeService.selectDictTypeById(dictId));
|
return success(dictTypeService.selectDictTypeById(dictId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ public class SysDictTypeController extends BaseController {
|
||||||
@RequiresPermissions("system:dict:remove")
|
@RequiresPermissions("system:dict:remove")
|
||||||
@Log(title = "字典类型", businessType = BusinessType.DELETE)
|
@Log(title = "字典类型", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{dictIds}")
|
@DeleteMapping("/{dictIds}")
|
||||||
public Result remove (@PathVariable Long[] dictIds) {
|
public Result remove (@PathVariable("dictIds") Long[] dictIds) {
|
||||||
dictTypeService.deleteDictTypeByIds(dictIds);
|
dictTypeService.deleteDictTypeByIds(dictIds);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ public class SysLogininforController extends BaseController {
|
||||||
@RequiresPermissions("system:logininfor:remove")
|
@RequiresPermissions("system:logininfor:remove")
|
||||||
@Log(title = "登录日志", businessType = BusinessType.DELETE)
|
@Log(title = "登录日志", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{infoIds}")
|
@DeleteMapping("/{infoIds}")
|
||||||
public Result remove (@PathVariable Long[] infoIds) {
|
public Result remove (@PathVariable("infoIds") Long[] infoIds) {
|
||||||
return toAjax(logininforService.deleteLogininforByIds(infoIds));
|
return toAjax(logininforService.deleteLogininforByIds(infoIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class SysMenuController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("system:menu:query")
|
@RequiresPermissions("system:menu:query")
|
||||||
@GetMapping(value = "/{menuId}")
|
@GetMapping(value = "/{menuId}")
|
||||||
public Result getInfo (@PathVariable Long menuId) {
|
public Result getInfo (@PathVariable("menuId") Long menuId) {
|
||||||
return success(menuService.selectMenuById(menuId));
|
return success(menuService.selectMenuById(menuId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ public class SysNoticeController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("system:notice:query")
|
@RequiresPermissions("system:notice:query")
|
||||||
@GetMapping(value = "/{noticeId}")
|
@GetMapping(value = "/{noticeId}")
|
||||||
public Result getInfo (@PathVariable Long noticeId) {
|
public Result getInfo (@PathVariable("noticeId") Long noticeId) {
|
||||||
return success(noticeService.selectNoticeById(noticeId));
|
return success(noticeService.selectNoticeById(noticeId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ public class SysNoticeController extends BaseController {
|
||||||
@RequiresPermissions("system:notice:remove")
|
@RequiresPermissions("system:notice:remove")
|
||||||
@Log(title = "通知公告", businessType = BusinessType.DELETE)
|
@Log(title = "通知公告", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{noticeIds}")
|
@DeleteMapping("/{noticeIds}")
|
||||||
public Result remove (@PathVariable Long[] noticeIds) {
|
public Result remove (@PathVariable("noticeIds") Long[] noticeIds) {
|
||||||
return toAjax(noticeService.deleteNoticeByIds(noticeIds));
|
return toAjax(noticeService.deleteNoticeByIds(noticeIds));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class SysOperlogController extends BaseController {
|
||||||
@Log(title = "操作日志", businessType = BusinessType.DELETE)
|
@Log(title = "操作日志", businessType = BusinessType.DELETE)
|
||||||
@RequiresPermissions("system:operlog:remove")
|
@RequiresPermissions("system:operlog:remove")
|
||||||
@DeleteMapping("/{operIds}")
|
@DeleteMapping("/{operIds}")
|
||||||
public Result remove (@PathVariable Long[] operIds) {
|
public Result remove (@PathVariable("operIds") Long[] operIds) {
|
||||||
return toAjax(operLogService.deleteOperLogByIds(operIds));
|
return toAjax(operLogService.deleteOperLogByIds(operIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class SysPostController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("system:post:query")
|
@RequiresPermissions("system:post:query")
|
||||||
@GetMapping(value = "/{postId}")
|
@GetMapping(value = "/{postId}")
|
||||||
public Result getInfo (@PathVariable Long postId) {
|
public Result getInfo (@PathVariable("postId") Long postId) {
|
||||||
return success(postService.selectPostById(postId));
|
return success(postService.selectPostById(postId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ public class SysPostController extends BaseController {
|
||||||
@RequiresPermissions("system:post:remove")
|
@RequiresPermissions("system:post:remove")
|
||||||
@Log(title = "岗位管理", businessType = BusinessType.DELETE)
|
@Log(title = "岗位管理", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{postIds}")
|
@DeleteMapping("/{postIds}")
|
||||||
public Result remove (@PathVariable Long[] postIds) {
|
public Result remove (@PathVariable("postIds") Long[] postIds) {
|
||||||
return toAjax(postService.deletePostByIds(postIds));
|
return toAjax(postService.deletePostByIds(postIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ public class SysRoleController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("system:role:query")
|
@RequiresPermissions("system:role:query")
|
||||||
@GetMapping(value = "/{roleId}")
|
@GetMapping(value = "/{roleId}")
|
||||||
public Result getInfo (@PathVariable Long roleId) {
|
public Result getInfo (@PathVariable("roleId") Long roleId) {
|
||||||
roleService.checkRoleDataScope(roleId);
|
roleService.checkRoleDataScope(roleId);
|
||||||
return success(roleService.selectRoleById(roleId));
|
return success(roleService.selectRoleById(roleId));
|
||||||
}
|
}
|
||||||
|
@ -133,7 +133,7 @@ public class SysRoleController extends BaseController {
|
||||||
@RequiresPermissions("system:role:remove")
|
@RequiresPermissions("system:role:remove")
|
||||||
@Log(title = "角色管理", businessType = BusinessType.DELETE)
|
@Log(title = "角色管理", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{roleIds}")
|
@DeleteMapping("/{roleIds}")
|
||||||
public Result remove (@PathVariable Long[] roleIds) {
|
public Result remove (@PathVariable("roleIds") Long[] roleIds) {
|
||||||
return toAjax(roleService.deleteRoleByIds(roleIds));
|
return toAjax(roleService.deleteRoleByIds(roleIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -220,7 +220,7 @@ public class SysUserController extends BaseController {
|
||||||
@RequiresPermissions("system:user:remove")
|
@RequiresPermissions("system:user:remove")
|
||||||
@Log(title = "用户管理", businessType = BusinessType.DELETE)
|
@Log(title = "用户管理", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{userIds}")
|
@DeleteMapping("/{userIds}")
|
||||||
public Result remove (@PathVariable Long[] userIds) {
|
public Result remove (@PathVariable("userIds") Long[] userIds) {
|
||||||
if (ArrayUtils.contains(userIds, SecurityUtils.getUserId())) {
|
if (ArrayUtils.contains(userIds, SecurityUtils.getUserId())) {
|
||||||
return error("当前用户不能删除");
|
return error("当前用户不能删除");
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ public class SysUserOnlineController extends BaseController {
|
||||||
@RequiresPermissions("monitor:online:forceLogout")
|
@RequiresPermissions("monitor:online:forceLogout")
|
||||||
@Log(title = "在线用户", businessType = BusinessType.FORCE)
|
@Log(title = "在线用户", businessType = BusinessType.FORCE)
|
||||||
@DeleteMapping("/{tokenId}")
|
@DeleteMapping("/{tokenId}")
|
||||||
public Result forceLogout (@PathVariable String tokenId) {
|
public Result forceLogout (@PathVariable("tokenId") String tokenId) {
|
||||||
redisService.deleteObject(CacheConstants.LOGIN_TOKEN_KEY + tokenId);
|
redisService.deleteObject(CacheConstants.LOGIN_TOKEN_KEY + tokenId);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue