This commit is contained in:
邹宗楠
2024-07-18 09:24:57 +08:00
parent 0945624dde
commit bd0867c346

View File

@@ -90,7 +90,7 @@ func (c *PurchaseHandler) RefreshComment(fromTime, toTime time.Time) (err error)
}
if len(mtwmComment.CommentOrderDetail) > 0 {
foodNameList := make([]string, len(mtwmComment.CommentOrderDetail))
foodNameList := make([]string, 0, len(mtwmComment.CommentOrderDetail))
for _, fn := range mtwmComment.CommentOrderDetail {
if len(fn.FoodName)-strings.LastIndex(fn.FoodName, "") > 3 {
foodNameList = append(foodNameList, fn.FoodName)