From 8fcc8d68d295ed80a42c4862f0591cd187df38b7 Mon Sep 17 00:00:00 2001 From: lishihai <dslsh@dscom> Date: 星期三, 19 六月 2024 14:26:31 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/jialian' into jialian --- controllers/operation.go | 19 +------------------ 1 files changed, 1 insertions(+), 18 deletions(-) diff --git a/controllers/operation.go b/controllers/operation.go index d59b86b..62bb487 100644 --- a/controllers/operation.go +++ b/controllers/operation.go @@ -91,23 +91,6 @@ return } - var productIds []string - for _, v := range params.Details { - productIds = append(productIds, v.ProductId) - } - products, err := models.NewMaterialSearch().SetIDs(productIds).FindNotTotal() - if err != nil { - logx.Errorf("MonthStats get products err:%v", err) - return - } - productMap := models.MaterialMap(products) - for i, v := range params.Details { - material := productMap[v.ProductId] - if material != nil { - params.Details[i].Note = material.Note - } - } - if err := models.NewOperationSearch().Create(¶ms); err != nil { logx.Errorf("Operation create err: %v", err) util.ResponseFormat(c, code.SaveFail, "娣诲姞澶辫触锛�"+err.Error()) @@ -458,7 +441,7 @@ } if operation.BaseOperationType == constvar.BaseOperationTypeInternal { - if err := service.FinishOperationInternal(tx, listDetails, mapLocAmount); err != nil { + if err := service.FinishOperationInternal(tx, listDetails); err != nil { return err } } -- Gitblit v1.8.0