修bug
This commit is contained in:
@@ -90,7 +90,7 @@ func (r *gormRawMaterialRepository) ListRawMaterialPurchases(ctx context.Context
|
||||
if opts.OrderBy != "" {
|
||||
orderBy = opts.OrderBy
|
||||
}
|
||||
query = query.Order(orderBy).Preload("RawMaterial")
|
||||
query = query.Order(orderBy).Preload("RawMaterials")
|
||||
|
||||
offset := (page - 1) * pageSize
|
||||
err := query.Limit(pageSize).Offset(offset).Find(&results).Error
|
||||
@@ -178,7 +178,7 @@ func (r *gormRawMaterialRepository) ListFeedUsageRecords(ctx context.Context, op
|
||||
if opts.OrderBy != "" {
|
||||
orderBy = opts.OrderBy
|
||||
}
|
||||
query = query.Order(orderBy).Preload("Pen").Preload("FeedFormula")
|
||||
query = query.Order(orderBy).Preload("Pens").Preload("FeedFormulas")
|
||||
|
||||
offset := (page - 1) * pageSize
|
||||
err := query.Limit(pageSize).Offset(offset).Find(&results).Error
|
||||
|
||||
Reference in New Issue
Block a user