|
|
@@ -37,7 +37,6 @@ import java.util.Iterator;
|
|
|
import java.util.List;
|
|
|
import java.util.Set;
|
|
|
|
|
|
-import static javafx.scene.input.KeyCode.Q;
|
|
|
|
|
|
/**
|
|
|
* 用户service实现类
|
|
|
@@ -111,6 +110,10 @@ public class UserServiceImpl implements UserService {
|
|
|
user.setMobileArea(Const.CONTINENT);
|
|
|
}
|
|
|
|
|
|
+ if (user.getMobile() == null || !user.getMobile().matches(Const.REGEXP_MOBILE_CONTINENT)) {
|
|
|
+ throw new VisibleError("请填写正确的手机号");
|
|
|
+ }
|
|
|
+
|
|
|
// 设置基本属性,手机号默认已认证
|
|
|
user.setRegisterDate(new Timestamp(System.currentTimeMillis()));
|
|
|
Long uu = userDao.findMaxUU();
|
|
|
@@ -357,6 +360,10 @@ public class UserServiceImpl implements UserService {
|
|
|
|
|
|
@Override
|
|
|
public void bindUserspace(String appId, Long userUU, Long spaceUU) {
|
|
|
+ if (StringUtils.isEmpty(userUU) || StringUtils.isEmpty(spaceUU)) {
|
|
|
+ throw new VisibleError("参数错误");
|
|
|
+ }
|
|
|
+
|
|
|
// 找到用户和企业
|
|
|
User user = findOne(userUU);
|
|
|
Userspace userspace = userspaceService.findOne(spaceUU);
|
|
|
@@ -432,6 +439,10 @@ public class UserServiceImpl implements UserService {
|
|
|
|
|
|
@Override
|
|
|
public void unbindUserspace(Long userUU, Long spaceUU) {
|
|
|
+ if (StringUtils.isEmpty(userUU) || StringUtils.isEmpty(spaceUU)) {
|
|
|
+ throw new VisibleError("参数错误");
|
|
|
+ }
|
|
|
+
|
|
|
// 找到用户和企业
|
|
|
User user = findOne(userUU);
|
|
|
if (user == null) {
|