fusenapi/model/gmodel/fs_order_detail_logic.go
laodaming 47bf9580da fix
2023-06-16 15:11:37 +08:00

14 lines
319 B
Go
Executable File

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
}