|
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.caimei365.user.components.CommonService;
|
|
|
import com.caimei365.user.components.RedisService;
|
|
|
import com.caimei365.user.components.WeChatService;
|
|
|
+import com.caimei365.user.mapper.BaseMapper;
|
|
|
import com.caimei365.user.mapper.LoginMapper;
|
|
|
import com.caimei365.user.mapper.OperationMapper;
|
|
|
import com.caimei365.user.mapper.RegisterMapper;
|
|
@@ -48,6 +49,8 @@ public class LoginServiceImpl implements LoginService {
|
|
|
private RegisterMapper registerMapper;
|
|
|
@Resource
|
|
|
private OperationMapper operationMapper;
|
|
|
+ @Resource
|
|
|
+ private BaseMapper baseMapper;
|
|
|
|
|
|
/**
|
|
|
* 小程序邀请码过期天数
|
|
@@ -442,10 +445,10 @@ public class LoginServiceImpl implements LoginService {
|
|
|
// 组织机构0
|
|
|
operation.setOrganizeId(0);
|
|
|
// 绑定的机构/供应商Id,绑定的用户类型
|
|
|
- if (user != null && 3 == user.getUserIdentity()) {
|
|
|
+ if (3 == user.getUserIdentity()) {
|
|
|
operation.setShopId(user.getShopId());
|
|
|
operation.setUserType(2);
|
|
|
- } else if (user != null) {
|
|
|
+ } else {
|
|
|
operation.setClubId(user.getClubId());
|
|
|
operation.setUserType(1);
|
|
|
}
|
|
@@ -647,6 +650,11 @@ public class LoginServiceImpl implements LoginService {
|
|
|
boolean offlineShop = false;
|
|
|
if (null != dbUser) {
|
|
|
if (mobile.equals(dbUser.getBindMobile())) {
|
|
|
+ // 判断运营人员手机号的唯一性
|
|
|
+ Integer dbOperationId = baseMapper.getOperationIdByMobile(mobile);
|
|
|
+ if (dbOperationId != null && dbOperationId > 0) {
|
|
|
+ return "该手机号已注册并绑定微信,不能再次绑定!";
|
|
|
+ }
|
|
|
// 联系人作为运营人员,放行
|
|
|
return null;
|
|
|
}
|