...
|
...
|
@@ -11,6 +11,15 @@ type UsersController struct { |
|
|
beego.BaseController
|
|
|
}
|
|
|
|
|
|
func (controller *UsersController) returnPageListData(count int64, data interface{}, err error, pageNumber int) {
|
|
|
dataMap := map[string]interface{}{
|
|
|
"totalRow": count,
|
|
|
"pageNumber": pageNumber,
|
|
|
"list": data,
|
|
|
}
|
|
|
controller.Response(dataMap, err)
|
|
|
}
|
|
|
|
|
|
func (controller *UsersController) CompanyUserAdd() {
|
|
|
usersService := service.NewUsersService(nil)
|
|
|
companyUserAddCommand := &command.CompanyUserAddCommand{}
|
...
|
...
|
@@ -30,9 +39,9 @@ func (controller *UsersController) CompanyUserUpdate() { |
|
|
func (controller *UsersController) CompanyUserList() {
|
|
|
usersService := service.NewUsersService(nil)
|
|
|
companyUserListQuery := &query.CompanyUserListQuery{}
|
|
|
controller.Unmarshal(companyUserListQuery)
|
|
|
cnt, data, err := usersService.CompanyUserList(companyUserListQuery)
|
|
|
_ = cnt
|
|
|
controller.Response(data, err)
|
|
|
controller.returnPageListData(cnt, data, err, companyUserListQuery.PageNumber)
|
|
|
}
|
|
|
|
|
|
func (controller *UsersController) CompanyUserGet() {
|
...
|
...
|
@@ -79,9 +88,9 @@ func (controller *UsersController) CooperationUserUpdate() { |
|
|
func (controller *UsersController) CooperationUserList() {
|
|
|
usersService := service.NewUsersService(nil)
|
|
|
cooperationUserListQuery := &query.CooperationUserListQuery{}
|
|
|
controller.Unmarshal(cooperationUserListQuery)
|
|
|
cnt, data, err := usersService.CooperationUserList(cooperationUserListQuery)
|
|
|
_ = cnt
|
|
|
controller.Response(data, err)
|
|
|
controller.returnPageListData(cnt, data, err, cooperationUserListQuery.PageNumber)
|
|
|
}
|
|
|
|
|
|
func (controller *UsersController) CooperationUserGet() {
|
...
|
...
|
|