|
@@ -31,22 +31,23 @@ class RoleController : BaseController() {
|
|
|
@GetMapping("list")
|
|
|
@ZenResponseFilter(type = SysRole::class, filter = ["createBy", "createTime", "updateBy", "updateTime"])
|
|
|
fun list(@RequestParam(required = false) keyword: String?,
|
|
|
- @RequestParam(required = false) searchOption: Int?): ResponseEntity<*> {
|
|
|
+ @RequestParam(required = false) searchOption: Int?,
|
|
|
+ @RequestParam(required = false) enable: Boolean?): ResponseEntity<*> {
|
|
|
var result: Any? = null
|
|
|
if (!keyword.isNullOrEmpty() && searchOption != null) {
|
|
|
when (searchOption) {
|
|
|
1 -> {
|
|
|
result = if (PaginationUtil.paginable(getRequest())) {
|
|
|
- roleService.getListByParamPage(keyword, null, null, PaginationUtil.getCurrent(getRequest())!!, PaginationUtil.getPageSize(getRequest())!!)
|
|
|
+ roleService.getListByParamPage(keyword, null, enable, PaginationUtil.getCurrent(getRequest())!!, PaginationUtil.getPageSize(getRequest())!!)
|
|
|
} else {
|
|
|
- roleService.getListByParam(keyword, null, null)
|
|
|
+ roleService.getListByParam(keyword, null, enable)
|
|
|
}
|
|
|
}
|
|
|
2 -> {
|
|
|
result = if (PaginationUtil.paginable(getRequest())) {
|
|
|
- roleService.getListByParamPage(null, keyword, null, PaginationUtil.getCurrent(getRequest())!!, PaginationUtil.getPageSize(getRequest())!!)
|
|
|
+ roleService.getListByParamPage(null, keyword, enable, PaginationUtil.getCurrent(getRequest())!!, PaginationUtil.getPageSize(getRequest())!!)
|
|
|
} else {
|
|
|
- roleService.getListByParam(null, keyword, null)
|
|
|
+ roleService.getListByParam(null, keyword, enable)
|
|
|
}
|
|
|
}
|
|
|
else -> {
|
|
@@ -56,11 +57,10 @@ class RoleController : BaseController() {
|
|
|
}
|
|
|
} else {
|
|
|
result = if (PaginationUtil.paginable(getRequest())) {
|
|
|
- roleService.getListByParamPage(null, null, null, PaginationUtil.getCurrent(getRequest())!!, PaginationUtil.getPageSize(getRequest())!!)
|
|
|
+ roleService.getListByParamPage(null, null, enable, PaginationUtil.getCurrent(getRequest())!!, PaginationUtil.getPageSize(getRequest())!!)
|
|
|
} else {
|
|
|
- roleService.getListByParam(null, null, null)
|
|
|
+ roleService.getListByParam(null, null, enable)
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
return ResponseEntity.ok(ResponseDto().apply { data = result })
|
|
|
}
|