Przeglądaj źródła

Merge remote-tracking branch 'origin/master'

zoujiajian 1 rok temu
rodzic
commit
160cc9cae0

+ 12 - 0
netflix-service/src/main/java/com/cyksj/service/market/task/impl/BindTaskServiceImpl.java

@@ -438,6 +438,12 @@ public class BindTaskServiceImpl implements BindTaskService {
 			if (StrUtil.isEmpty(userBindDetail.getPhone())) {
 				throw BusinessRuntimeException.getInstance("您未绑定手机号,无法更换");
 			}
+			User toBIndPhone = userMapper.selectOne(Wrappers.lambdaQuery(User.class)
+					.eq(User::getLoginPhone, account)
+					.last("limit 1"));
+			if (toBIndPhone != null) {
+				throw BusinessRuntimeException.getInstance("您要换绑的手机号已经注册");
+			}
 			String phone = userBindDetail.getPhone();
 			phoneUser = userMapper.selectOne(Wrappers.lambdaQuery(User.class)
 					.eq(User::getLoginPhone, phone).last("limit 1"));
@@ -494,6 +500,12 @@ public class BindTaskServiceImpl implements BindTaskService {
 			if (StrUtil.isEmpty(userBindDetail.getEmail())) {
 				throw BusinessRuntimeException.getInstance("您未绑定邮箱,无法更换");
 			}
+			User toBIndEmail = userMapper.selectOne(Wrappers.lambdaQuery(User.class)
+					.eq(User::getEmail, account)
+					.last("limit 1"));
+			if (toBIndEmail != null) {
+				throw BusinessRuntimeException.getInstance("您要换绑的邮箱已经注册");
+			}
 			email = userBindDetail.getEmail();
 			emailUser = userMapper.selectOne(Wrappers.lambdaQuery(User.class)
 					.eq(User::getEmail, email).last("limit 1"));

+ 5 - 1
netflix-web/src/main/java/com/cyksj/web/controller/manage/CmsUserController.java

@@ -103,7 +103,11 @@ public class CmsUserController{
             otherSql += String.format("us.shared_id in (select user_id from user_distribute where business_id = %s)", businessId);
         }
         if (id != null) {
-            List<Long> relationUserIdList = userBindRelationService.getRelationUserIdList(id, null);
+            List<Long> relationUserIdList = null;
+            try {
+                relationUserIdList = userBindRelationService.getRelationUserIdList(id, null);
+            } catch (Exception e) {
+            }
             if (CollUtil.isNotEmpty(relationUserIdList)) {
                 builder.field(UserView::getId, relationUserIdList).op(Operator.InList);
             }