...
|
...
|
@@ -3,12 +3,14 @@ package service |
|
|
import (
|
|
|
"fmt"
|
|
|
"github.com/linmadan/egglib-go/core/application"
|
|
|
"github.com/linmadan/egglib-go/transaction/pg"
|
|
|
"github.com/linmadan/egglib-go/utils/tool_funs"
|
|
|
"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/factory"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/domain"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/domain/service"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/infrastructure/dao"
|
|
|
"time"
|
|
|
)
|
|
|
|
...
|
...
|
@@ -32,6 +34,15 @@ func (contractUndertakerFeedbackService *ContractUndertakerFeedbackService) Crea |
|
|
_ = transactionContext.RollbackTransaction()
|
|
|
}()
|
|
|
|
|
|
contractDao, _ := dao.NewCooperationContractDao(transactionContext.(*pg.TransactionContext))
|
|
|
contract, err := contractDao.FindOne(map[string]interface{}{
|
|
|
"cooperationContractId": createContractUndertakerFeedbackCommand.CooperationContractId,
|
|
|
})
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, "合约不存在")
|
|
|
}
|
|
|
createContractUndertakerFeedbackCommand.CompanyId = contract.Company.CompanyId
|
|
|
createContractUndertakerFeedbackCommand.OrgId = contract.Org.OrgId
|
|
|
// 用户REST服务初始化
|
|
|
var userService service.UserService
|
|
|
if value, err := factory.CreateUserService(map[string]interface{}{}); err != nil {
|
...
|
...
|
|