推广宽图改版,商户列表,注册改版

This commit is contained in:
liuyingfang
2023-08-02 18:19:54 +08:00
parent 9e5aca8d74
commit 0ae6cf60cf
8 changed files with 184 additions and 104 deletions

View File

@@ -2447,37 +2447,87 @@ public class MerchantController {
public ModelAndView register() {
ModelAndView modelAndView = new ModelAndView("merchant/share");
Map<String, String> result = new HashMap<>(16);
String inviteNum = request.getParameter("inviteNum");// 推广码
String phone = "";
String userName = "";
if (StringUtil.isNotEmpty(inviteNum)) {
UserApp appInfo = userAppService.queryUserAppByInviteNum(inviteNum);
String inviteNum1 = request.getParameter("inviteNum");
if (ObjectUtil.isNotEmpty(inviteNum1)){
String phone = "";
String userName = "";
UserApp appInfo = userAppService.queryUserAppByInviteNum(inviteNum1);
if (appInfo != null) {
phone = appInfo.getPhone();
userName = appInfo.getUserName();
}
}
String enPhone = phone.replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2");// 中间隐藏4位数的号码
if (StringUtil.isNotEmpty(userName)) {
String reg = ".{1}";
StringBuffer sb = new StringBuffer();
Pattern p = Pattern.compile(reg);
Matcher m = p.matcher(userName);
int i = 0;
while (m.find()) {
i++;
if (i == 1) {
continue;
String enPhone = phone.replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2");// 中间隐藏4位数的号码
if (StringUtil.isNotEmpty(userName)) {
String reg = ".{1}";
StringBuffer sb = new StringBuffer();
Pattern p = Pattern.compile(reg);
Matcher m = p.matcher(userName);
int i = 0;
while (m.find()) {
i++;
if (i == 1) {
continue;
}
m.appendReplacement(sb, "*");
}
m.appendReplacement(sb, "*");
m.appendTail(sb);
result.put("userName", sb.toString());
}
m.appendTail(sb);
result.put("userName", sb.toString());
result.put("enPhone", enPhone);
result.put("inviteNum", inviteNum1);
modelAndView.addAllObjects(result);
return modelAndView;
}
result.put("enPhone", enPhone);
result.put("inviteNum", inviteNum);
modelAndView.addAllObjects(result);
return modelAndView;
try {
String str= request.getQueryString();
String strs= RSAUtil.decryptByPrivateKey(str,"MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAK3gHtMn28yaXenmocShh9ki5GqSVsVKsjmOerbm+OOqkmnxVzwivSfxBUKl/No7mhTa1/ipngoiJ3CXKxqB3MtvverwRAh/ggu3YFAVFLlEAY+co08DwGxbCrNucAjb4YcJJa2LFVq0tuzB92YhAkQczMPKUsYfJxtvcIb6YL+xAgMBAAECgYA6qkO8OtaOUgcdxBMQpO+Q85Td4EImju1TPh9pVsTjC8oatLMaNx5bO5bqxdZqS3HRV4VHAPOxt5RXCKoiZ253JMvmcWXmiwYNFEr9iFXOLVT0H6q+TT4cpp5klAFM5xELaR4WFsYlxvCA6KGdNqHg4wYSPwj+WdYM12xEhBtjgQJBAPttT2LuIoEyLvjrqUr8bMuFKHRuYp3rMtl3nwU0es2OuOOsWH69w+L7oi4tgHr1gzpN8k2XExMcf0uDnk9eBrsCQQCxCbdegzCiSafUxrDwZpROlfL1duRXDinkLc9KC2HfS+w4/9Mjuc49SFo3grKczGN3t6AnlBasONehmNuDAAqDAkAeFND3tCgarwdhrshdeWAG5ZKWg5J29GnsDNzQwZujtly2mKsp1sh2Asc/oSALFg6yThscX2Pf2Hv+a+vn8Qb7AkAuDXD9zPKhxLc7ylPMtWJu7uK8p6jOXIjZKnF5uWxEQeO5EBNEf9j+aAvP1NfRofld8w5ePU+IjWDKUJEJisExAkEA+L6M96L3ICNF3sYtdvILO2ExYb4AuxF18MmPVWEy0jK9xxan3rggpIG+BQQuy8DoL1snc+JABALiSFEbAZjm6Q==");
String[] params= strs.split("&");
String inviteNum="";
if(params.length<=1){
inviteNum=params[0].split("=")[1];
result.put("typeCode","MC");
result.put("currentFee","");
}else {
inviteNum=params[0].split("=")[1];
result.put("typeCode",params[1].split("=")[1]);
result.put("currentFee",(params[1].split("=").length<=1)?"":params[1].split("=")[1]);
}
String phone = "";
String userName = "";
if (StringUtil.isNotEmpty(inviteNum)) {
UserApp appInfo = userAppService.queryUserAppByInviteNum(inviteNum);
if (appInfo != null) {
phone = appInfo.getPhone();
userName = appInfo.getUserName();
}
}
String enPhone = phone.replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2");// 中间隐藏4位数的号码
if (StringUtil.isNotEmpty(userName)) {
String reg = ".{1}";
StringBuffer sb = new StringBuffer();
Pattern p = Pattern.compile(reg);
Matcher m = p.matcher(userName);
int i = 0;
while (m.find()) {
i++;
if (i == 1) {
continue;
}
m.appendReplacement(sb, "*");
}
m.appendTail(sb);
result.put("userName", sb.toString());
}
result.put("enPhone", enPhone);
result.put("inviteNum", inviteNum);
modelAndView.addAllObjects(result);
return modelAndView;
} catch (Exception e) {
throw new RuntimeException(e);
}
}