14 lines
319 B
Go
14 lines
319 B
Go
|
package gmodel
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
)
|
||
|
|
||
|
func (od *FsOrderDetailModel) GetOrderDetailsByOrderId(ctx context.Context, orderId int64) (resp []FsOrderDetail, err error) {
|
||
|
err = od.db.WithContext(ctx).Model(&FsOrderDetail{}).Where("`order_id` = ?", orderId).Find(&resp).Error
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return
|
||
|
}
|