作者 yangfu

订单商品查询修改

... ... @@ -179,13 +179,13 @@ func (repository *OrderGoodRepository) Find(queryOptions map[string]interface{})
query.Where("order_good_id IN (?)", pg.In(orderGoodIds))
}
if companyId, ok := queryOptions["companyId"]; ok && companyId.(int64) != 0 {
query.Where("company->>'companyId' = '?'", companyId)
query.Where("company_id = '?'", companyId)
}
if orgId, ok := queryOptions["orgId"]; ok && orgId.(int64) != 0 {
query.Where("org->>'orgId' = '?'", orgId)
query.Where("org_id = '?'", orgId)
}
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]int64)) > 0 {
query.Where("org->>'orgId' in (?)", pg.In(orgIds))
query.Where("org_id in (?)", pg.In(orgIds))
}
offsetLimitFlag := true
if offsetLimit, ok := queryOptions["offsetLimit"]; ok {
... ...