|
|
@@ -64,6 +64,9 @@ public class InviteController {
|
|
|
|
|
|
@PostMapping("/qrcode")
|
|
|
public Result<Map<String, Object>> getQrCode(@RequestAttribute("userId") Long userId) {
|
|
|
+ if (userId == null || userId <= 0) {
|
|
|
+ return Result.error("请先登录");
|
|
|
+ }
|
|
|
try {
|
|
|
String referralCode = commissionService.getOrCreateReferralCode(userId);
|
|
|
String qrBase64 = wechatService.generateWxacode("ref=" + referralCode, "pages/invite/join");
|