丁云鹏 il y a 10 mois
Parent
commit
8a6353064d

+ 2 - 1
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/UserManagementService.java

@@ -17,6 +17,7 @@ import org.dom4j.io.SAXReader;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.io.StringReader;
 import java.util.*;
 
 /**
@@ -145,7 +146,7 @@ public class UserManagementService {
     public void listenWx(String xmlData) {
         try {
             SAXReader saxReader = new SAXReader();
-            Document document = saxReader.read(xmlData);
+            Document document = saxReader.read(new StringReader(xmlData));
             Element root = document.getRootElement();
             Map<String, String> param = new HashMap<>();
             for (Element e : root.elements()) {

+ 1 - 1
long-article-recommend-service/src/main/resources/mapper/crawler/ArticleGzhDeveloperMapper.xml

@@ -164,7 +164,7 @@
 
   <select id="selectGzhIdByAppId" resultType="string">
     select
-      distinct gzhId
+      distinct gzh_id
     from article_gzh_developer
     where app_id = #{appId}
   </select>