fusenapi/model/gmodel/fs_order_detail_logic.go

14 lines
319 B
Go
Raw Normal View History

2023-06-16 07:11:37 +00:00
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
}