diff --git a/business/partner/purchase/mtwm/order_comment.go b/business/partner/purchase/mtwm/order_comment.go index d0b2032a5..c82c0f0cf 100644 --- a/business/partner/purchase/mtwm/order_comment.go +++ b/business/partner/purchase/mtwm/order_comment.go @@ -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)