Merge branch 'master' of github.com:synebula-myths/zeus
This commit is contained in:
@@ -0,0 +1,24 @@
|
|||||||
|
package com.synebula.zeus.app.controller.rbac
|
||||||
|
|
||||||
|
import com.synebula.gaea.app.UnionApp
|
||||||
|
import com.synebula.gaea.log.ILogger
|
||||||
|
import com.synebula.gaea.query.IQuery
|
||||||
|
import com.synebula.zeus.domain.service.cmd.rbac.GroupCmd
|
||||||
|
import com.synebula.zeus.domain.service.cmd.rbac.RoleCmd
|
||||||
|
import com.synebula.zeus.domain.service.contr.rbac.IGroupService
|
||||||
|
import com.synebula.zeus.domain.service.contr.rbac.IRoleService
|
||||||
|
import com.synebula.zeus.query.view.GroupView
|
||||||
|
import com.synebula.zeus.query.view.RoleView
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping
|
||||||
|
import org.springframework.web.bind.annotation.RestController
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/groups")
|
||||||
|
class GroupApp(
|
||||||
|
service: IGroupService,
|
||||||
|
query: IQuery,
|
||||||
|
logger: ILogger
|
||||||
|
) : UnionApp<GroupCmd, GroupView, String>(
|
||||||
|
"分组信息", GroupView::class.java,
|
||||||
|
service, query, logger
|
||||||
|
)
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.synebula.zeus.domain.model.rbac
|
||||||
|
|
||||||
|
import com.synebula.gaea.domain.model.AggregateRoot
|
||||||
|
|
||||||
|
class Group(override var id: String?) : AggregateRoot<String>() {
|
||||||
|
var name = ""
|
||||||
|
}
|
||||||
@@ -2,7 +2,6 @@ package com.synebula.zeus.domain.model.rbac
|
|||||||
|
|
||||||
import com.synebula.gaea.domain.model.AggregateRoot
|
import com.synebula.gaea.domain.model.AggregateRoot
|
||||||
|
|
||||||
class Role : AggregateRoot<String>() {
|
class Role(override var id: String?) : AggregateRoot<String>() {
|
||||||
override var id: String? = null
|
|
||||||
var name = ""
|
var name = ""
|
||||||
}
|
}
|
||||||
@@ -8,5 +8,6 @@ class User(override var id: String? = null) : AggregateRoot<String>() {
|
|||||||
var realName: String? = null
|
var realName: String? = null
|
||||||
var phone: String? = null
|
var phone: String? = null
|
||||||
var role: String = ""
|
var role: String = ""
|
||||||
|
var group: String = ""
|
||||||
var token: String? = null
|
var token: String? = null
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package com.synebula.zeus.domain.service.cmd.rbac
|
||||||
|
|
||||||
|
import com.synebula.gaea.domain.service.Command
|
||||||
|
|
||||||
|
class GroupCmd : Command() {
|
||||||
|
var id: String? = null
|
||||||
|
var name = ""
|
||||||
|
}
|
||||||
@@ -9,4 +9,5 @@ class UserCmd : Command() {
|
|||||||
var realName: String? = null
|
var realName: String? = null
|
||||||
var phone: String? = null
|
var phone: String? = null
|
||||||
var role: String? = null
|
var role: String? = null
|
||||||
|
var group: String = ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.synebula.zeus.domain.service.contr.rbac
|
||||||
|
|
||||||
|
import com.synebula.gaea.domain.service.IService
|
||||||
|
|
||||||
|
interface IGroupService : IService<String> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.synebula.zeus.domain.service.impl.rbac
|
||||||
|
|
||||||
|
import com.synebula.gaea.data.IObjectConverter
|
||||||
|
import com.synebula.gaea.domain.repository.IRepository
|
||||||
|
import com.synebula.gaea.domain.service.Service
|
||||||
|
import com.synebula.gaea.log.ILogger
|
||||||
|
import com.synebula.zeus.domain.model.rbac.Group
|
||||||
|
import com.synebula.zeus.domain.service.contr.rbac.IGroupService
|
||||||
|
import com.synebula.zeus.domain.service.contr.rbac.IRoleService
|
||||||
|
|
||||||
|
class GroupService(
|
||||||
|
repository: IRepository,
|
||||||
|
converter: IObjectConverter, logger: ILogger
|
||||||
|
) : Service<Group, String>(Group::class.java, repository, converter, logger), IGroupService
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package com.synebula.zeus.query.view
|
||||||
|
|
||||||
|
class GroupView {
|
||||||
|
var id: String? = null
|
||||||
|
var name = ""
|
||||||
|
}
|
||||||
@@ -16,4 +16,6 @@ class UserView {
|
|||||||
var phone: String? = null
|
var phone: String? = null
|
||||||
|
|
||||||
var role: String? = null
|
var role: String? = null
|
||||||
|
|
||||||
|
var group: String? = null
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user