From 69043f8aafb2915d7f96f09ff6cf31c21574d692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Mon, 5 Aug 2024 14:01:09 +0800 Subject: [PATCH] 1 --- business/partner/purchase/mtwm/order_comment.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/business/partner/purchase/mtwm/order_comment.go b/business/partner/purchase/mtwm/order_comment.go index b7e41803d..e55c91879 100644 --- a/business/partner/purchase/mtwm/order_comment.go +++ b/business/partner/purchase/mtwm/order_comment.go @@ -227,12 +227,11 @@ func CommentListData(db *dao.DaoDB, skuList []*mtwmapi.CommentsList, startTime, // 包含()中文括号的商品 for _, fn := range mtwmComment.OrderStatus.Details { if len(fn.FoodName)-strings.LastIndex(fn.FoodName, ")") > 3 { - foodNameList[fn.FoodName] = 1 + foodNameList[strings.TrimSuffix(fn.FoodName, " ")] = 1 } else { - foodNameList[fn.FoodName[0:strings.LastIndex(fn.FoodName, "(")]] = 1 + foodNameList[strings.TrimSuffix(fn.FoodName[0:strings.LastIndex(fn.FoodName, "(")], " ")] = 1 } } - store, err := dao.GetStoreDetailByVendorStoreID(db, orderComment.VendorStoreID, orderComment.VendorID, "") if err != nil { globals.SugarLogger.Debugf("获取美团外卖差评列表,失败:%s,%v", orderComment.VendorStoreID, err)