作者 陈志颖

fix:修复分红退货单批量删除

package dto
import "gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/domain"
type CooperationContractByUndertakerDto struct {
}
func (dto *CooperationContractByUndertakerDto) LoadDto(contract *domain.CooperationContract) error {
return nil
}
... ...
... ... @@ -791,7 +791,7 @@ func (cooperationContractService *CooperationContractService) SearchCooperationC
}
}
// SearchCooperationContractByUndertaker 根据承接人返回共创项目合约
// SearchCooperationContractByUndertaker TODO 根据承接人返回共创项目合约
func (cooperationContractService *CooperationContractService) SearchCooperationContractByUndertaker(searchCooperationContractByUndertakerQuery *query.SearchCooperationContractByUndertakerQuery) (interface{}, error) {
if err := searchCooperationContractByUndertakerQuery.ValidateQuery(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
... ...
... ... @@ -34,7 +34,7 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) CreateDivide
_ = transactionContext.RollbackTransaction()
}()
// 公司REST服务初始
// 公司REST服务初始
var companyService service.CompanyService
if value, err := factory.CreateCompanyService(map[string]interface{}{}); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
... ... @@ -462,6 +462,10 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) BatchRemoveD
dividendsReturnedOrderRepository = value
}
if len(batchRemoveDividendsOrderCommand.DividendsReturnedOrderIds) == 0 {
return nil, nil
}
dividendsReturnedOrderIds, err := utils.SliceAtoi(batchRemoveDividendsOrderCommand.DividendsReturnedOrderIds)
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "分红退货单号错误")
... ...
... ... @@ -191,7 +191,7 @@ func (repository *DividendsEstimateRepository) SaveMany(dividendsEstimates []*do
if _, err := tx.Model(&dividendsEstimateModels).Insert(); err != nil {
return nil, err
}
dividendsEstimatesSaved := []*domain.DividendsEstimate{}
var dividendsEstimatesSaved []*domain.DividendsEstimate
for _, dividendsEstimateModel := range dividendsEstimateModels {
if dividendsEstimate, err := transform.TransformToDividendsEstimateDomainModelFromPgModels(dividendsEstimateModel); err != nil {
return dividendsEstimates, err
... ...