作者 tangxuhui

优化,空数组时json输出为“[]”

... ... @@ -2,6 +2,9 @@ package service
import (
"fmt"
"strconv"
"time"
"github.com/linmadan/egglib-go/core/application"
"github.com/linmadan/egglib-go/utils/tool_funs"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/application/cooperationContract/command"
... ... @@ -13,8 +16,6 @@ import (
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/infrastructure/dao"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/infrastructure/utils"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/log"
"strconv"
"time"
)
// CooperationContractService 共创合约服务
... ... @@ -828,7 +829,7 @@ func (cooperationContractService *CooperationContractService) SearchCooperationC
if count, cooperationContractByUndertakers, err := cooperationContractDao.SearchCooperationContractByUndertaker(tool_funs.SimpleStructToMap(searchCooperationContractByUndertakerQuery)); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
var cooperationContractByUndertakerDtos []*dto.CooperationContractByUndertakerDto
cooperationContractByUndertakerDtos := []*dto.CooperationContractByUndertakerDto{}
for _, cooperationContractByUndertaker := range cooperationContractByUndertakers {
cooperationContractByUndertakerDto := &dto.CooperationContractByUndertakerDto{}
if err := cooperationContractByUndertakerDto.LoadDto(cooperationContractByUndertaker); err != nil {
... ...