优化代码

This commit is contained in:
GoEdgeLab
2023-08-08 16:46:17 +08:00
parent 9ed5fab2a8
commit 7c08239ea1
28 changed files with 71 additions and 87 deletions

View File

@@ -127,6 +127,9 @@ func (this *RegionCountryDAO) CreateCountry(tx *dbs.Tx, name string, dataId stri
pinyinResult = append(pinyinResult, strings.Join(piece, " "))
}
pinyinJSON, err := json.Marshal([]string{strings.Join(pinyinResult, " ")})
if err != nil {
return 0, err
}
op.Pinyin = pinyinJSON
codes := []string{name}