فهرست منبع

Merge remote-tracking branch 'origin/master'

yurk 2 سال پیش
والد
کامیت
1c34ee97c3

+ 11 - 10
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/InformationServiceImpl.java

@@ -51,18 +51,19 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
                 for (Information info : information) {
                     if (info.getMsg() == null){
                         continue;
-                    }
-                    String name = info.getMsg().substring(0, info.getMsg().indexOf("更新任务进展为"));
-                    String userWxId = "";
-                    for (User item : users) {
-                        if (item.getName().equals(name)){
-                            userWxId = item.getCorpwxRealUserid();
-                            break;
+                    } else if (info.getMsg().contains("更新任务进展为")){
+                        String name = info.getMsg().substring(0, info.getMsg().indexOf("更新任务进展为"));
+                        String userWxId = "";
+                        for (User item : users) {
+                            if (name.equals(item.getName())){
+                                userWxId = item.getCorpwxRealUserid();
+                                break;
+                            }
                         }
+                        String msg = info.getMsg();
+                        String newMsg = msg.replace(name, "$userName=" + userWxId + "$");
+                        info.setMsg(newMsg);
                     }
-                    String msg = info.getMsg();
-                    String newMsg = msg.replace(name, "$userName=" + userWxId + "$");
-                    info.setMsg(newMsg);
                 }
             }
             httpRespMsg.data = information;