leon 4 years ago
parent
commit
41370f4a70

+ 1 - 1
src/main/java/com/mokamrp/privates/controller/pangu/FosterwxMobileWxfriendController.java

@@ -127,7 +127,7 @@ public class FosterwxMobileWxfriendController extends BaseController<FosterwxMob
         );
         Map<String,Boolean> friendsNames = new HashMap<>();
         for (FosterwxMobileWxfriend add :addFosterwxMobileHandle.getFriends()){
-            if(friendsNames.get(add.getWxName()) == null){
+            if(friendsNames.get(add.getWxName()) != null){
                 return AjaxResult.error(HttpMsg.wxFriendResume+add.getWxName());
             }
             friendsNames.put(add.getWxName(),true);

+ 3 - 0
src/main/java/com/mokamrp/privates/help/Analysis.java

@@ -63,6 +63,9 @@ public class Analysis {
                 //循环获取每一列
                 Map<String,String> cell = new HashMap<>();
                 for (int j = 0; j < sheetRow.getPhysicalNumberOfCells(); j++) {
+                    if (field.get(j) == null){
+                        continue;
+                    }
                     String[] param = field.get(j).split("\\|");
                     String paramKey = param[0];
                     String paramValue = null;

+ 2 - 3
src/main/java/com/mokamrp/privates/service/pangu/impl/FosterwxMobileServiceImpl.java

@@ -129,10 +129,9 @@ public class FosterwxMobileServiceImpl extends ServiceImpl<FosterwxMobileMapper,
             if (mobileInfo != null) {
                 throw new Exception("第" + (i + 1) + "行,手机编号:" + mobileCode + ",已存在相同记录");
             }
-
             // 获取企微主题相关信息
             Corp corp = corpService.getOne(new LambdaQueryWrapper<Corp>().eq(Corp::getName, cell.get("workWxCorp")).last("limit 1"));
-            if (null == corp && (null != cell.get("workWxCorp") || !cell.get("workWxCorp").isEmpty())) {
+            if (corp == null && (cell.get("workWxCorp") != null && !cell.get("workWxCorp").isEmpty())) {
                 throw new Exception("第" + (i + 1) + "行," + "无法根据企业微信主体名称找到相关信息");
             }
 
@@ -179,7 +178,7 @@ public class FosterwxMobileServiceImpl extends ServiceImpl<FosterwxMobileMapper,
                 if (wxFriendName == null || wxFriendName.isEmpty()) {
                     continue;
                 }
-                if(friendsNames.get(wxFriendName) == null){
+                if(friendsNames.get(wxFriendName) != null){
                     throw new Exception("第" + (i + 1) + "行," +wxFriendName+ "微信好友名称录入重复");
                 }
                 friendsNames.put(wxFriendName,true);