This commit is contained in:
苏尹岚
2019-12-18 15:19:22 +08:00
parent 12a1a23ac1
commit 990f3a2da2
6 changed files with 14 additions and 13 deletions

View File

@@ -1150,9 +1150,8 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor
if valid["status"] != nil {
syncStatus |= model.SyncFlagStoreStatus
}
if valid["vendorStoreName"] != nil {
vendorStoreName := valid["vendorStoreName"].(string)
if utf8.RuneCountInString(vendorStoreName) > 13 && vendorID == model.VendorIDJD {
if vendorStoreName, ok := valid["vendorStoreName"].(string); ok {
if utf8.RuneCountInString(vendorStoreName) > jdapi.MaxStoreNameLen && vendorID == model.VendorIDJD {
return 0, fmt.Errorf("门店名称不允许超过13位")
}
syncStatus |= model.SyncFlagStoreName