|
@@ -130,9 +130,27 @@ public class CommonService {
|
|
|
// 查找用户表是否存在
|
|
|
Integer dbUserId = baseMapper.getUserIdByOrganize(organizeId,mobile);
|
|
|
if (null != dbUserId && dbUserId > 0) {
|
|
|
+ UserLoginVo user = loginMapper.getLoginUserByUserId(dbUserId);
|
|
|
+ String showName = ValidateUtil.nameConversion(user.getUserName());
|
|
|
+ if (2 == user.getUserIdentity() || 4 == user.getUserIdentity()) {
|
|
|
+ return "该手机号已绑定机构(" + showName + ")联系人,请重新填写手机号";
|
|
|
+ } else if (3 == user.getUserIdentity()) {
|
|
|
+ return "该手机号已绑定供应商(" + showName + ")联系人,请重新填写手机号";
|
|
|
+ }
|
|
|
+ flag = true;
|
|
|
+ }
|
|
|
+ // 查找运营人员表是否存在
|
|
|
+ Integer dbOperationId = baseMapper.getOrganizeOperationIdByMobile(mobile, organizeId);
|
|
|
+ if (null != dbOperationId && dbOperationId > 0) {
|
|
|
+ UserLoginVo operation = loginMapper.getOrganizeByOperationId(dbOperationId, organizeId);
|
|
|
+ String showName = ValidateUtil.nameConversion(operation.getUserName());
|
|
|
+ if (2 == operation.getUserIdentity() || 4 == operation.getUserIdentity()) {
|
|
|
+ return "该手机号已绑定机构(" + showName + ")运营人员,请重新填写手机号";
|
|
|
+ } else if (3 == operation.getUserIdentity()) {
|
|
|
+ return "该手机号已绑定供应商(" + showName + ")运营人员,请重新填写手机号";
|
|
|
+ }
|
|
|
flag = true;
|
|
|
}
|
|
|
-
|
|
|
if (flag) {
|
|
|
return "该手机号已被使用";
|
|
|
}
|
|
@@ -142,21 +160,26 @@ public class CommonService {
|
|
|
/**
|
|
|
* 查询使用该手机号的运营人员或用户
|
|
|
*/
|
|
|
- public String operationBindCheck(String mobile, String smsCode) {
|
|
|
+ public String operationBindCheck(String mobile, String smsCode, Integer organizeId) {
|
|
|
// 手机号验证
|
|
|
- String result = mobileAndCodeValidate(mobile, smsCode);
|
|
|
+ String result = "";
|
|
|
+ if (0 == organizeId) {
|
|
|
+ result = mobileAndCodeValidate(mobile, smsCode);
|
|
|
+ } else {
|
|
|
+ result = organizeMobileValidate(mobile, smsCode, organizeId);
|
|
|
+ }
|
|
|
if ("手机验证码错误".equals(result)) {
|
|
|
return result;
|
|
|
}
|
|
|
if (result != null) {
|
|
|
// 查询使用该手机号的运营人员或用户
|
|
|
- UserLoginVo dbUser = loginMapper.getLoginUserByMobile(mobile);
|
|
|
+ UserLoginVo dbUser = loginMapper.getLoginUserByMobile(mobile, organizeId);
|
|
|
boolean offlineClub = false;
|
|
|
boolean offlineShop = false;
|
|
|
if (null != dbUser) {
|
|
|
if (mobile.equals(dbUser.getBindMobile())) {
|
|
|
// 判断运营人员手机号的唯一性
|
|
|
- Integer dbOperationId = baseMapper.getOperationIdByMobile(mobile);
|
|
|
+ Integer dbOperationId = baseMapper.getOrganizeOperationIdByMobile(mobile, organizeId);
|
|
|
if (dbOperationId != null && dbOperationId > 0) {
|
|
|
return "该手机号已注册并绑定微信!";
|
|
|
}
|