...
|
...
|
@@ -6,6 +6,7 @@ import ( |
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/domain"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/infrastructure/pg/models"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/infrastructure/pg/transform"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/infrastructure/utils"
|
|
|
"time"
|
|
|
|
|
|
"github.com/linmadan/egglib-go/persistent/pg/sqlbuilder"
|
...
|
...
|
@@ -189,6 +190,9 @@ func (repository *ProductRecordRepository) Find(queryOptions map[string]interfac |
|
|
if v, ok := queryOptions["status"]; ok && v.(int) > 0 {
|
|
|
query.Where(fmt.Sprintf(`product_record_info->>'approveStatus' = '%v'`, v))
|
|
|
}
|
|
|
if v, ok := queryOptions["inStatus"]; ok && len(v.([]int)) > 0 {
|
|
|
query.Where(`product_record_info->>'approveStatus' in (?)`, pg.In(utils.ToArrayString(v.([]int))))
|
|
|
}
|
|
|
if v, ok := queryOptions["lastProductRecordId"]; ok && v.(int) > 0 {
|
|
|
query.Where(`product_record_id < ?`, v)
|
|
|
}
|
...
|
...
|
|