hfxc226 3 gadi atpakaļ
vecāks
revīzija
cb9b393881

+ 4 - 1
platform-dao/src/main/resources/mapper/operate/ArticleMapper.xml

@@ -6,7 +6,7 @@
         select * from(
             <foreach collection="types" item="item" index="index" separator="union all">
                 (select
-                id, type, title, introduction, picture, created_Time, update_time
+                id, type, parent_id, title, introduction, picture, created_Time, update_time
                 from
                 t_article where type = ${item} order by update_time DESC limit 0,6)
             </foreach>
@@ -15,5 +15,8 @@
         <if test="keyword != null and keyword != ''">
         and A.title like concat('%',#{keyword},'%')
         </if>
+        <if test="parentId != null and parentId != ''">
+            and A.parent_id = parentId
+        </if>
     </select>
 </mapper>

+ 2 - 1
platform-rest/src/main/java/com/platform/rest/controller/operate/ArticleController.java

@@ -50,7 +50,8 @@ public class ArticleController {
       BeanConverterUtil.copyObjectProperties(article, vo);
       if(ArticleTypeEnum.CPFW.getValue().equals(article.getType())){
           ArticleDTO dto = new ArticleDTO();
-          dto.setKeyword(article.getTitle());
+          // dto.setKeyword(article.getTitle());
+          dto.setParentId(id);
           ArticleVO voList = articleService.selectCPRelateInfo(dto);
           vo.setList3(voList.getList3());
           vo.setList4(voList.getList4());