...
|
...
|
@@ -2,8 +2,8 @@ package dao |
|
|
|
|
|
import (
|
|
|
"fmt"
|
|
|
"github.com/go-pg/pg/v10"
|
|
|
pgTransaction "github.com/linmadan/egglib-go/transaction/pg"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/domain"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/infrastructure/pg/models"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/infrastructure/utils"
|
|
|
"time"
|
...
|
...
|
@@ -86,7 +86,8 @@ func (dao *CreditAccountDao) DividendsStatistics(queryOptions map[string]interfa |
|
|
query.Where(fmt.Sprintf(` org->>'orgId'= '%v'`, v))
|
|
|
}
|
|
|
if v, ok := queryOptions["cooperationContractNumbers"]; ok && len(v.([]string)) > 0 {
|
|
|
query.Where("cooperation_contract_number in (?)", pg.In(v))
|
|
|
//query.Where("cooperation_contract_number in (?)", pg.In(v))
|
|
|
query.Where(domain.ConditionInContractNumbers(v.([]string)))
|
|
|
}
|
|
|
query.Where("deleted_at is null")
|
|
|
err := query.Select(v)
|
...
|
...
|
@@ -123,7 +124,8 @@ func (dao *CreditAccountDao) CooperationUsersDividendsStatistics(queryOptions ma |
|
|
query.Where("created_at < ?", v)
|
|
|
}
|
|
|
if v, ok := queryOptions["cooperationContractNumbers"]; ok && len(v.([]string)) > 0 {
|
|
|
query.Where("cooperation_contract_number in (?)", pg.In(v))
|
|
|
//query.Where("cooperation_contract_number in (?)", pg.In(v))
|
|
|
query.Where(domain.ConditionInContractNumbers(v.([]string)))
|
|
|
}
|
|
|
query.Where("deleted_at is null")
|
|
|
if v, ok := queryOptions["sortByActuallyPaidAmount"]; ok {
|
...
|
...
|
|