作者 yangfu

共创合约列表修改

package domain_service
import (
"encoding/json"
"fmt"
"github.com/go-pg/pg/v10"
pgTransaction "github.com/linmadan/egglib-go/transaction/pg"
... ... @@ -90,10 +89,10 @@ func (ptr *CooperationStatisticsService) SearchContractDividends(queryOptions ma
// 1.根据个人、企业查询合约列表
var contracts []*domain.CooperationContract
var err error
if _, ok := queryOptions["userBaseId"]; ok {
if request.UserBaseId > 0 {
contracts, err = ptr.getUserContracts(queryOptions)
} else if v, ok := queryOptions["orgId"]; ok {
queryOptions["orgId"], _ = (v.(json.Number)).Int64()
} else if request.OrgId > 0 {
queryOptions["orgId"] = request.OrgId
contracts, err = ptr.getCompanyContracts(queryOptions)
}
if err != nil {
... ... @@ -152,7 +151,6 @@ func (ptr *CooperationStatisticsService) getUserContracts(queryOptions map[strin
// p1 p1_desc
func (ptr *CooperationStatisticsService) getCompanyContracts(queryOptions map[string]interface{}) ([]*domain.CooperationContract, error) {
contractRepository, _ := repository.NewCooperationContractRepository(ptr.transactionContext)
// TODO: 参数查询条件
_, contracts, err := contractRepository.Find(queryOptions)
return contracts, err
}
... ...