|
|
package controllers
|
|
|
|
|
|
import (
|
|
|
"github.com/linmadan/egglib-go/web/beego"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/application/contractUndertakerFeedback/command"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/application/contractUndertakerFeedback/query"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/application/contractUndertakerFeedback/service"
|
|
|
)
|
|
|
|
|
|
type ContractUndertakerFeedbackController struct {
|
|
|
beego.BaseController
|
|
|
BaseController
|
|
|
}
|
|
|
|
|
|
func (controller *ContractUndertakerFeedbackController) CreateContractUndertakerFeedback() {
|
...
|
...
|
@@ -32,6 +31,13 @@ func (controller *ContractUndertakerFeedbackController) UpdateContractUndertaker |
|
|
func (controller *ContractUndertakerFeedbackController) GetContractUndertakerFeedback() {
|
|
|
contractUndertakerFeedbackService := service.NewContractUndertakerFeedbackService(nil)
|
|
|
getContractUndertakerFeedbackQuery := &query.GetContractUndertakerFeedbackQuery{}
|
|
|
// 解析头部信息
|
|
|
header := controller.GetRequestHeader(controller.Ctx)
|
|
|
getContractUndertakerFeedbackQuery.CompanyId = header.CompanyId
|
|
|
getContractUndertakerFeedbackQuery.OrgId = header.OrgId
|
|
|
getContractUndertakerFeedbackQuery.UserId = header.UserId
|
|
|
getContractUndertakerFeedbackQuery.UserBaseId = header.UserBaseId
|
|
|
// 解析路径参数
|
|
|
contractUndertakerFeedbackId := controller.GetString(":contractUndertakerFeedbackId")
|
|
|
getContractUndertakerFeedbackQuery.FeedbackId = contractUndertakerFeedbackId
|
|
|
data, err := contractUndertakerFeedbackService.GetContractUndertakerFeedback(getContractUndertakerFeedbackQuery)
|
...
|
...
|
@@ -42,6 +48,13 @@ func (controller *ContractUndertakerFeedbackController) RemoveContractUndertaker |
|
|
contractUndertakerFeedbackService := service.NewContractUndertakerFeedbackService(nil)
|
|
|
removeContractUndertakerFeedbackCommand := &command.RemoveContractUndertakerFeedbackCommand{}
|
|
|
controller.Unmarshal(removeContractUndertakerFeedbackCommand)
|
|
|
// 解析头部信息
|
|
|
header := controller.GetRequestHeader(controller.Ctx)
|
|
|
removeContractUndertakerFeedbackCommand.CompanyId = header.CompanyId
|
|
|
removeContractUndertakerFeedbackCommand.OrgId = header.OrgId
|
|
|
removeContractUndertakerFeedbackCommand.UserId = header.UserId
|
|
|
removeContractUndertakerFeedbackCommand.UserBaseId = header.UserBaseId
|
|
|
// 解析路径参数
|
|
|
contractUndertakerFeedbackId := controller.GetString(":contractUndertakerFeedbackId")
|
|
|
removeContractUndertakerFeedbackCommand.FeedbackId = contractUndertakerFeedbackId
|
|
|
data, err := contractUndertakerFeedbackService.RemoveContractUndertakerFeedback(removeContractUndertakerFeedbackCommand)
|
...
|
...
|
@@ -51,6 +64,17 @@ func (controller *ContractUndertakerFeedbackController) RemoveContractUndertaker |
|
|
func (controller *ContractUndertakerFeedbackController) SearchContractUndertakerFeedback() {
|
|
|
contractUndertakerFeedbackService := service.NewContractUndertakerFeedbackService(nil)
|
|
|
searchContractUndertakerFeedbackQuery := &query.SearchContractUndertakerFeedbackQuery{}
|
|
|
// 解析头部信息
|
|
|
header := controller.GetRequestHeader(controller.Ctx)
|
|
|
searchContractUndertakerFeedbackQuery.CompanyId = header.CompanyId
|
|
|
searchContractUndertakerFeedbackQuery.OrgId = header.OrgId
|
|
|
searchContractUndertakerFeedbackQuery.UserId = header.UserId
|
|
|
searchContractUndertakerFeedbackQuery.UserBaseId = header.UserBaseId
|
|
|
// 获取路径参数
|
|
|
pageSize, _ := controller.GetInt32("pageSize")
|
|
|
searchContractUndertakerFeedbackQuery.PageSize = pageSize
|
|
|
pageNumber, _ := controller.GetInt32("pageNumber")
|
|
|
searchContractUndertakerFeedbackQuery.PageNumber = pageNumber
|
|
|
data, err := contractUndertakerFeedbackService.SearchContractUndertakerFeedback(searchContractUndertakerFeedbackQuery)
|
|
|
controller.Response(data, err)
|
|
|
}
|
...
|
...
|
@@ -58,10 +82,17 @@ func (controller *ContractUndertakerFeedbackController) SearchContractUndertaker |
|
|
func (controller *ContractUndertakerFeedbackController) ListContractUndertakerFeedback() {
|
|
|
contractUndertakerFeedbackService := service.NewContractUndertakerFeedbackService(nil)
|
|
|
listContractUndertakerFeedbackQuery := &query.ListContractUndertakerFeedbackQuery{}
|
|
|
offset, _ := controller.GetInt("offset")
|
|
|
listContractUndertakerFeedbackQuery.Offset = offset
|
|
|
limit, _ := controller.GetInt("limit")
|
|
|
listContractUndertakerFeedbackQuery.Limit = limit
|
|
|
// 解析头部信息
|
|
|
header := controller.GetRequestHeader(controller.Ctx)
|
|
|
listContractUndertakerFeedbackQuery.CompanyId = header.CompanyId
|
|
|
listContractUndertakerFeedbackQuery.OrgId = header.OrgId
|
|
|
listContractUndertakerFeedbackQuery.UserId = header.UserId
|
|
|
listContractUndertakerFeedbackQuery.UserBaseId = header.UserBaseId
|
|
|
// 获取路径参数
|
|
|
pageSize, _ := controller.GetInt32("pageSize")
|
|
|
listContractUndertakerFeedbackQuery.PageSize = pageSize
|
|
|
pageNumber, _ := controller.GetInt32("pageNumber")
|
|
|
listContractUndertakerFeedbackQuery.PageNumber = pageNumber
|
|
|
data, err := contractUndertakerFeedbackService.ListContractUndertakerFeedback(listContractUndertakerFeedbackQuery)
|
|
|
controller.Response(data, err)
|
|
|
} |
...
|
...
|
|