From 6349a28868fac24407e55a5565293229df68bb44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 13 Jul 2023 11:20:01 +0800 Subject: [PATCH] 1 --- .../partner/purchase/tao_vegetable/store_sku2.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/business/partner/purchase/tao_vegetable/store_sku2.go b/business/partner/purchase/tao_vegetable/store_sku2.go index 2f0c5071e..09ea5fb9c 100644 --- a/business/partner/purchase/tao_vegetable/store_sku2.go +++ b/business/partner/purchase/tao_vegetable/store_sku2.go @@ -397,11 +397,21 @@ func createTaoVegetable(ctx *jxcontext.Context, api *tao_vegetable.API, storeSku } func checkNameLength(name string) string { + lastName := "" + if strings.Contains(name, "其它") { + name = strings.ReplaceAll(name, "其它", "") + } + if strings.Contains(name, "其她") { + name = strings.ReplaceAll(name, "其她", "") + } + if strings.Contains(name, "其他") { + name = strings.ReplaceAll(name, "其他", "") + } + if len(name) <= tao_vegetable.NameMaxLength { return name } - lastName := "" if strings.Contains(name, "(") { startIndex := strings.Index(name, "(") endIndex := strings.Index(name, ")")