|
@@ -29,8 +29,12 @@ public class InviteController {
|
|
|
if (userId == null || userId <= 0) {
|
|
if (userId == null || userId <= 0) {
|
|
|
return Result.error("请先登录");
|
|
return Result.error("请先登录");
|
|
|
}
|
|
}
|
|
|
- String code = commissionService.getOrCreateReferralCode(userId);
|
|
|
|
|
- return Result.success(code);
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ String code = commissionService.getOrCreateReferralCode(userId);
|
|
|
|
|
+ return Result.success(code);
|
|
|
|
|
+ } catch (RuntimeException e) {
|
|
|
|
|
+ return Result.error(e.getMessage());
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@PostMapping("/bind")
|
|
@PostMapping("/bind")
|