...
|
...
|
@@ -4,6 +4,7 @@ import ( |
|
|
"fmt"
|
|
|
"github.com/go-pg/pg/v10"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/infrastructure/utils"
|
|
|
"time"
|
|
|
|
|
|
"github.com/linmadan/egglib-go/persistent/pg/sqlbuilder"
|
|
|
pgTransaction "github.com/linmadan/egglib-go/transaction/pg"
|
...
|
...
|
@@ -220,6 +221,12 @@ func (repository *CreditAccountRepository) Find(queryOptions map[string]interfac |
|
|
newOrgIds := utils.SliceItoa(orgIds.([]int64))
|
|
|
query.Where("org->>'orgId' in (?)", pg.In(newOrgIds))
|
|
|
}
|
|
|
if v, ok := queryOptions["beginTime"]; ok && !(v.(time.Time).IsZero()) {
|
|
|
query.Where(`created_at>? `, queryOptions["beginTime"])
|
|
|
}
|
|
|
if v, ok := queryOptions["endTime"]; ok && !(v.(time.Time).IsZero()) {
|
|
|
query.Where(`created_at<? `, queryOptions["endTime"])
|
|
|
}
|
|
|
offsetLimitFlag := true
|
|
|
if offsetLimit, ok := queryOptions["offsetLimit"]; ok {
|
|
|
offsetLimitFlag = offsetLimit.(bool)
|
...
|
...
|
|