diff --git a/internal/controller/bundle.go b/internal/controller/bundle.go index 05add4f..6873f2a 100644 --- a/internal/controller/bundle.go +++ b/internal/controller/bundle.go @@ -41,7 +41,7 @@ func (b *BundleProvider) UpdateOrderRecord(_ context.Context, req *bundle.OrderR } func (b *BundleProvider) UpdateOrderRecordByOrderNo(_ context.Context, req *bundle.OrderRecord) (res *bundle.CommonResponse, err error) { - return logic.UpdateOrderRecord(req) + return logic.UpdateOrderRecordByOrderNo(req) } func (b *BundleProvider) OrderRecordsList(_ context.Context, req *bundle.OrderRecordsRequest) (res *bundle.OrderRecordsResponse, err error) { diff --git a/internal/logic/orderRecordsLogic.go b/internal/logic/orderRecordsLogic.go index 3e99749..0aac874 100644 --- a/internal/logic/orderRecordsLogic.go +++ b/internal/logic/orderRecordsLogic.go @@ -32,6 +32,16 @@ func UpdateOrderRecord(req *bundle.OrderRecord) (res *bundle.CommonResponse, err return } +func UpdateOrderRecordByOrderNo(req *bundle.OrderRecord) (res *bundle.CommonResponse, err error) { + res = new(bundle.CommonResponse) + orderRecord := new(model.BundleOrderRecords) + _ = copier.CopyWithOption(&orderRecord, req, copier.Option{DeepCopy: true}) + orderRecord.UUID = req.Uuid + orderRecord.BundleUUID = req.BundleUuid + res, err = dao.UpdateOrderRecordByOrderNO(orderRecord) + return +} + func OrderRecordsList(req *bundle.OrderRecordsRequest) (res *bundle.OrderRecordsResponse, err error) { res = new(bundle.OrderRecordsResponse) res, err = dao.OrderRecordsList(req)