替换收银呗字样,更改创客错误状态,更改提现时手机号显示,分享注册,提现算法列表,后台推广员列表补充推送
This commit is contained in:
@@ -41,12 +41,12 @@ public class IntroduceController {
|
|||||||
if (Objects.equals(entity.getType(), "1")) {
|
if (Objects.equals(entity.getType(), "1")) {
|
||||||
String type = httpServletRequest.getHeader("type");
|
String type = httpServletRequest.getHeader("type");
|
||||||
//TODO 暂时安卓开发IOS不开
|
//TODO 暂时安卓开发IOS不开
|
||||||
if ("1".equals(type) || "2".equals(type)){
|
if ("1".equals(type)){
|
||||||
return ResultGenerator.genSuccessResult(entity.getContent());
|
return ResultGenerator.genSuccessResult(entity.getContent());
|
||||||
}
|
}
|
||||||
// else if ("2".equals(type)){
|
else if ("2".equals(type)){
|
||||||
// return ResultGenerator.genFailResult("");
|
return ResultGenerator.genFailResult("");
|
||||||
// }
|
}
|
||||||
return ResultGenerator.genSuccessResult(entity == null ? "" : entity.getContent());
|
return ResultGenerator.genSuccessResult(entity == null ? "" : entity.getContent());
|
||||||
}else {
|
}else {
|
||||||
return ResultGenerator.genFailResult("");
|
return ResultGenerator.genFailResult("");
|
||||||
@@ -73,11 +73,11 @@ public class IntroduceController {
|
|||||||
if (Objects.equals(entity.getType(), "1")) {
|
if (Objects.equals(entity.getType(), "1")) {
|
||||||
String type = httpServletRequest.getHeader("type");
|
String type = httpServletRequest.getHeader("type");
|
||||||
//TODO 暂时安卓开发IOS不开
|
//TODO 暂时安卓开发IOS不开
|
||||||
if ("1".equals(type) || "2".equals(type)){
|
if ("1".equals(type)){
|
||||||
return ResultGenerator.genSuccessResult(image(params.get("typeCode"), params.get("merchantType")));}
|
return ResultGenerator.genSuccessResult(image(params.get("typeCode"), params.get("merchantType")));
|
||||||
// }else if ("2".equals(type)){
|
}else if ("2".equals(type)){
|
||||||
// return ResultGenerator.genFailResult("");
|
return ResultGenerator.genFailResult("");
|
||||||
// }
|
}
|
||||||
return ResultGenerator.genSuccessResult(entity == null ? "" : entity.getContent());
|
return ResultGenerator.genSuccessResult(entity == null ? "" : entity.getContent());
|
||||||
}else {
|
}else {
|
||||||
return ResultGenerator.genFailResult("");
|
return ResultGenerator.genFailResult("");
|
||||||
|
|||||||
@@ -1781,12 +1781,7 @@ public class UserAppController {
|
|||||||
@GetMapping(value = "/applyMarker")
|
@GetMapping(value = "/applyMarker")
|
||||||
public Result<Object> applyMarker(@RequestParam("code") String code){
|
public Result<Object> applyMarker(@RequestParam("code") String code){
|
||||||
UserApp userApp = userAppService.checkApiToken();
|
UserApp userApp = userAppService.checkApiToken();
|
||||||
try {
|
userAppService.applyMarker(userApp, code);
|
||||||
userAppService.applyMarker(userApp, code);
|
return ResultGenerator.genSuccessResult();
|
||||||
return ResultGenerator.genSuccessResult();
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
return ResultGenerator.genFailResult("申请失败");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public class MobPushClient {
|
|||||||
PushNotify notify = new PushNotify();
|
PushNotify notify = new PushNotify();
|
||||||
notify.setIosProduction(0);
|
notify.setIosProduction(0);
|
||||||
notify.setPlats(Sets.newHashSet(2));
|
notify.setPlats(Sets.newHashSet(2));
|
||||||
notify.setContent("收银呗到账100022.00元");
|
notify.setContent("银收客到账100022.00元");
|
||||||
notify.setType(1);
|
notify.setType(1);
|
||||||
Push push = new Push();
|
Push push = new Push();
|
||||||
push.setPushNotify(notify);
|
push.setPushNotify(notify);
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public interface UserAppMapper extends BaseMapper<UserApp> {
|
|||||||
|
|
||||||
Integer queryUserAppPageCount(Map<String, Object> map);
|
Integer queryUserAppPageCount(Map<String, Object> map);
|
||||||
|
|
||||||
List<List<?>> queryUserInfoVOPage(Map<String, Object> map);
|
List<UserInfoVO> queryUserInfoVOPage(Map<String, Object> map);
|
||||||
|
|
||||||
List<UserInfoVO> queryUserInfoVONoPage(Map<String, Object> map);
|
List<UserInfoVO> queryUserInfoVONoPage(Map<String, Object> map);
|
||||||
|
|
||||||
|
|||||||
@@ -239,7 +239,7 @@
|
|||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="queryUserInfoVOPage" parameterType="java.util.Map" resultMap="userInfoVO, cn.pluss.platform.mapper.CommonMapper.count">
|
<select id="queryUserInfoVOPage" parameterType="java.util.Map" resultMap="userInfoVO">
|
||||||
SELECT DISTINCT SQL_CALC_FOUND_ROWS
|
SELECT DISTINCT SQL_CALC_FOUND_ROWS
|
||||||
ua.id,
|
ua.id,
|
||||||
ui.status AS uiStatus,
|
ui.status AS uiStatus,
|
||||||
@@ -441,7 +441,6 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by ua.id desc limit #{pageSize} offset #{offset};
|
order by ua.id desc limit #{pageSize} offset #{offset};
|
||||||
SELECT found_rows() as count
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="queryUserInfoVONoPage" parameterType="java.util.Map" resultType="cn.pluss.platform.vo.UserInfoVO">
|
<select id="queryUserInfoVONoPage" parameterType="java.util.Map" resultType="cn.pluss.platform.vo.UserInfoVO">
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import lombok.Getter;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public enum PayMessageType {
|
public enum PayMessageType {
|
||||||
|
|
||||||
PLAIN_PAY(1,"收银呗到账"),
|
PLAIN_PAY(1,"银收客到账"),
|
||||||
|
|
||||||
MEMBER_CONSUME(2,"会员卡消费"),
|
MEMBER_CONSUME(2,"会员卡消费"),
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public class PushServiceImpl extends ServiceImpl<PushAllMapper, PushAll> impleme
|
|||||||
generalPushUtil.sendAllPlatByAlias(alias, "银收客", "您有一个新的呼叫服务请及时处理", "3");
|
generalPushUtil.sendAllPlatByAlias(alias, "银收客", "您有一个新的呼叫服务请及时处理", "3");
|
||||||
break;
|
break;
|
||||||
case REFUND_ORDER:
|
case REFUND_ORDER:
|
||||||
generalPushUtil.sendAllPlatByAlias(alias, "收银呗", "您有一笔未接单的线上店订单,客户已申请退款。", "2");
|
generalPushUtil.sendAllPlatByAlias(alias, "银收客", "您有一笔未接单的线上店订单,客户已申请退款。", "2");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ public class MerchantPluginServiceImpl extends ServiceImpl<MerchantPluginMapper,
|
|||||||
notice.setConrtent("商户插件进件驳回, " + errMsg);
|
notice.setConrtent("商户插件进件驳回, " + errMsg);
|
||||||
noticeService.saveNotice(notice);
|
noticeService.saveNotice(notice);
|
||||||
|
|
||||||
generalPushUtil.sendAllPlatByAlias(Collections.singletonList(userApp.getUserId() + ""), "收银呗审核通知", errMsg, "1");
|
generalPushUtil.sendAllPlatByAlias(Collections.singletonList(userApp.getUserId() + ""), "银收客审核通知", errMsg, "1");
|
||||||
|
|
||||||
// 机器人发送已处理的信息到群组
|
// 机器人发送已处理的信息到群组
|
||||||
wxTalkService.sendPluginAuditResultAlert(userApp.getUserId() + "");
|
wxTalkService.sendPluginAuditResultAlert(userApp.getUserId() + "");
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ public class MerchantChannelStatusServiceImpl extends ServiceImpl<MerchantChanne
|
|||||||
notice.setConrtent("商户进件驳回, " + errMsg);
|
notice.setConrtent("商户进件驳回, " + errMsg);
|
||||||
noticeService.saveNotice(notice);
|
noticeService.saveNotice(notice);
|
||||||
|
|
||||||
generalPushUtil.sendAllPlatByAlias(Collections.singletonList(userApp.getUserId() + ""), "收银呗审核通知", errMsg, "1");
|
generalPushUtil.sendAllPlatByAlias(Collections.singletonList(userApp.getUserId() + ""), "银收客审核通知", errMsg, "1");
|
||||||
|
|
||||||
// 机器人发送已处理的信息到群组
|
// 机器人发送已处理的信息到群组
|
||||||
//wxTalkService.sendAuditResultAlert(userApp.getUserId() + "");
|
//wxTalkService.sendAuditResultAlert(userApp.getUserId() + "");
|
||||||
|
|||||||
@@ -407,7 +407,7 @@ public class MerchantStoreServiceImpl extends ServiceImpl<MerchantStoreMapper, M
|
|||||||
} else if ("rejected".equals(certStatus) || "freezed".equals(certStatus) || "canceled".equals(certStatus) || "unknow".equals(certStatus)) {
|
} else if ("rejected".equals(certStatus) || "freezed".equals(certStatus) || "canceled".equals(certStatus) || "unknow".equals(certStatus)) {
|
||||||
// 驳回或者未知状态标位已处理
|
// 驳回或者未知状态标位已处理
|
||||||
Notice notice = new Notice(1, 1, userApp);
|
Notice notice = new Notice(1, 1, userApp);
|
||||||
String pushMsg = "您好!您的商户微信认证因“##”被驳回,请联系收银呗客服修改资料并重新审核";
|
String pushMsg = "您好!您的商户微信认证因“##”被驳回,请联系银收客客服修改资料并重新审核";
|
||||||
pushMsg = pushMsg.replace("##", subMerchApplyOrder.getRemark());
|
pushMsg = pushMsg.replace("##", subMerchApplyOrder.getRemark());
|
||||||
notice.setConrtent(pushMsg);
|
notice.setConrtent(pushMsg);
|
||||||
noticeMapper.saveNotice(notice);
|
noticeMapper.saveNotice(notice);
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ public class RyxCertServiceImpl implements MerchantCertService {
|
|||||||
break;
|
break;
|
||||||
case "未提交":
|
case "未提交":
|
||||||
case "审核驳回":
|
case "审核驳回":
|
||||||
pushMsg = "您好!您的商户微信认证因“##”被驳回,请联系收银呗客服修改资料并重新审核";
|
pushMsg = "您好!您的商户微信认证因“##”被驳回,请联系银收客客服修改资料并重新审核";
|
||||||
pushMsg = pushMsg.replace("##", subMerApplyOrder.getRemark());
|
pushMsg = pushMsg.replace("##", subMerApplyOrder.getRemark());
|
||||||
generalPushUtil.sendAllPlatByAlias(Collections.singletonList(userApp.getUserId().toString()), "商户微信认证通知", pushMsg, "1");
|
generalPushUtil.sendAllPlatByAlias(Collections.singletonList(userApp.getUserId().toString()), "商户微信认证通知", pushMsg, "1");
|
||||||
notice.setConrtent(pushMsg);
|
notice.setConrtent(pushMsg);
|
||||||
|
|||||||
@@ -425,7 +425,7 @@ public class SxfCertServiceImpl implements MerchantCertService {
|
|||||||
|
|
||||||
if (StringUtils.isEmpty(certResult.getString("infoQrcode")) && StringUtils.isNotEmpty(certResult.getString("rejectInfo"))) {
|
if (StringUtils.isEmpty(certResult.getString("infoQrcode")) && StringUtils.isNotEmpty(certResult.getString("rejectInfo"))) {
|
||||||
Notice notice = new Notice(1, 1, userApp);
|
Notice notice = new Notice(1, 1, userApp);
|
||||||
String pushMsg = "您好!您的商户微信认证因“##”被驳回,请联系收银呗客服修改资料并重新审核";
|
String pushMsg = "您好!您的商户微信认证因“##”被驳回,请联系银收客客服修改资料并重新审核";
|
||||||
pushMsg = pushMsg.replace("##", certResult.getString("rejectInfo"));
|
pushMsg = pushMsg.replace("##", certResult.getString("rejectInfo"));
|
||||||
notice.setConrtent(pushMsg);
|
notice.setConrtent(pushMsg);
|
||||||
noticeMapper.saveNotice(notice);
|
noticeMapper.saveNotice(notice);
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import cn.pluss.platform.dto.MerchSearchDTO;
|
|||||||
import cn.pluss.platform.dto.StaffDTO;
|
import cn.pluss.platform.dto.StaffDTO;
|
||||||
import cn.pluss.platform.entity.UserApp;
|
import cn.pluss.platform.entity.UserApp;
|
||||||
import cn.pluss.platform.enums.UserRoleEnum;
|
import cn.pluss.platform.enums.UserRoleEnum;
|
||||||
|
import cn.pluss.platform.exception.MsgException;
|
||||||
import cn.pluss.platform.leshua.ExpandDto;
|
import cn.pluss.platform.leshua.ExpandDto;
|
||||||
import cn.pluss.platform.mapper.UserAppMapper;
|
import cn.pluss.platform.mapper.UserAppMapper;
|
||||||
import cn.pluss.platform.vo.*;
|
import cn.pluss.platform.vo.*;
|
||||||
@@ -400,7 +401,7 @@ public interface UserAppService extends IService<UserApp> {
|
|||||||
UserApp getUserAppByPhone(String phone, UserApp userApp);
|
UserApp getUserAppByPhone(String phone, UserApp userApp);
|
||||||
|
|
||||||
|
|
||||||
void applyMarker(UserApp userApp,String code) throws Exception;
|
void applyMarker(UserApp userApp,String code);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -236,14 +236,13 @@ public class UserAppServiceImpl extends ServiceImpl<UserAppMapper, UserApp> impl
|
|||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public Page<UserInfoVO> queryUserInfoVOPage(Map<String, Object> map) {
|
public Page<UserInfoVO> queryUserInfoVOPage(Map<String, Object> map) {
|
||||||
List<List<?>> queryResult = baseMapper.queryUserInfoVOPage(map);
|
List<UserInfoVO> result = baseMapper.queryUserInfoVOPage(map);
|
||||||
List<UserInfoVO> result = (List<UserInfoVO>) queryResult.get(0);
|
|
||||||
|
|
||||||
long page = ((Integer) map.get("offset")).longValue() + 1L;
|
long page = ((Integer) map.get("offset")).longValue() + 1L;
|
||||||
long pageSize = ((Integer) map.get("pageSize")).longValue();
|
long pageSize = ((Integer) map.get("pageSize")).longValue();
|
||||||
Page<UserInfoVO> pageResult = new Page<>(page, pageSize);
|
Page<UserInfoVO> pageResult = new Page<>(page, pageSize);
|
||||||
pageResult.setRecords(result);
|
pageResult.setRecords(result);
|
||||||
Long count = (Long) queryResult.get(1).get(0);
|
Long count = baseMapper.queryUserAppPageCount(map).longValue();
|
||||||
pageResult.setTotal(count);
|
pageResult.setTotal(count);
|
||||||
|
|
||||||
if (result.isEmpty()) {
|
if (result.isEmpty()) {
|
||||||
@@ -1930,7 +1929,7 @@ public class UserAppServiceImpl extends ServiceImpl<UserAppMapper, UserApp> impl
|
|||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@Override
|
@Override
|
||||||
public void applyMarker(UserApp userApp,String code) throws Exception{
|
public void applyMarker(UserApp userApp,String code){
|
||||||
UserInfo userInfo=new UserInfo();
|
UserInfo userInfo=new UserInfo();
|
||||||
userInfo.setId(userApp.getUserId());
|
userInfo.setId(userApp.getUserId());
|
||||||
UserInfo userInfos = userInfoService.queryUserInfo(userInfo);
|
UserInfo userInfos = userInfoService.queryUserInfo(userInfo);
|
||||||
@@ -1947,9 +1946,14 @@ public class UserAppServiceImpl extends ServiceImpl<UserAppMapper, UserApp> impl
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!phoneValidateCode.getCode().equalsIgnoreCase(code)) {
|
if (!phoneValidateCode.getCode().equalsIgnoreCase(code)) {
|
||||||
throw new MsgException("无效的验证码!");
|
MsgException.throwException("无效的验证码!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!phoneValidateCode.getCode().equals(code)){
|
||||||
|
MsgException.throwException("短信验证码有误!");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
MerchantBaseInfo baseInfo= merchantBaseInfoService.getMerchantBaseInfoByUserId(userInfos.getId().toString());
|
MerchantBaseInfo baseInfo= merchantBaseInfoService.getMerchantBaseInfoByUserId(userInfos.getId().toString());
|
||||||
if(ObjectUtil.isEmpty(baseInfo)){
|
if(ObjectUtil.isEmpty(baseInfo)){
|
||||||
MsgException.checkNull(null,"商户信息不存在");
|
MsgException.checkNull(null,"商户信息不存在");
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ public class UserInfoServiceImpl extends BaseUserInfoService {
|
|||||||
|
|
||||||
UserInfo ui = getById(agentUa.getUserId());
|
UserInfo ui = getById(agentUa.getUserId());
|
||||||
if (Objects.equals(ui.getStatus(), UserInfo.STATUS_NO_SPREAD)) {
|
if (Objects.equals(ui.getStatus(), UserInfo.STATUS_NO_SPREAD)) {
|
||||||
throw new MsgException("当前推广服务商存在违规行为, 已被关闭推广权限, 请联系收银呗客服申诉");
|
throw new MsgException("当前推广服务商存在违规行为, 已被关闭推广权限, 请联系银收客客服申诉");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!Objects.equals(parentApp.getStatus(), 3) || !Objects.equals(parentApp.getBankStatus(), 3) ) {
|
if (!Objects.equals(parentApp.getStatus(), 3) || !Objects.equals(parentApp.getBankStatus(), 3) ) {
|
||||||
@@ -74,7 +74,7 @@ public class UserInfoServiceImpl extends BaseUserInfoService {
|
|||||||
|
|
||||||
UserInfo ui = getById(parentApp.getUserId());
|
UserInfo ui = getById(parentApp.getUserId());
|
||||||
if (Objects.equals(ui.getStatus(), UserInfo.STATUS_NO_SPREAD)) {
|
if (Objects.equals(ui.getStatus(), UserInfo.STATUS_NO_SPREAD)) {
|
||||||
throw new MsgException("当前推广服务商存在违规行为, 已被关闭推广权限, 请联系收银呗客服申诉");
|
throw new MsgException("当前推广服务商存在违规行为, 已被关闭推广权限, 请联系银收客客服申诉");
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// if (!"1".equals(parentApp.getSpreadFlag())) {
|
// if (!"1".equals(parentApp.getSpreadFlag())) {
|
||||||
@@ -222,7 +222,7 @@ public class UserInfoServiceImpl extends BaseUserInfoService {
|
|||||||
if(ObjectUtil.isNotEmpty(promotion)){
|
if(ObjectUtil.isNotEmpty(promotion)){
|
||||||
if("MG".equals(promotion.getTypeCode())||"FB".equals(promotion.getTypeCode())||
|
if("MG".equals(promotion.getTypeCode())||"FB".equals(promotion.getTypeCode())||
|
||||||
"SB".equals(promotion.getTypeCode())||"1".equals(promotion.getIsExtend())||
|
"SB".equals(promotion.getTypeCode())||"1".equals(promotion.getIsExtend())||
|
||||||
"2".equals(promotion.getIsExtend())){
|
"2".equals(promotion.getIsExtend()) ||"AG".equals(promotion.getTypeCode())){
|
||||||
|
|
||||||
return promotion;
|
return promotion;
|
||||||
}
|
}
|
||||||
@@ -230,6 +230,6 @@ public class UserInfoServiceImpl extends BaseUserInfoService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
getUserPromotionByUserId(promotion.getParentUserId());
|
getUserPromotionByUserId(promotion.getParentUserId());
|
||||||
return null;
|
return promotion;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -205,11 +205,11 @@ public class UserInfoServiceNewImpl extends BaseUserInfoService {
|
|||||||
if(ObjectUtil.isNotEmpty(promotion)){
|
if(ObjectUtil.isNotEmpty(promotion)){
|
||||||
if("MG".equals(promotion.getTypeCode())||"FB".equals(promotion.getTypeCode())||
|
if("MG".equals(promotion.getTypeCode())||"FB".equals(promotion.getTypeCode())||
|
||||||
"SB".equals(promotion.getTypeCode())||"1".equals(promotion.getIsExtend())||
|
"SB".equals(promotion.getTypeCode())||"1".equals(promotion.getIsExtend())||
|
||||||
"2".equals(promotion.getIsExtend())){
|
"2".equals(promotion.getIsExtend())||"AG".equals(promotion.getTypeCode())){
|
||||||
return promotion;
|
return promotion;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getUserPromotionByUserId(promotion.getParentUserId());
|
getUserPromotionByUserId(promotion.getParentUserId());
|
||||||
return null;
|
return promotion;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package cn.pluss.platform.controller.home;
|
package cn.pluss.platform.controller.home;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.pluss.platform.IdCardService;
|
import cn.pluss.platform.IdCardService;
|
||||||
import cn.pluss.platform.activityActivate.ActivityActivateService;
|
import cn.pluss.platform.activityActivate.ActivityActivateService;
|
||||||
import cn.pluss.platform.activityConsumReturn.ActivityConsumReturnService;
|
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.JftReceiptInfoMapper;
|
||||||
import cn.pluss.platform.mapper.JftReceiptOrderMapper;
|
import cn.pluss.platform.mapper.JftReceiptOrderMapper;
|
||||||
import cn.pluss.platform.mapper.UserInfoMapper;
|
import cn.pluss.platform.mapper.UserInfoMapper;
|
||||||
|
import cn.pluss.platform.mapper.UserPromotionMapper;
|
||||||
import cn.pluss.platform.memberOrder.MemberOrderService;
|
import cn.pluss.platform.memberOrder.MemberOrderService;
|
||||||
import cn.pluss.platform.merchant.*;
|
import cn.pluss.platform.merchant.*;
|
||||||
import cn.pluss.platform.merchant.move.MerchantMoveRecordsService;
|
import cn.pluss.platform.merchant.move.MerchantMoveRecordsService;
|
||||||
@@ -2490,7 +2492,8 @@ public class MerchantController {
|
|||||||
@PostMapping("/goRegister")
|
@PostMapping("/goRegister")
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@ResponseBody
|
@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)) {
|
if (StringUtil.isEmpty(inviteNum)) {
|
||||||
return ResultGenerator.genFailResult("推荐人不能为空");
|
return ResultGenerator.genFailResult("推荐人不能为空");
|
||||||
}
|
}
|
||||||
@@ -2514,7 +2517,7 @@ public class MerchantController {
|
|||||||
|
|
||||||
UserInfo ui = userInfoService.getById(parentInfo.getUserId());
|
UserInfo ui = userInfoService.getById(parentInfo.getUserId());
|
||||||
if (Objects.equals(ui.getStatus(), UserInfo.STATUS_NO_SPREAD)) {
|
if (Objects.equals(ui.getStatus(), UserInfo.STATUS_NO_SPREAD)) {
|
||||||
throw new MsgException("当前推广服务商存在违规行为, 已被关闭推广权限, 请联系收银呗客服申诉");
|
throw new MsgException("当前推广服务商存在违规行为, 已被关闭推广权限, 请联系银收客客服申诉");
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (!"1".equals(parentInfo.getSpreadFlag())) {
|
// if (!"1".equals(parentInfo.getSpreadFlag())) {
|
||||||
@@ -2540,6 +2543,8 @@ public class MerchantController {
|
|||||||
userInfo.setPhone(phone);
|
userInfo.setPhone(phone);
|
||||||
userInfo.setPassword(password);
|
userInfo.setPassword(password);
|
||||||
userInfo.setCreateTime(new Date());
|
userInfo.setCreateTime(new Date());
|
||||||
|
userInfo.setTypeCode(typeCode == null? userInfo.getTypeCode(): typeCode);
|
||||||
|
userInfo.setCurrentFee(currentFee== null? userInfo.getCurrentFee(): currentFee);
|
||||||
userInfoService.saveUserInfo(userInfo);
|
userInfoService.saveUserInfo(userInfo);
|
||||||
UserApp userApp = new UserApp();
|
UserApp userApp = new UserApp();
|
||||||
userApp.setUserId(userInfo.getId());
|
userApp.setUserId(userInfo.getId());
|
||||||
@@ -2560,6 +2565,44 @@ public class MerchantController {
|
|||||||
|
|
||||||
userApp.setCreateDt(new Date());
|
userApp.setCreateDt(new Date());
|
||||||
userApp.setInviteNum(StringUtil.genRandomNum(5));
|
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);
|
userAppService.save(userApp);
|
||||||
ipRecordService.saveRegIp(userInfo.getId() + "", userInfo.getId() + "");
|
ipRecordService.saveRegIp(userInfo.getId() + "", userInfo.getId() + "");
|
||||||
PhoneValidateCode phoneValidate = new PhoneValidateCode();
|
PhoneValidateCode phoneValidate = new PhoneValidateCode();
|
||||||
@@ -2575,6 +2618,23 @@ public class MerchantController {
|
|||||||
return ResultGenerator.genFailResult("验证码输入有误!");
|
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/>
|
* registerSuccess:(分享注册成功). <br/>
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<jsp:include page="../../common.jsp" />
|
<jsp:include page="../../common.jsp" />
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<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">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||||
@@ -124,6 +123,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden" id="inviteNum" value="${inviteNum }">
|
<input type="hidden" id="inviteNum" value="${inviteNum }">
|
||||||
|
<input type="hidden" id="typeCode" value="${typeCode }">
|
||||||
|
<input type="hidden" id="currentFee" value="${currentFee }">
|
||||||
</div>
|
</div>
|
||||||
<div class="weui-cells weui-cells_form bdbe">
|
<div class="weui-cells weui-cells_form bdbe">
|
||||||
<div class="weui-cell weui-cell_warn">
|
<div class="weui-cell weui-cell_warn">
|
||||||
@@ -151,12 +152,40 @@
|
|||||||
inapp: false,
|
inapp: false,
|
||||||
params: {}
|
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() {
|
function goreGister() {
|
||||||
|
// RSAdecrypt();
|
||||||
var phone = $("#phone").val();
|
var phone = $("#phone").val();
|
||||||
var phoneverify = $("#phoneverify").val();
|
var phoneverify = $("#phoneverify").val();
|
||||||
var password = $("#password").val();
|
var password = $("#password").val();
|
||||||
var againPassword = $("#againPassword").val();
|
var againPassword = $("#againPassword").val();
|
||||||
var inviteNum = $("#inviteNum").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 phoneReg = /(^1[3|4|5|6|7|8|9]\d{9}$)|(^09\d{8}$)/;
|
||||||
// var psdReg = /^(?=.*[a-z|A-Z]).{6,20}$/;
|
// var psdReg = /^(?=.*[a-z|A-Z]).{6,20}$/;
|
||||||
if (!phoneReg.test(phone)) {
|
if (!phoneReg.test(phone)) {
|
||||||
@@ -178,11 +207,20 @@
|
|||||||
$.alert("两次的密码必须相同!", "系统提示");
|
$.alert("两次的密码必须相同!", "系统提示");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(typeCode==''){
|
||||||
|
$.alert("类型错误")
|
||||||
|
}
|
||||||
|
|
||||||
|
if(currentFee==''){
|
||||||
|
$.alert("费率错误")
|
||||||
|
}
|
||||||
$.showLoading("提交中...")
|
$.showLoading("提交中...")
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: ctx + '/merchant/goRegister',
|
url: ctx + '/merchant/goRegister',
|
||||||
data: {
|
data: {
|
||||||
"inviteNum": inviteNum,
|
"inviteNum": inviteNum,
|
||||||
|
"typeCode": typeCode,
|
||||||
|
"currentFee": currentFee,
|
||||||
"phoneverify": phoneverify,
|
"phoneverify": phoneverify,
|
||||||
"phone": phone,
|
"phone": phone,
|
||||||
"password": password,
|
"password": password,
|
||||||
|
|||||||
Reference in New Issue
Block a user