作者 yangfu

优化

... ... @@ -668,7 +668,7 @@ func (ptr *CooperationStatisticsService) PaymentHistoryHistogramStatistics(query
}
if request.UserBaseId > 0 {
contractNumbers, err = ptr.getUnderTakerContracts(map[string]interface{}{"userId": request.UserId})
contractNumbers, err = ptr.getUnderTakerContracts(map[string]interface{}{"userBaseId": request.UserId, "offsetLimit": false})
if len(contractNumbers) == 0 {
return retMap, nil
}
... ... @@ -677,7 +677,7 @@ func (ptr *CooperationStatisticsService) PaymentHistoryHistogramStatistics(query
}
queryOptions["cooperationContractNumbers"] = contractNumbers
} else if request.UserId > 0 && request.OrgId > 0 {
contractNumbers, err = ptr.getRelevantContracts(map[string]interface{}{"userId": request.UserId})
contractNumbers, err = ptr.getRelevantContracts(map[string]interface{}{"userId": request.UserId, "offsetLimit": false})
if len(contractNumbers) == 0 {
return retMap, nil
}
... ...
... ... @@ -437,12 +437,12 @@ func (ptr *CooperationStatisticsService) DividendsStatistics(queryOptions map[st
var contractNumbers []string
var err error
if request.OrgId > 0 && request.UserId > 0 {
contractNumbers, err = ptr.getRelevantContracts(map[string]interface{}{"orgId": request.OrgId, "userId": request.UserId})
contractNumbers, err = ptr.getRelevantContracts(map[string]interface{}{"orgId": request.OrgId, "userId": request.UserId, "offsetLimit": false})
if err != nil {
return struct{}{}, err
}
} else if request.UserBaseId > 0 {
contractNumbers, err = ptr.getUnderTakerContracts(map[string]interface{}{"orgId": request.OrgId, "userBaseId": request.UserBaseId})
contractNumbers, err = ptr.getUnderTakerContracts(map[string]interface{}{"orgId": request.OrgId, "userBaseId": request.UserBaseId, "offsetLimit": false})
if err != nil {
return struct{}{}, err
}
... ... @@ -565,12 +565,12 @@ func (ptr *CooperationStatisticsService) SearchDividendsEstimates(queryOptions m
var contractNumbers []string
var err error
if request.OrgId > 0 && request.UserId > 0 {
contractNumbers, err = ptr.getRelevantContracts(map[string]interface{}{"orgId": request.OrgId, "userId": request.UserId})
contractNumbers, err = ptr.getRelevantContracts(map[string]interface{}{"orgId": request.OrgId, "userId": request.UserId, "offsetLimit": false})
if err != nil {
return struct{}{}, err
}
} else if request.UserBaseId > 0 {
contractNumbers, err = ptr.getUnderTakerContracts(map[string]interface{}{"orgId": request.OrgId, "userBaseId": request.UserBaseId})
contractNumbers, err = ptr.getUnderTakerContracts(map[string]interface{}{"orgId": request.OrgId, "userBaseId": request.UserBaseId, "offsetLimit": false})
if err != nil {
return struct{}{}, err
}
... ...