...
|
...
|
@@ -3,7 +3,7 @@ package service |
|
|
import (
|
|
|
"github.com/linmadan/egglib-go/core/application"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation"
|
|
|
)
|
|
|
|
|
|
// UndertakerFeedbackService 承接反馈服务
|
...
|
...
|
@@ -11,31 +11,31 @@ type UndertakerFeedbackService struct { |
|
|
}
|
|
|
|
|
|
// CreateCooperationProject TODO:承接反馈列表
|
|
|
func (srv UndertakerFeedbackService) SearchFeedback(userMenusCommand *command.SearchFeedbackCommand) (interface{}, error) {
|
|
|
creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
|
|
|
userMenusCommand.Operator)
|
|
|
resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{
|
|
|
UserId: int(userMenusCommand.Operator.UserId),
|
|
|
func (srv UndertakerFeedbackService) SearchFeedback(cmd *command.SearchFeedbackCommand) (interface{}, error) {
|
|
|
gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
|
|
|
cmd.Operator)
|
|
|
resultMenu, err := gateway.ContractUndertakerFeedbackSearch(allied_creation_cooperation.ReqContractUndertakerFeedbackSearch{
|
|
|
PageNumber: cmd.PageNumber,
|
|
|
PageSize: cmd.PageSize,
|
|
|
})
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
|
|
}
|
|
|
return map[string]interface{}{
|
|
|
"accessMenus": resultMenu.Menus,
|
|
|
}, nil
|
|
|
return resultMenu, nil
|
|
|
}
|
|
|
|
|
|
// CreateCooperationProject TODO:创建承接反馈
|
|
|
func (srv UndertakerFeedbackService) CreateFeedback(userMenusCommand *command.CreateFeedbackCommand) (interface{}, error) {
|
|
|
creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
|
|
|
userMenusCommand.Operator)
|
|
|
resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{
|
|
|
UserId: int(userMenusCommand.Operator.UserId),
|
|
|
func (srv UndertakerFeedbackService) CreateFeedback(cmd *command.CreateFeedbackCommand) (interface{}, error) {
|
|
|
gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
|
|
|
cmd.Operator)
|
|
|
resultMenu, err := gateway.ContractUndertakerFeedbackAdd(allied_creation_cooperation.ReqContractUndertakerFeedbackAdd{
|
|
|
FeedbackAttachment: cmd.FeedbackAttachment,
|
|
|
FeedbackContent: cmd.FeedbackContent,
|
|
|
CooperationContractNumber: cmd.CooperationContractNumber,
|
|
|
UnderTakerUid: cmd.Operator.UserId,
|
|
|
})
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
|
|
}
|
|
|
return map[string]interface{}{
|
|
|
"accessMenus": resultMenu.Menus,
|
|
|
}, nil
|
|
|
return resultMenu, nil
|
|
|
} |
...
|
...
|
|