org_controller.go 693 字节
package web_client

import (
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/orgs/query"
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/orgs/service"
)

type OrgController struct {
	baseController
}

func (controller *OrgController) DepartmentUsers() {
	orgService := service.OrgsService{}
	departmentsUsersQuery := &query.DepartmentsUsersQuery{}
	err := controller.Unmarshal(departmentsUsersQuery)
	if err != nil {
		controller.Response(nil, err)
		return
	}
	departmentsUsersQuery.Operator = controller.GetOperator()
	data, err := orgService.DepartmentsUsers(departmentsUsersQuery)
	controller.Response(data, err)
}