Selaa lähdekoodia

修复错误码比较的bug

jys 2 vuotta sitten
vanhempi
commit
f3a32a0f36
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      v2alpha/public.go

+ 1 - 1
v2alpha/public.go

@@ -115,7 +115,7 @@ func IsCode[T codeType](err error, code T) bool {
 	if !As(err, &target) {
 		return false
 	}
-	return target.BusinessCode == int(code)
+	return target.BusinessCode == serviceCode+int(code)
 }
 
 // SetAppCode 设置服务错误码