完善用户邀请码生成接口(用户注册)

This commit is contained in:
chen-xin-zhi 2025-06-04 13:51:51 +08:00
parent 2dd21bf657
commit 2ba63d32e1

View File

@ -105,7 +105,7 @@ public class WechatGetQrcodeServiceImpl implements WechatGetQrcodeService {
accessToken = this.getAccessToken().getAccess_token();
}
Map<String, Object> param = new HashMap<>();
param.put("page", "pages/login/login");
param.put("page", "pages/loginModule/register/register");
param.put("scene", "invitationCode=" + inviteCode);
param.put("width", 430); // 宽度
param.put("check_path", false);
@ -143,11 +143,9 @@ public class WechatGetQrcodeServiceImpl implements WechatGetQrcodeService {
String fileName = "qrcode.png";
// 获取文件类型
String fileType = FileUtil.getSuffix(fileName);
// 获取文件路径
String filePath = String.format("%s-%s", biz, fileName);
// 获取view值
String view = RandomStringUtils.random(8, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789");
File file = new File(UPLOAD_DIR + filePath);
File file = new File(UPLOAD_DIR + fileName);
if (!file.getParentFile().exists()) {
file.getParentFile().mkdirs();// 如果路径不存在则创建
}
@ -181,6 +179,6 @@ public class WechatGetQrcodeServiceImpl implements WechatGetQrcodeService {
.hashValue(hashValue)
.build();
fileInfoService.save(fileInfo);
return view;
return biz + "-" + view;
}
}