失败原因默认和message保持一致

This commit is contained in:
zhangdeman001 2023-06-09 16:24:15 +08:00
parent e7e59267ca
commit 62d3723566

View File

@ -57,6 +57,9 @@ func InitCodeTableWithMessage(table map[interface{}]map[string]string, convertDe
// Date : 16:19 2023/6/9 // Date : 16:19 2023/6/9
func InitCodeTableWithCodeList(list []Code, convertDefaultSuccessCode interface{}, convertDefaultLanguage string) { func InitCodeTableWithCodeList(list []Code, convertDefaultSuccessCode interface{}, convertDefaultLanguage string) {
for _, itemCode := range list { for _, itemCode := range list {
if itemCode.Reason == nil || len(itemCode.Reason) == 0 {
itemCode.Reason = itemCode.Message
}
codeTable[itemCode.Value] = itemCode codeTable[itemCode.Value] = itemCode
} }
if nil == convertDefaultSuccessCode { if nil == convertDefaultSuccessCode {