This commit is contained in:
邹宗楠
2024-08-05 14:01:09 +08:00
parent 35acfcf795
commit 69043f8aaf

View File

@@ -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)