diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java index 39158678f..04a21a7b4 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java @@ -16,28 +16,6 @@ public class BaseController { protected final Logger logger = LoggerFactory.getLogger(this.getClass()); - /** - * 响应返回结果 - * - * @param rows 影响行数 - * @return 操作结果 - */ - protected AjaxResult toAjax(int rows) - { - return rows > 0 ? AjaxResult.success() : AjaxResult.error(); - } - - /** - * 响应返回结果 - * - * @param result 结果 - * @return 操作结果 - */ - protected AjaxResult toAjax(boolean result) - { - return result ? success() : error(); - } - /** * 返回成功 */ @@ -70,6 +48,28 @@ public class BaseController return AjaxResult.error(message); } + /** + * 响应返回结果 + * + * @param rows 影响行数 + * @return 操作结果 + */ + protected AjaxResult toAjax(int rows) + { + return rows > 0 ? AjaxResult.success() : AjaxResult.error(); + } + + /** + * 响应返回结果 + * + * @param result 结果 + * @return 操作结果 + */ + protected AjaxResult toAjax(boolean result) + { + return result ? success() : error(); + } + /** * 页面跳转 */ diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/ServletUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/ServletUtils.java index beaa26c6e..f611834d3 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/ServletUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/ServletUtils.java @@ -48,12 +48,26 @@ public class ServletUtils extends ServletUtil { return Convert.toInt(getRequest().getParameter(name), defaultValue); } - /** - * 获取request - */ - public static HttpServletRequest getRequest() { - return getRequestAttributes().getRequest(); - } + /** + * 获取Boolean参数 + */ + public static Boolean getParameterToBool(String name) { + return Convert.toBool(getRequest().getParameter(name)); + } + + /** + * 获取Boolean参数 + */ + public static Boolean getParameterToBool(String name, Boolean defaultValue) { + return Convert.toBool(getRequest().getParameter(name), defaultValue); + } + + /** + * 获取request + */ + public static HttpServletRequest getRequest() { + return getRequestAttributes().getRequest(); + } /** * 获取response diff --git a/ruoyi-ui/src/api/login.js b/ruoyi-ui/src/api/login.js index a10fbe6b0..abd49c7de 100644 --- a/ruoyi-ui/src/api/login.js +++ b/ruoyi-ui/src/api/login.js @@ -48,6 +48,6 @@ export function getCodeImg() { return request({ url: '/captchaImage', method: 'get', - timeout: 20000 + timeout: 20000 }) } \ No newline at end of file diff --git a/ruoyi-ui/src/views/monitor/job/index.vue b/ruoyi-ui/src/views/monitor/job/index.vue index 625680455..f73cfc8e0 100644 --- a/ruoyi-ui/src/views/monitor/job/index.vue +++ b/ruoyi-ui/src/views/monitor/job/index.vue @@ -320,6 +320,7 @@ export default { queryParams: { pageNum: 1, pageSize: 10, + reasonable: true, jobName: undefined, jobGroup: undefined, status: undefined diff --git a/ruoyi-ui/src/views/monitor/job/log.vue b/ruoyi-ui/src/views/monitor/job/log.vue index 7e4dffe50..561924b79 100644 --- a/ruoyi-ui/src/views/monitor/job/log.vue +++ b/ruoyi-ui/src/views/monitor/job/log.vue @@ -220,6 +220,7 @@ export default { queryParams: { pageNum: 1, pageSize: 10, + reasonable: true, jobName: undefined, jobGroup: undefined, status: undefined diff --git a/ruoyi-ui/src/views/monitor/logininfor/index.vue b/ruoyi-ui/src/views/monitor/logininfor/index.vue index 778492ba4..bba455316 100644 --- a/ruoyi-ui/src/views/monitor/logininfor/index.vue +++ b/ruoyi-ui/src/views/monitor/logininfor/index.vue @@ -153,6 +153,7 @@ export default { queryParams: { pageNum: 1, pageSize: 10, + reasonable: true, ipaddr: undefined, userName: undefined, status: undefined diff --git a/ruoyi-ui/src/views/system/config/index.vue b/ruoyi-ui/src/views/system/config/index.vue index 04384bb75..2c69ee484 100644 --- a/ruoyi-ui/src/views/system/config/index.vue +++ b/ruoyi-ui/src/views/system/config/index.vue @@ -219,6 +219,7 @@ export default { queryParams: { pageNum: 1, pageSize: 10, + reasonable: true, configName: undefined, configKey: undefined, configType: undefined diff --git a/ruoyi-ui/src/views/system/dict/data.vue b/ruoyi-ui/src/views/system/dict/data.vue index 3b8ec4b76..1aa61cc59 100644 --- a/ruoyi-ui/src/views/system/dict/data.vue +++ b/ruoyi-ui/src/views/system/dict/data.vue @@ -247,6 +247,7 @@ export default { queryParams: { pageNum: 1, pageSize: 10, + reasonable: true, dictName: undefined, dictType: undefined, status: undefined diff --git a/ruoyi-ui/src/views/system/dict/index.vue b/ruoyi-ui/src/views/system/dict/index.vue index b4ac1da04..02eabfb44 100644 --- a/ruoyi-ui/src/views/system/dict/index.vue +++ b/ruoyi-ui/src/views/system/dict/index.vue @@ -227,6 +227,7 @@ export default { queryParams: { pageNum: 1, pageSize: 10, + reasonable: true, dictName: undefined, dictType: undefined, status: undefined diff --git a/ruoyi-ui/src/views/system/notice/index.vue b/ruoyi-ui/src/views/system/notice/index.vue index b90168c49..f2ae9bbd3 100644 --- a/ruoyi-ui/src/views/system/notice/index.vue +++ b/ruoyi-ui/src/views/system/notice/index.vue @@ -204,6 +204,7 @@ export default { queryParams: { pageNum: 1, pageSize: 10, + reasonable: true, noticeTitle: undefined, createBy: undefined, status: undefined diff --git a/ruoyi-ui/src/views/system/post/index.vue b/ruoyi-ui/src/views/system/post/index.vue index 735d616a5..7a68efa2a 100644 --- a/ruoyi-ui/src/views/system/post/index.vue +++ b/ruoyi-ui/src/views/system/post/index.vue @@ -192,6 +192,7 @@ export default { queryParams: { pageNum: 1, pageSize: 10, + reasonable: true, postCode: undefined, postName: undefined, status: undefined diff --git a/ruoyi-ui/src/views/system/role/authUser.vue b/ruoyi-ui/src/views/system/role/authUser.vue index a65ccbf6e..51edd3322 100644 --- a/ruoyi-ui/src/views/system/role/authUser.vue +++ b/ruoyi-ui/src/views/system/role/authUser.vue @@ -128,6 +128,7 @@ export default { queryParams: { pageNum: 1, pageSize: 10, + reasonable: true, roleId: undefined, userName: undefined, phonenumber: undefined diff --git a/ruoyi-ui/src/views/system/role/index.vue b/ruoyi-ui/src/views/system/role/index.vue index 59880bdc4..a479069c9 100644 --- a/ruoyi-ui/src/views/system/role/index.vue +++ b/ruoyi-ui/src/views/system/role/index.vue @@ -328,6 +328,7 @@ export default { queryParams: { pageNum: 1, pageSize: 10, + reasonable: true, roleName: undefined, roleKey: undefined, status: undefined diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue index d06d50040..22eaa4b9e 100644 --- a/ruoyi-ui/src/views/system/user/index.vue +++ b/ruoyi-ui/src/views/system/user/index.vue @@ -418,6 +418,7 @@ export default { queryParams: { pageNum: 1, pageSize: 10, + reasonable: true, userName: undefined, phonenumber: undefined, status: undefined, diff --git a/ruoyi-ui/src/views/tool/gen/index.vue b/ruoyi-ui/src/views/tool/gen/index.vue index 1b69e21fd..30d9908dd 100644 --- a/ruoyi-ui/src/views/tool/gen/index.vue +++ b/ruoyi-ui/src/views/tool/gen/index.vue @@ -219,6 +219,7 @@ export default { queryParams: { pageNum: 1, pageSize: 10, + reasonable: true, tableName: undefined, tableComment: undefined },