替换收银呗字样,更改创客错误状态,更改提现时手机号显示,分享注册,提现算法列表,后台推广员列表补充推送
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package cn.pluss.platform.controller.home;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.pluss.platform.IdCardService;
|
||||
import cn.pluss.platform.activityActivate.ActivityActivateService;
|
||||
import cn.pluss.platform.activityConsumReturn.ActivityConsumReturnService;
|
||||
@@ -25,6 +26,7 @@ import cn.pluss.platform.leshua.LeshuaSignature;
|
||||
import cn.pluss.platform.mapper.JftReceiptInfoMapper;
|
||||
import cn.pluss.platform.mapper.JftReceiptOrderMapper;
|
||||
import cn.pluss.platform.mapper.UserInfoMapper;
|
||||
import cn.pluss.platform.mapper.UserPromotionMapper;
|
||||
import cn.pluss.platform.memberOrder.MemberOrderService;
|
||||
import cn.pluss.platform.merchant.*;
|
||||
import cn.pluss.platform.merchant.move.MerchantMoveRecordsService;
|
||||
@@ -2490,7 +2492,8 @@ public class MerchantController {
|
||||
@PostMapping("/goRegister")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@ResponseBody
|
||||
public Result<?> goRegister(String inviteNum, String phoneverify, String phone, String password) {
|
||||
public Result<?> goRegister(String inviteNum, String phoneverify, String phone, String password,
|
||||
String typeCode, String currentFee) {
|
||||
if (StringUtil.isEmpty(inviteNum)) {
|
||||
return ResultGenerator.genFailResult("推荐人不能为空");
|
||||
}
|
||||
@@ -2514,7 +2517,7 @@ public class MerchantController {
|
||||
|
||||
UserInfo ui = userInfoService.getById(parentInfo.getUserId());
|
||||
if (Objects.equals(ui.getStatus(), UserInfo.STATUS_NO_SPREAD)) {
|
||||
throw new MsgException("当前推广服务商存在违规行为, 已被关闭推广权限, 请联系收银呗客服申诉");
|
||||
throw new MsgException("当前推广服务商存在违规行为, 已被关闭推广权限, 请联系银收客客服申诉");
|
||||
}
|
||||
|
||||
// if (!"1".equals(parentInfo.getSpreadFlag())) {
|
||||
@@ -2540,6 +2543,8 @@ public class MerchantController {
|
||||
userInfo.setPhone(phone);
|
||||
userInfo.setPassword(password);
|
||||
userInfo.setCreateTime(new Date());
|
||||
userInfo.setTypeCode(typeCode == null? userInfo.getTypeCode(): typeCode);
|
||||
userInfo.setCurrentFee(currentFee== null? userInfo.getCurrentFee(): currentFee);
|
||||
userInfoService.saveUserInfo(userInfo);
|
||||
UserApp userApp = new UserApp();
|
||||
userApp.setUserId(userInfo.getId());
|
||||
@@ -2560,6 +2565,44 @@ public class MerchantController {
|
||||
|
||||
userApp.setCreateDt(new Date());
|
||||
userApp.setInviteNum(StringUtil.genRandomNum(5));
|
||||
//查找代理
|
||||
UserPromotion promotion = getUserPromotionByUserId(appInfo.getUserId().toString());
|
||||
String parenId = promotion.getUserId().toString();
|
||||
promotion=new UserPromotion();
|
||||
promotion.setUserId(userInfo.getId());
|
||||
promotion.setParentUserId(parenId);
|
||||
if (currentFee.isEmpty()){
|
||||
promotion.setCurrentFee("0.38");
|
||||
}else {
|
||||
promotion.setCurrentFee(currentFee);
|
||||
}
|
||||
|
||||
if (typeCode.isEmpty()){
|
||||
promotion.setTypeCode("MC");
|
||||
}else {
|
||||
promotion.setTypeCode(typeCode);
|
||||
}
|
||||
|
||||
if(userInfo.getTypeCode().equals("FB")){
|
||||
if (promotion.getCurrentFee().compareTo(userInfo.getCurrentFee()) >0||
|
||||
userInfo.getCurrentFee().compareTo(getUserPromotionByUserId("244").getCurrentFee()) < 0){
|
||||
MsgException.checkNull(null,"错误的费率信息");
|
||||
}
|
||||
}
|
||||
|
||||
if(userInfo.getTypeCode().equals("SB")){
|
||||
if (promotion.getCurrentFee().compareTo(userInfo.getCurrentFee()) >0||
|
||||
userInfo.getCurrentFee().compareTo(getUserPromotionByUserId("244").getCurrentFee()) < 0){
|
||||
MsgException.checkNull(null,"错误的费率信息");
|
||||
}
|
||||
}
|
||||
|
||||
promotion.setIsExtend(promotion.getTypeCode().equals("MC")?"0":"1");
|
||||
promotion.setCreateTime(new Date());
|
||||
userPromotionMapper.insert(promotion);
|
||||
// 可能和数据库存储的数据不一致
|
||||
userInfo.setCreateTime(null);
|
||||
|
||||
userAppService.save(userApp);
|
||||
ipRecordService.saveRegIp(userInfo.getId() + "", userInfo.getId() + "");
|
||||
PhoneValidateCode phoneValidate = new PhoneValidateCode();
|
||||
@@ -2575,6 +2618,23 @@ public class MerchantController {
|
||||
return ResultGenerator.genFailResult("验证码输入有误!");
|
||||
}
|
||||
|
||||
@Resource
|
||||
private UserPromotionMapper userPromotionMapper;
|
||||
private UserPromotion getUserPromotionByUserId(String userId){
|
||||
UserPromotion userPromotion = new UserPromotion();
|
||||
userPromotion.setUserId(Long.valueOf(userId));
|
||||
UserPromotion promotion = userPromotionMapper.selectOne(new QueryWrapper<>(userPromotion));
|
||||
if(ObjectUtil.isNotEmpty(promotion)){
|
||||
if("MG".equals(promotion.getTypeCode())||"FB".equals(promotion.getTypeCode())||
|
||||
"AG".equals(promotion.getTypeCode())|| "SB".equals(promotion.getTypeCode())||
|
||||
"2".equals(promotion.getIsExtend()) || "1".equals(promotion.getIsExtend())){
|
||||
return promotion;
|
||||
}
|
||||
}
|
||||
getUserPromotionByUserId(promotion.getParentUserId());
|
||||
return promotion;
|
||||
}
|
||||
|
||||
/**
|
||||
* registerSuccess:(分享注册成功). <br/>
|
||||
*
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<jsp:include page="../../common.jsp" />
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||
@@ -124,6 +123,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" id="inviteNum" value="${inviteNum }">
|
||||
<input type="hidden" id="typeCode" value="${typeCode }">
|
||||
<input type="hidden" id="currentFee" value="${currentFee }">
|
||||
</div>
|
||||
<div class="weui-cells weui-cells_form bdbe">
|
||||
<div class="weui-cell weui-cell_warn">
|
||||
@@ -151,12 +152,40 @@
|
||||
inapp: false,
|
||||
params: {}
|
||||
});*/
|
||||
// console.log(window.location.href)
|
||||
// console.log(decodeURI(window.location.href))
|
||||
//var priKey = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAK3gHtMn28yaXenmocShh9ki5GqSVsVKsjmOerbm+OOqkmnxVzwivSfxBUKl/No7mhTa1/ipngoiJ3CXKxqB3MtvverwRAh/ggu3YFAVFLlEAY+co08DwGxbCrNucAjb4YcJJa2LFVq0tuzB92YhAkQczMPKUsYfJxtvcIb6YL+xAgMBAAECgYA6qkO8OtaOUgcdxBMQpO+Q85Td4EImju1TPh9pVsTjC8oatLMaNx5bO5bqxdZqS3HRV4VHAPOxt5RXCKoiZ253JMvmcWXmiwYNFEr9iFXOLVT0H6q+TT4cpp5klAFM5xELaR4WFsYlxvCA6KGdNqHg4wYSPwj+WdYM12xEhBtjgQJBAPttT2LuIoEyLvjrqUr8bMuFKHRuYp3rMtl3nwU0es2OuOOsWH69w+L7oi4tgHr1gzpN8k2XExMcf0uDnk9eBrsCQQCxCbdegzCiSafUxrDwZpROlfL1duRXDinkLc9KC2HfS+w4/9Mjuc49SFo3grKczGN3t6AnlBasONehmNuDAAqDAkAeFND3tCgarwdhrshdeWAG5ZKWg5J29GnsDNzQwZujtly2mKsp1sh2Asc/oSALFg6yThscX2Pf2Hv+a+vn8Qb7AkAuDXD9zPKhxLc7ylPMtWJu7uK8p6jOXIjZKnF5uWxEQeO5EBNEf9j+aAvP1NfRofld8w5ePU+IjWDKUJEJisExAkEA+L6M96L3ICNF3sYtdvILO2ExYb4AuxF18MmPVWEy0jK9xxan3rggpIG+BQQuy8DoL1snc+JABALiSFEbAZjm6Q=="
|
||||
let url = window.location.href
|
||||
// function RSAdecrypt(){
|
||||
// var data="XiBfUFtMYDNqQvYnehWdbWxr5BBjB9qkCgBE8QPV81HJVbVpk3OCDFn6c7gTky6laKkxps3q7bcgsWUOy9d2eUy56g4p9nTGN4zvx0XfXq4eXX/6firvYuKYMy5q960A56BMwbGO8IioCs6bsv7ka3IoQccbL3nAgjbTYQa88lU=";
|
||||
// var decrypt = new JSEncrypt();
|
||||
// decrypt.setPrivateKey(priKey);
|
||||
// var u=decrypt.decrypt(data);
|
||||
// console.log("解密"+u);
|
||||
// return u;
|
||||
// }
|
||||
|
||||
function getQueryString(url, name) {
|
||||
|
||||
// var url1= url.split("?")[1];
|
||||
// RSAD
|
||||
|
||||
var reg = new RegExp('(^|&|/?)' + name + '=([^&|/?]*)(&|/?|$)', 'i')
|
||||
var r = url.substr(1).match(reg)
|
||||
if (r != null) {
|
||||
return r[2]
|
||||
}
|
||||
return '';
|
||||
}
|
||||
function goreGister() {
|
||||
// RSAdecrypt();
|
||||
var phone = $("#phone").val();
|
||||
var phoneverify = $("#phoneverify").val();
|
||||
var password = $("#password").val();
|
||||
var againPassword = $("#againPassword").val();
|
||||
var inviteNum = $("#inviteNum").val();
|
||||
var typeCode = getQueryString(url,'typeCode');
|
||||
var currentFee =getQueryString(url,'currentFee') && getQueryString(url,'currentFee').replace('%', '');
|
||||
var phoneReg = /(^1[3|4|5|6|7|8|9]\d{9}$)|(^09\d{8}$)/;
|
||||
// var psdReg = /^(?=.*[a-z|A-Z]).{6,20}$/;
|
||||
if (!phoneReg.test(phone)) {
|
||||
@@ -178,11 +207,20 @@
|
||||
$.alert("两次的密码必须相同!", "系统提示");
|
||||
return;
|
||||
}
|
||||
if(typeCode==''){
|
||||
$.alert("类型错误")
|
||||
}
|
||||
|
||||
if(currentFee==''){
|
||||
$.alert("费率错误")
|
||||
}
|
||||
$.showLoading("提交中...")
|
||||
$.ajax({
|
||||
url: ctx + '/merchant/goRegister',
|
||||
data: {
|
||||
"inviteNum": inviteNum,
|
||||
"typeCode": typeCode,
|
||||
"currentFee": currentFee,
|
||||
"phoneverify": phoneverify,
|
||||
"phone": phone,
|
||||
"password": password,
|
||||
|
||||
Reference in New Issue
Block a user