会员充值/霸王餐支付 关联id问题

统一异常拦截 rootCause 值
CLIENT_LOGIC 与 USER_LOGIC 问题
This commit is contained in:
2026-01-21 10:17:09 +08:00
parent 45965fb426
commit 0549a077b2
11 changed files with 73 additions and 65 deletions

View File

@@ -19,6 +19,7 @@ import com.czg.utils.FunUtils;
import com.mybatisflex.core.paginate.Page;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.core.NestedExceptionUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -114,7 +115,8 @@ public class UDistributionController {
try {
return CzgResult.success(distributionUserService.getInviteCode(shopId, shopUserId));
} catch (Exception e) {
log.error("获取邀请码失败用户:{}:{}", shopUserId, e.getMessage());
String rootMsg = NestedExceptionUtils.getMostSpecificCause(e).getMessage();
log.error("获取邀请码失败用户:{}:{}", shopUserId, rootMsg);
return CzgResult.success("");
}
}