Explorar o código

国务院数据抓取基础

hanqingsong hai 1 ano
pai
achega
323c30f2fd

+ 9 - 24
src/main/java/com/unis/news/entity/BizSinGrainBureauNotice.java

@@ -22,15 +22,15 @@ import lombok.Setter;
22
 import java.util.Date;
22
 import java.util.Date;
23
 
23
 
24
 /**
24
 /**
25
- * 要闻概况-粮食局公告管理表实体
25
+ * 要闻概况-国务院公告管理表实体
26
  *
26
  *
27
  * @author qingsong.han
27
  * @author qingsong.han
28
- * @date  2024/07/22 12:02
28
+ * @date  2024/07/23 10:18
29
  **/
29
  **/
30
 @Getter
30
 @Getter
31
 @Setter
31
 @Setter
32
-@TableName("biz_sin_grain_bureau_notice")
33
-public class BizSinGrainBureauNotice {
32
+@TableName("biz_sin_state_council_notice")
33
+public class BizSinStateCouncilNotice {
34
 
34
 
35
     /** 公告唯一标识符 */
35
     /** 公告唯一标识符 */
36
     @TableId
36
     @TableId
@@ -55,30 +55,15 @@ public class BizSinGrainBureauNotice {
55
     /** 标题 */
55
     /** 标题 */
56
     private String title;
56
     private String title;
57
 
57
 
58
-    /** 索引号 */
59
-    private String indexNumber;
60
-
61
-    /** 主题分类;dev_dict的id; */
62
-    private String subjectClassificationId;
63
-
64
     /** 发布日期 */
58
     /** 发布日期 */
65
     private Date publishDate;
59
     private Date publishDate;
66
 
60
 
67
-    /** 发布机构 */
68
-    private String publishInstitution;
69
-
70
-    /** 发文字号 */
71
-    private String documentNumber;
72
-
73
-    /** 是否有效,0:否;1:是; */
74
-    private Integer isValid;
75
-
76
-    /** 公告内容 */
77
-    private String noticeContent;
61
+    /** 是否跳转,0:否;1:是; */
62
+    private Integer isRedirect;
78
 
63
 
79
-    /** 附件,多个附件用","分割 */
80
-    private String attachments;
64
+    /** 跳转地址 */
65
+    private String redirectUrl;
81
 
66
 
82
-    /** 状态,1:保存;2:提交(启用);3:禁用 */
67
+    /** 状态,1:保存;2:提交(启用);3:禁用; */
83
     private Integer status;
68
     private Integer status;
84
 }
69
 }

+ 5 - 6
src/main/java/com/unis/news/mapper/BizSinGrainBureauNoticeMapper.java

@@ -13,16 +13,15 @@
13
 package com.unis.news.mapper;
13
 package com.unis.news.mapper;
14
 
14
 
15
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
15
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
16
-import com.unis.news.entity.BizSinGrainBureauNotice;
16
+import com.unis.news.entity.BizSinStateCouncilNotice;
17
 import org.apache.ibatis.annotations.Mapper;
17
 import org.apache.ibatis.annotations.Mapper;
18
 
18
 
19
 /**
19
 /**
20
- * 要闻概况-粮食局公告管理表Mapper接口
20
+ * 要闻概况-国务院公告管理表Mapper接口
21
  *
21
  *
22
- * @author qingsong.han
23
- * @date  2024/07/22 12:02
22
+ * @author shineqingsong.han
23
+ * @date  2024/07/23 10:18
24
  **/
24
  **/
25
 @Mapper
25
 @Mapper
26
-public interface BizSinGrainBureauNoticeMapper extends BaseMapper<BizSinGrainBureauNotice> {
27
-
26
+public interface BizSinStateCouncilNoticeMapper extends BaseMapper<BizSinStateCouncilNotice> {
28
 }
27
 }

+ 1 - 1
src/main/java/com/unis/news/mapper/mapping/BizSinGrainBureauNoticeMapper.xml

@@ -1,5 +1,5 @@
1
 <?xml version="1.0" encoding="UTF-8"?>
1
 <?xml version="1.0" encoding="UTF-8"?>
2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
-<mapper namespace="com.unis.news.mapper.BizSinGrainBureauNoticeMapper">
3
+<mapper namespace="com.unis.news.mapper.BizSinStateCouncilNoticeMapper">
4
 
4
 
5
 </mapper>
5
 </mapper>

+ 8 - 9
src/main/java/com/unis/news/service/BizSinGrainBureauNoticeService.java

@@ -13,22 +13,21 @@
13
 package com.unis.news.service;
13
 package com.unis.news.service;
14
 
14
 
15
 import com.baomidou.mybatisplus.extension.service.IService;
15
 import com.baomidou.mybatisplus.extension.service.IService;
16
-import com.unis.news.entity.BizSinGrainBureauNotice;
16
+import com.unis.news.entity.BizSinStateCouncilNotice;
17
 
17
 
18
 /**
18
 /**
19
- * 要闻概况-粮食局公告管理表Service接口
19
+ * 要闻概况-国务院公告管理表Service接口
20
  *
20
  *
21
  * @author qingsong.han
21
  * @author qingsong.han
22
- * @date  2024/07/22 12:02
22
+ * @date  2024/07/23 10:18
23
  **/
23
  **/
24
-public interface BizSinGrainBureauNoticeService extends IService<BizSinGrainBureauNotice> {
24
+public interface BizSinStateCouncilNoticeService extends IService<BizSinStateCouncilNotice> {
25
 
25
 
26
     /**
26
     /**
27
-     * 添加要闻概况-粮食局公告管理表
27
+     * 添加要闻概况-国务院公告管理表
28
      *
28
      *
29
-     * @author shine
30
-     * @date  2024/05/21 15:32
29
+     * @author qingsong.han
30
+     * @date  2024/07/23 10:18
31
      */
31
      */
32
-    void add(BizSinGrainBureauNotice addParam);
33
-
32
+    void add(BizSinStateCouncilNotice addParam);
34
 }
33
 }

+ 9 - 13
src/main/java/com/unis/news/service/impl/BizSinGrainBureauNoticeServiceImpl.java

@@ -12,30 +12,26 @@
12
  */
12
  */
13
 package com.unis.news.service.impl;
13
 package com.unis.news.service.impl;
14
 
14
 
15
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
16
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
15
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
17
-import com.unis.news.entity.BizSinGrainBureauNotice;
18
-import com.unis.news.mapper.BizSinGrainBureauNoticeMapper;
19
-import com.unis.news.service.BizSinGrainBureauNoticeService;
16
+import com.unis.news.entity.BizSinStateCouncilNotice;
17
+import com.unis.news.mapper.BizSinStateCouncilNoticeMapper;
18
+import com.unis.news.service.BizSinStateCouncilNoticeService;
20
 import org.springframework.stereotype.Service;
19
 import org.springframework.stereotype.Service;
21
 import org.springframework.transaction.annotation.Transactional;
20
 import org.springframework.transaction.annotation.Transactional;
22
 
21
 
23
-
24
 /**
22
 /**
25
- * 要闻概况-粮食局公告管理表Service接口实现类
23
+ * 要闻概况-国务院公告管理表Service接口实现类
26
  *
24
  *
27
  * @author qingsong.han
25
  * @author qingsong.han
28
- * @date 2024/07/22 12:02
26
+ * @date  2024/07/23 10:18
29
  **/
27
  **/
30
 @Service
28
 @Service
31
-public class BizSinGrainBureauNoticeServiceImpl extends ServiceImpl<BizSinGrainBureauNoticeMapper, BizSinGrainBureauNotice> implements BizSinGrainBureauNoticeService {
29
+public class BizSinStateCouncilNoticeServiceImpl extends ServiceImpl<BizSinStateCouncilNoticeMapper, BizSinStateCouncilNotice> implements BizSinStateCouncilNoticeService {
32
 
30
 
33
     @Transactional(rollbackFor = Exception.class)
31
     @Transactional(rollbackFor = Exception.class)
34
     @Override
32
     @Override
35
-    public void add(BizSinGrainBureauNotice addParam) {
36
-        // 先清除数据 TODO
37
-        this.remove(new QueryWrapper<>());
38
-        // 在保存
39
-        this.save(addParam);
33
+    public void add(BizSinStateCouncilNotice addParam) {
34
+
40
     }
35
     }
36
+
41
 }
37
 }