feat: 优化code

This commit is contained in:
zengxiaobo 2024-06-21 17:04:01 +08:00
parent e793983d6f
commit 336257a62b

View File

@ -24,7 +24,7 @@ class ApiResultWrapper<T> extends ApiResult<T> {
//没有appId时沿用之前的拼装逻辑"${appName}_${httpCode}${ErrorCode}"
//存在appId时拼装逻辑调整为"${appId}${ErrorCode}"
if (!StringUtils.isEmpty(appRuntime.getAppId())) {
if (!StringUtils.isEmpty(appRuntime.getAppId()) && StringUtils.length(result.getCode() + "") < 6) {
this.code = Integer.parseInt(StringUtils.getDigits(appRuntime.getAppId() + StringUtils.leftPad(result.getCode() + "", 3, "0")));
}
}