0.6.2增加api方法描述
This commit is contained in:
@@ -21,8 +21,8 @@ allprojects {
|
|||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
ext {
|
ext {
|
||||||
version '0.6.1'
|
version '0.6.2'
|
||||||
gaea_version = '0.9.0'
|
gaea_version = '0.9.1'
|
||||||
spring_version = "2.3.0.RELEASE"
|
spring_version = "2.3.0.RELEASE"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.synebula.zeus.app.controller
|
package com.synebula.zeus.app.controller
|
||||||
|
|
||||||
import com.synebula.gaea.app.IApplication
|
import com.synebula.gaea.app.IApplication
|
||||||
|
import com.synebula.gaea.app.component.aop.annotation.MethodName
|
||||||
import com.synebula.gaea.app.component.security.TokenManager
|
import com.synebula.gaea.app.component.security.TokenManager
|
||||||
import com.synebula.gaea.app.struct.HttpMessage
|
import com.synebula.gaea.app.struct.HttpMessage
|
||||||
import com.synebula.gaea.data.message.Status
|
import com.synebula.gaea.data.message.Status
|
||||||
@@ -37,6 +38,7 @@ class SignInOutApp(override var logger: ILogger?) : IApplication {
|
|||||||
|
|
||||||
override var name: String = "用户登录管理"
|
override var name: String = "用户登录管理"
|
||||||
|
|
||||||
|
@MethodName("用户登录")
|
||||||
@PostMapping("/in")
|
@PostMapping("/in")
|
||||||
fun signIn(name: String, password: String, remember: Boolean?): HttpMessage {
|
fun signIn(name: String, password: String, remember: Boolean?): HttpMessage {
|
||||||
return this.safeExecute("用户登录出现异常") {
|
return this.safeExecute("用户登录出现异常") {
|
||||||
@@ -52,11 +54,13 @@ class SignInOutApp(override var logger: ILogger?) : IApplication {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@MethodName("用户登出")
|
||||||
@PostMapping("/out")
|
@PostMapping("/out")
|
||||||
fun signOut(user: String): HttpMessage {
|
fun signOut(user: String): HttpMessage {
|
||||||
return HttpMessage(user)
|
return HttpMessage(user)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@MethodName("用户注册")
|
||||||
@PostMapping("/up")
|
@PostMapping("/up")
|
||||||
fun signUp(@RequestBody command: UserCmd): HttpMessage {
|
fun signUp(@RequestBody command: UserCmd): HttpMessage {
|
||||||
return this.safeExecute("用户注册出错, 用户信息: ${serializer.serialize(command)}") {
|
return this.safeExecute("用户注册出错, 用户信息: ${serializer.serialize(command)}") {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.synebula.zeus.app.controller.rbac.resource
|
package com.synebula.zeus.app.controller.rbac.resource
|
||||||
|
|
||||||
import com.synebula.gaea.app.Application
|
import com.synebula.gaea.app.Application
|
||||||
|
import com.synebula.gaea.app.component.aop.annotation.MethodName
|
||||||
import com.synebula.gaea.app.struct.HttpMessage
|
import com.synebula.gaea.app.struct.HttpMessage
|
||||||
import com.synebula.gaea.log.ILogger
|
import com.synebula.gaea.log.ILogger
|
||||||
import com.synebula.zeus.domain.service.cmd.rbac.resource.InterfaceCmd
|
import com.synebula.zeus.domain.service.cmd.rbac.resource.InterfaceCmd
|
||||||
@@ -23,6 +24,7 @@ class InterfaceApp(
|
|||||||
service, interfaceQuery, logger
|
service, interfaceQuery, logger
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
@MethodName("获取角色系统下有权接口")
|
||||||
@GetMapping("/in-system/{system}/authorized/{role}")
|
@GetMapping("/in-system/{system}/authorized/{role}")
|
||||||
fun authorized(@PathVariable system: String, @PathVariable role: String): HttpMessage {
|
fun authorized(@PathVariable system: String, @PathVariable role: String): HttpMessage {
|
||||||
return this.safeExecute("获取有权资源列表失败") { msg ->
|
return this.safeExecute("获取有权资源列表失败") { msg ->
|
||||||
@@ -30,6 +32,7 @@ class InterfaceApp(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@MethodName("获取角色全部有权接口")
|
||||||
@GetMapping("/authorized/{role}")
|
@GetMapping("/authorized/{role}")
|
||||||
fun authorized(@PathVariable role: String): HttpMessage {
|
fun authorized(@PathVariable role: String): HttpMessage {
|
||||||
return this.safeExecute("获取有权资源列表失败") { msg ->
|
return this.safeExecute("获取有权资源列表失败") { msg ->
|
||||||
@@ -37,6 +40,7 @@ class InterfaceApp(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@MethodName("验证角色接口权限")
|
||||||
@GetMapping("/{api}/authorize/{role}")
|
@GetMapping("/{api}/authorize/{role}")
|
||||||
fun authorize(@PathVariable api: String, @PathVariable role: String): HttpMessage {
|
fun authorize(@PathVariable api: String, @PathVariable role: String): HttpMessage {
|
||||||
return this.safeExecute("获取权限信息失败") { msg ->
|
return this.safeExecute("获取权限信息失败") { msg ->
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.synebula.zeus.app.controller.rbac.resource
|
package com.synebula.zeus.app.controller.rbac.resource
|
||||||
|
|
||||||
import com.synebula.gaea.app.Application
|
import com.synebula.gaea.app.Application
|
||||||
|
import com.synebula.gaea.app.component.aop.annotation.MethodName
|
||||||
import com.synebula.gaea.app.component.aop.annotation.ModuleName
|
import com.synebula.gaea.app.component.aop.annotation.ModuleName
|
||||||
import com.synebula.gaea.app.struct.HttpMessage
|
import com.synebula.gaea.app.struct.HttpMessage
|
||||||
import com.synebula.gaea.log.ILogger
|
import com.synebula.gaea.log.ILogger
|
||||||
@@ -25,6 +26,7 @@ class PageApp(
|
|||||||
service, pageQuery, logger
|
service, pageQuery, logger
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
@MethodName("获取角色系统下有权页面")
|
||||||
@GetMapping("/in-system/{system}/authorized/{role}")
|
@GetMapping("/in-system/{system}/authorized/{role}")
|
||||||
fun authorized(@PathVariable system: String, @PathVariable role: String): HttpMessage {
|
fun authorized(@PathVariable system: String, @PathVariable role: String): HttpMessage {
|
||||||
val msg = HttpMessage()
|
val msg = HttpMessage()
|
||||||
@@ -32,6 +34,7 @@ class PageApp(
|
|||||||
return msg
|
return msg
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@MethodName("获取角色全部有权页面")
|
||||||
@GetMapping("/authorized/{role}")
|
@GetMapping("/authorized/{role}")
|
||||||
fun authorized(@PathVariable role: String): HttpMessage {
|
fun authorized(@PathVariable role: String): HttpMessage {
|
||||||
return this.safeExecute("获取有权资源列表失败") { msg ->
|
return this.safeExecute("获取有权资源列表失败") { msg ->
|
||||||
@@ -39,6 +42,7 @@ class PageApp(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@MethodName("验证角色页面权限")
|
||||||
@GetMapping("/{page}/authorize/{role}")
|
@GetMapping("/{page}/authorize/{role}")
|
||||||
fun authorize(@PathVariable page: String, @PathVariable role: String): HttpMessage {
|
fun authorize(@PathVariable page: String, @PathVariable role: String): HttpMessage {
|
||||||
return this.safeExecute("获取权限信息失败") { msg ->
|
return this.safeExecute("获取权限信息失败") { msg ->
|
||||||
@@ -46,6 +50,7 @@ class PageApp(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@MethodName("验证角色URL权限")
|
||||||
@GetMapping("/authorize/{role}")
|
@GetMapping("/authorize/{role}")
|
||||||
fun uriAuthorize(@PathVariable role: String, uri: String): HttpMessage {
|
fun uriAuthorize(@PathVariable role: String, uri: String): HttpMessage {
|
||||||
return this.safeExecute("获取权限信息失败") { msg ->
|
return this.safeExecute("获取权限信息失败") { msg ->
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.synebula.zeus.app.controller.rbac.resource
|
package com.synebula.zeus.app.controller.rbac.resource
|
||||||
|
|
||||||
import com.synebula.gaea.app.Application
|
import com.synebula.gaea.app.Application
|
||||||
|
import com.synebula.gaea.app.component.aop.annotation.MethodName
|
||||||
import com.synebula.gaea.app.struct.HttpMessage
|
import com.synebula.gaea.app.struct.HttpMessage
|
||||||
import com.synebula.gaea.log.ILogger
|
import com.synebula.gaea.log.ILogger
|
||||||
import com.synebula.zeus.domain.service.cmd.rbac.resource.SystemCmd
|
import com.synebula.zeus.domain.service.cmd.rbac.resource.SystemCmd
|
||||||
@@ -22,6 +23,7 @@ class SystemApp(
|
|||||||
"系统信息", SystemView::class.java,
|
"系统信息", SystemView::class.java,
|
||||||
service, systemQuery, logger
|
service, systemQuery, logger
|
||||||
) {
|
) {
|
||||||
|
@MethodName("获取角色有权系统")
|
||||||
@GetMapping("/authorized/{role}")
|
@GetMapping("/authorized/{role}")
|
||||||
fun authorized(@PathVariable role: String): HttpMessage {
|
fun authorized(@PathVariable role: String): HttpMessage {
|
||||||
return this.safeExecute("获取有权资源列表失败") { msg ->
|
return this.safeExecute("获取有权资源列表失败") { msg ->
|
||||||
@@ -29,6 +31,7 @@ class SystemApp(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@MethodName("验证角色系统权限")
|
||||||
@GetMapping("/{system}/authorize/{role}")
|
@GetMapping("/{system}/authorize/{role}")
|
||||||
fun authorize(@PathVariable system: String, @PathVariable role: String): HttpMessage {
|
fun authorize(@PathVariable system: String, @PathVariable role: String): HttpMessage {
|
||||||
return this.safeExecute("获取权限信息失败") { msg ->
|
return this.safeExecute("获取权限信息失败") { msg ->
|
||||||
|
|||||||
Reference in New Issue
Block a user