Browse Source

代码调整

ZhangWenQiang 6 years atrás
parent
commit
b82745efa0
1 changed files with 10 additions and 11 deletions
  1. 10 11
      src/main/java/com/jeeplus/modules/sys/service/HpUserService.java

+ 10 - 11
src/main/java/com/jeeplus/modules/sys/service/HpUserService.java

@@ -1111,7 +1111,6 @@ public class HpUserService extends CrudService<HpUserMapper, HpUser> {
             List list = new ArrayList();
             if (hpUserList.size() > 1) {
                 for (int i = 0; i < hpUserList.size(); i++) {
-                    Map map = getUserLists(hpUserList.get(i));
                     if (this.checkUser(hpUserList.get(i))) {
                         //没有简历,该条用户记录自动被视为放弃,数据绑定到另外的用户上
                         if (i == 0) {
@@ -1127,6 +1126,7 @@ public class HpUserService extends CrudService<HpUserMapper, HpUser> {
                         }
                         break;
                     } else {
+                        Map map = getUserLists(hpUserList.get(i));
                         list.add(map);
                     }
                 }
@@ -1314,13 +1314,12 @@ public class HpUserService extends CrudService<HpUserMapper, HpUser> {
      * @return
      */
     private Boolean checkUser(HpUser hpUser) {
-        //获取用户简历信息
-        Map map = getUserLists(hpUser);
-        HpResume hpResume = (HpResume) map.get("hpResume");
+        //返回用户简历信息
+        List<HpResume> hpResumeList = hpResumeService.findListByUserId(hpUser.getId());
         //获取用户认证信息
         String idCardNumber = hpUser.getIdCardNumber();
         //1:简历是否存在;2:用户是否提交了实名认证;作为判断该账号下是否存在数据的标准
-        if (StringUtils.isBlank(idCardNumber) && hpResume == null) {
+        if (StringUtils.isBlank(idCardNumber) && (hpResumeList == null || hpResumeList.size() == 0)) {
             return true;
         }
         return false;
@@ -1524,7 +1523,6 @@ public class HpUserService extends CrudService<HpUserMapper, HpUser> {
                     List list2 = new ArrayList();
                     if (hpUserList.size() > 1) {
                         for (int i = 0; i < hpUserList.size(); i++) {
-                            Map map = getUserLists(hpUserList.get(i));
                             if (this.checkUser(hpUserList.get(i))) {
                                 //没有简历,该条用户记录自动被视为放弃,数据绑定到另外的用户上
                                 if (i == 0) {
@@ -1545,6 +1543,7 @@ public class HpUserService extends CrudService<HpUserMapper, HpUser> {
                                 logger.info("hpUser=============" + hpUser);
                                 break;
                             } else {
+                                Map map = getUserLists(hpUserList.get(i));
                                 list2.add(map);
                             }
                         }
@@ -1692,7 +1691,6 @@ public class HpUserService extends CrudService<HpUserMapper, HpUser> {
                         //如果该用户有多条记录,则提示选择一条用户,其余则遗弃不再使用
                         if (hpUserList.size() > 1) {
                             for (int i = 0; i < hpUserList.size(); i++) {
-                                Map map = getUserLists(hpUserList.get(i));
                                 if (this.checkUser(hpUserList.get(i))) {
                                     //没有简历,该条用户记录自动被视为放弃,数据绑定到另外的用户上
                                     if (i == 0) {
@@ -1708,6 +1706,7 @@ public class HpUserService extends CrudService<HpUserMapper, HpUser> {
                                     }
                                     break;
                                 } else {
+                                    Map map = getUserLists(hpUserList.get(i));
                                     list2.add(map);
                                 }
                             }
@@ -1745,7 +1744,6 @@ public class HpUserService extends CrudService<HpUserMapper, HpUser> {
                         //如果该用户有多条记录,则提示选择一条用户,其余则遗弃不再使用
                         if (hpUserList.size() > 1) {
                             for (int i = 0; i < hpUserList.size(); i++) {
-                                Map map = getUserLists(hpUserList.get(i));
                                 if (this.checkUser(hpUserList.get(i))) {
                                     //没有简历,该条用户记录自动被视为放弃,数据绑定到另外的用户上
                                     if (i == 0) {
@@ -1761,6 +1759,7 @@ public class HpUserService extends CrudService<HpUserMapper, HpUser> {
                                     }
                                     break;
                                 } else {
+                                    Map map = getUserLists(hpUserList.get(i));
                                     list2.add(map);
                                 }
                             }
@@ -2065,7 +2064,6 @@ public class HpUserService extends CrudService<HpUserMapper, HpUser> {
                         List list2 = new ArrayList();
                         if (hpUserList.size() > 1) {
                             for (int i = 0; i < hpUserList.size(); i++) {
-                                Map map = getUserLists(hpUserList.get(i));
                                 if (this.checkUser(hpUserList.get(i))) {
                                     //没有简历,该条用户记录自动被视为放弃,数据绑定到另外的用户上
                                     if (i == 0) {
@@ -2081,6 +2079,7 @@ public class HpUserService extends CrudService<HpUserMapper, HpUser> {
                                     }
                                     break;
                                 } else {
+                                    Map map = getUserLists(hpUserList.get(i));
                                     list2.add(map);
                                 }
                             }
@@ -2213,7 +2212,6 @@ public class HpUserService extends CrudService<HpUserMapper, HpUser> {
                         //如果该用户有多条记录,则提示选择一条用户,其余则遗弃不再使用
                         if (hpUserList.size() > 1) {
                             for (int i = 0; i < hpUserList.size(); i++) {
-                                Map map = getUserLists(hpUserList.get(i));
                                 if (this.checkUser(hpUserList.get(i))) {
                                     //没有简历,该条用户记录自动被视为放弃,数据绑定到另外的用户上
                                     if (i == 0) {
@@ -2229,6 +2227,7 @@ public class HpUserService extends CrudService<HpUserMapper, HpUser> {
                                     }
                                     break;
                                 } else {
+                                    Map map = getUserLists(hpUserList.get(i));
                                     list2.add(map);
                                 }
                             }
@@ -2266,7 +2265,6 @@ public class HpUserService extends CrudService<HpUserMapper, HpUser> {
                         //如果该用户有多条记录,则提示选择一条用户,其余则遗弃不再使用
                         if (hpUserList.size() > 1) {
                             for (int i = 0; i < hpUserList.size(); i++) {
-                                Map map = getUserLists(hpUserList.get(i));
                                 if (this.checkUser(hpUserList.get(i))) {
                                     //没有简历,该条用户记录自动被视为放弃,数据绑定到另外的用户上
                                     if (i == 0) {
@@ -2282,6 +2280,7 @@ public class HpUserService extends CrudService<HpUserMapper, HpUser> {
                                     }
                                     break;
                                 } else {
+                                    Map map = getUserLists(hpUserList.get(i));
                                     list2.add(map);
                                 }
                             }