| | |
| | | Preload bool |
| | | OperationIDs []int |
| | | Fields string |
| | | ProductIds []string |
| | | } |
| | | ) |
| | | |
| | |
| | | return slf |
| | | } |
| | | |
| | | func (slf *OperationDetailsSearch) SetProductIds(productIds []string) *OperationDetailsSearch { |
| | | slf.ProductIds = productIds |
| | | return slf |
| | | } |
| | | |
| | | func (slf *OperationDetailsSearch) SetBaseOperationType(baseOperationType constvar.BaseOperationType) *OperationDetailsSearch { |
| | | slf.BaseOperationType = baseOperationType |
| | | return slf |
| | |
| | | db = db.Where("base_operation_type = ?", slf.BaseOperationType) |
| | | } |
| | | |
| | | if len(slf.ProductIds) > 0 { |
| | | db = db.Where("product_id in ?", slf.ProductIds) |
| | | } |
| | | |
| | | return db |
| | | } |
| | | |