Commit 072289096c0fac178dd9deb0cacec4fd25ef36fb

Authored by 王言钊
1 parent a29d6253

开发评论、图文service接口

src/main/java/com/cnlive/shenhe/api/CommentsControllerApi.java
... ... @@ -4,7 +4,7 @@ import com.alibaba.fastjson.JSONObject;
4 4 import com.cnlive.shenhe.bean.ErrorEnum;
5 5 import com.cnlive.shenhe.bean.ResponseBean;
6 6 import com.cnlive.shenhe.entity.ShyComments;
7   -import com.cnlive.shenhe.service.serviceImpl.CommentsServiceImpl;
  7 +import com.cnlive.shenhe.service.CommentsService;
8 8 import com.cnlive.shenhe.utils.CommonConst;
9 9 import com.cnlive.shenhe.utils.CommonUtils;
10 10 import org.slf4j.Logger;
... ... @@ -26,7 +26,7 @@ import java.util.List;
26 26 public class CommentsControllerApi {
27 27 private static Logger logger = LoggerFactory.getLogger(CommentsControllerApi.class);
28 28 @Autowired
29   - CommentsServiceImpl commentsService;
  29 + CommentsService commentsService;
30 30  
31 31 /**
32 32 * @Auther: chenhao
... ... @@ -47,7 +47,7 @@ public class CommentsControllerApi {
47 47 //判断是否存在
48 48 ShyComments shyComments = new ShyComments();
49 49 shyComments.setActivity_id(json.getString("activityId"));
50   - List<ShyComments> commentsList = commentsService.findshyComments(shyComments);
  50 + List<ShyComments> commentsList = commentsService.findShyComments(shyComments);
51 51 Integer spId = null;
52 52 try {
53 53 spId = json.getInteger("spId");
... ... @@ -99,7 +99,7 @@ public class CommentsControllerApi {
99 99 if (shyComments.getId() == null) {
100 100 return commentsService.impotComments(shyComments);
101 101 } else {
102   - return commentsService.updateshyComments1(shyComments);
  102 + return commentsService.updateShyComments1(shyComments);
103 103 }
104 104 }
105 105 }
... ...
src/main/java/com/cnlive/shenhe/api/ContentControllerApi.java
... ... @@ -5,7 +5,7 @@ import com.alibaba.fastjson.JSONObject;
5 5 import com.cnlive.shenhe.bean.ErrorEnum;
6 6 import com.cnlive.shenhe.bean.ResponseBean;
7 7 import com.cnlive.shenhe.entity.ShyContent;
8   -import com.cnlive.shenhe.service.serviceImpl.ContentServiceImpl;
  8 +import com.cnlive.shenhe.service.ContentService;
9 9 import com.cnlive.shenhe.utils.CommonConst;
10 10 import com.cnlive.shenhe.utils.CommonUtils;
11 11 import org.slf4j.Logger;
... ... @@ -32,7 +32,7 @@ public class ContentControllerApi {
32 32 private static Logger logger = LoggerFactory.getLogger(ContentControllerApi.class);
33 33  
34 34 @Autowired
35   - ContentServiceImpl contentService;
  35 + ContentService contentService;
36 36  
37 37 /**
38 38 * @author liwei
... ... @@ -56,7 +56,7 @@ public class ContentControllerApi {
56 56 shyContent.setContent_tag(newContentTag);
57 57 //获取审核类型
58 58 Integer shenheType = contentService.getShenheType(json.getInteger("spId"), newContentTag);
59   - List<ShyContent> contentList = contentService.findshyContent(shyContent);
  59 + List<ShyContent> contentList = contentService.findShyContent(shyContent);
60 60 if (contentList.size() > 0) {
61 61 ShyContent shyContent1 = contentList.get(0);
62 62 // 图文存在则更新
... ... @@ -119,7 +119,7 @@ public class ContentControllerApi {
119 119 return contentService.impotContent(shyContent);
120 120 } else {
121 121 // id不存在就修改
122   - return contentService.updateshyContent(shyContent);
  122 + return contentService.updateShyContent(shyContent);
123 123 }
124 124 }
125 125  
... ... @@ -142,7 +142,7 @@ public class ContentControllerApi {
142 142 shyContent.setContent_id(momentId);
143 143 //朋友圈标签
144 144 shyContent.setContent_tag("moment");
145   - List<ShyContent> contentList = contentService.findshyContent(shyContent);
  145 + List<ShyContent> contentList = contentService.findShyContent(shyContent);
146 146 //获取审核类型
147 147 Integer shenheType = contentService.getShenheType(json.getInteger("spId"), "moment");
148 148 //获取生活圈内容的类型 1:图片 2:视频 3:分享
... ... @@ -223,7 +223,7 @@ public class ContentControllerApi {
223 223 return contentService.impotContent(shyContent);
224 224 } else {
225 225 // id存在就修改
226   - return contentService.updateshyContent(shyContent);
  226 + return contentService.updateShyContent(shyContent);
227 227 }
228 228 }
229 229 }
... ...
src/main/java/com/cnlive/shenhe/controller/CommentsController.java
... ... @@ -10,8 +10,8 @@ import com.cnlive.shenhe.entity.ShyComments;
10 10 import com.cnlive.shenhe.entity.ShyContent;
11 11 import com.cnlive.shenhe.entity.ShySites;
12 12 import com.cnlive.shenhe.entity.ShyUsers;
13   -import com.cnlive.shenhe.service.serviceImpl.CommentsServiceImpl;
14   -import com.cnlive.shenhe.service.serviceImpl.ContentServiceImpl;
  13 +import com.cnlive.shenhe.service.CommentsService;
  14 +import com.cnlive.shenhe.service.ContentService;
15 15 import com.cnlive.shenhe.service.serviceImpl.SitesServiceImpl;
16 16 import com.cnlive.shenhe.service.serviceImpl.UsersServiceImpl;
17 17 import com.cnlive.shenhe.utils.AuditPass;
... ... @@ -43,7 +43,7 @@ public class CommentsController extends BaseController {
43 43 @Autowired
44 44 AuditPass pass;
45 45 @Autowired
46   - CommentsServiceImpl commentsService;
  46 + CommentsService commentsService;
47 47  
48 48 @Autowired
49 49 UsersServiceImpl usersService;
... ... @@ -51,7 +51,7 @@ public class CommentsController extends BaseController {
51 51 @Autowired
52 52 SitesServiceImpl sitesService;
53 53 @Autowired
54   - ContentServiceImpl contentService;
  54 + ContentService contentService;
55 55  
56 56 /**
57 57 * 评论列表页
... ...
src/main/java/com/cnlive/shenhe/controller/ContentController.java
... ... @@ -8,7 +8,7 @@ import com.cnlive.shenhe.dto.ContentDTO;
8 8 import com.cnlive.shenhe.entity.ShyContent;
9 9 import com.cnlive.shenhe.entity.ShySites;
10 10 import com.cnlive.shenhe.entity.ShyUsers;
11   -import com.cnlive.shenhe.service.serviceImpl.ContentServiceImpl;
  11 +import com.cnlive.shenhe.service.ContentService;
12 12 import com.cnlive.shenhe.service.serviceImpl.SitesServiceImpl;
13 13 import com.cnlive.shenhe.service.serviceImpl.UsersServiceImpl;
14 14 import com.cnlive.shenhe.utils.CommonConst;
... ... @@ -40,7 +40,7 @@ import java.util.List;
40 40 public class ContentController extends BaseController {
41 41 private static Logger logger = LoggerFactory.getLogger(ContentController.class);
42 42 @Autowired
43   - ContentServiceImpl contentService;
  43 + ContentService contentService;
44 44 @Autowired
45 45 SitesServiceImpl sitesService;
46 46  
... ...
src/main/java/com/cnlive/shenhe/job/CommentsJob.java
1 1 package com.cnlive.shenhe.job;
2 2  
3 3 import com.cnlive.shenhe.entity.ShyComments;
4   -import com.cnlive.shenhe.service.serviceImpl.CommentsServiceImpl;
  4 +import com.cnlive.shenhe.service.CommentsService;
5 5 import com.cnlive.shenhe.utils.CommonConst;
6 6 import org.slf4j.Logger;
7 7 import org.slf4j.LoggerFactory;
... ... @@ -19,7 +19,7 @@ public class CommentsJob {
19 19  
20 20 private static Logger logger = LoggerFactory.getLogger(CommentsJob.class);
21 21 @Autowired
22   - CommentsServiceImpl commentsService;
  22 + CommentsService commentsService;
23 23  
24 24 @Scheduled(fixedRate = 60 * 1000)
25 25 public void updateComments() {
... ... @@ -28,7 +28,7 @@ public class CommentsJob {
28 28 // 审核类型为免审
29 29 shyComments.setShenhe_type(CommonConst.AUDIT_TYPE_FREE);
30 30 shyComments.setState(CommonConst.AUDIT_INTT);
31   - List<ShyComments> commentsList = commentsService.findshyComments(shyComments);
  31 + List<ShyComments> commentsList = commentsService.findShyComments(shyComments);
32 32 if (commentsList.size() > 0) {
33 33 for (ShyComments comments : commentsList) {
34 34 commentsService.updateState(comments.getId().toString(), CommonConst.AUDIT_SUCCESS, "", "白名单", "白名单通过");
... ... @@ -48,14 +48,14 @@ public class CommentsJob {
48 48 shyComments.setState(CommonConst.AUDIT_INTT);
49 49 //已领取
50 50 shyComments.setReceive(CommonConst.RECEIVE_AFTER);
51   - List<ShyComments> commentsList = commentsService.findshyComments(shyComments);
  51 + List<ShyComments> commentsList = commentsService.findShyComments(shyComments);
52 52 if (commentsList.size() > 0) {
53 53 for (ShyComments comments : commentsList) {
54 54 logger.info("自动退领的comments_id:" + comments.getId());
55 55 //未领取
56 56 comments.setReceive(CommonConst.RECEIVE_BEFORE);
57 57 comments.setReceive_user_id(null);
58   - commentsService.updateshyComments1(comments);
  58 + commentsService.updateShyComments1(comments);
59 59 }
60 60 }
61 61 }
... ...
src/main/java/com/cnlive/shenhe/job/ContentJob.java
1 1 package com.cnlive.shenhe.job;
2 2  
3 3 import com.cnlive.shenhe.entity.ShyContent;
4   -import com.cnlive.shenhe.service.serviceImpl.ContentServiceImpl;
  4 +import com.cnlive.shenhe.service.ContentService;
5 5 import com.cnlive.shenhe.utils.CommonConst;
6 6 import org.slf4j.Logger;
7 7 import org.slf4j.LoggerFactory;
... ... @@ -22,7 +22,7 @@ public class ContentJob {
22 22 private static Logger logger = LoggerFactory.getLogger(ContentJob.class);
23 23  
24 24 @Autowired
25   - ContentServiceImpl contentService;
  25 + ContentService contentService;
26 26  
27 27 /**
28 28 * 白名单sp图文通过
... ... @@ -34,7 +34,7 @@ public class ContentJob {
34 34 shyContent.setShenhe_type(CommonConst.AUDIT_TYPE_FREE);
35 35 // 领取状态为未领取
36 36 shyContent.setReceive_status(CommonConst.RECEIVE_BEFORE);
37   - List<ShyContent> shyContentList = contentService.findshyContent(shyContent);
  37 + List<ShyContent> shyContentList = contentService.findShyContent(shyContent);
38 38 if (shyContentList.size() > 0) {
39 39 for (ShyContent content : shyContentList) {
40 40 logger.info("当前白名单通过的content_id:" + content.getId());
... ... @@ -73,14 +73,14 @@ public class ContentJob {
73 73 ShyContent shyContent = new ShyContent();
74 74 //领取状态为,已领
75 75 shyContent.setReceive_status(CommonConst.RECEIVE_AFTER);
76   - List<ShyContent> shyContentList = contentService.findshyContent(shyContent);
  76 + List<ShyContent> shyContentList = contentService.findShyContent(shyContent);
77 77 if (shyContentList.size() > 0) {
78 78 for (ShyContent shyContent2 : shyContentList) {
79 79 logger.info("自动退领的content_id:" + shyContent2.getId());
80 80 //未领取
81 81 shyContent2.setReceive_status(CommonConst.RECEIVE_BEFORE);
82 82 shyContent2.setAuditor_id(null);
83   - contentService.updateshyContent(shyContent2);
  83 + contentService.updateShyContent(shyContent2);
84 84 }
85 85 }
86 86 }
... ...
src/main/java/com/cnlive/shenhe/job/YiDunUrlResultJob.java
... ... @@ -6,7 +6,7 @@ import com.cnlive.shenhe.entity.ShyContent;
6 6 import com.cnlive.shenhe.entity.ShyYidun;
7 7 import com.cnlive.shenhe.enums.ImageLabels;
8 8 import com.cnlive.shenhe.enums.TextLabels;
9   -import com.cnlive.shenhe.service.serviceImpl.ContentServiceImpl;
  9 +import com.cnlive.shenhe.service.ContentService;
10 10 import com.cnlive.shenhe.service.serviceImpl.YiDunServiceImpl;
11 11 import com.cnlive.shenhe.utils.CommonConst;
12 12 import com.cnlive.shenhe.utils.HttpClientUtils;
... ... @@ -49,7 +49,7 @@ public class YiDunUrlResultJob {
49 49 @Autowired
50 50 YiDunServiceImpl yiDunServiceImpl;
51 51 @Autowired
52   - ContentServiceImpl contentServiceImpl;
  52 + ContentService contentServiceImpl;
53 53  
54 54  
55 55 /**
... ... @@ -190,7 +190,7 @@ public class YiDunUrlResultJob {
190 190 //拒绝原因
191 191 shyContent.setShenhe_msg("易盾网站识别其它问题需排查");
192 192 newYiDunMsg.setDesc_msg("易盾网站识别其它问题需排查");
193   - contentServiceImpl.updateshyContent(shyContent);
  193 + contentServiceImpl.updateShyContent(shyContent);
194 194 }
195 195 yiDunServiceImpl.updateYiDunMsg(newYiDunMsg);
196 196 }
... ...
src/main/java/com/cnlive/shenhe/service/CommentsService.java 0 → 100644
  1 +package com.cnlive.shenhe.service;
  2 +
  3 +import com.cnlive.shenhe.dto.CommentsDTO;
  4 +import com.cnlive.shenhe.entity.ShyComments;
  5 +import com.github.pagehelper.PageInfo;
  6 +
  7 +import java.util.List;
  8 +
  9 +/**
  10 + * @Author: yan-zhao-wang
  11 + * @DateTime: 2022-11-01 13:10
  12 + */
  13 +public interface CommentsService {
  14 + /**
  15 + * 根据评论对象获取评论集合
  16 + *
  17 + * @param shyComments
  18 + * @return
  19 + */
  20 + List<ShyComments> findShyComments(ShyComments shyComments);
  21 +
  22 + /**
  23 + * 修改评论 返回布尔类型
  24 + *
  25 + * @param shyComments
  26 + * @return
  27 + */
  28 + boolean updateShyComments1(ShyComments shyComments);
  29 +
  30 + /**
  31 + * 导入评论 返回布尔类型
  32 + *
  33 + * @param shyComments
  34 + * @return
  35 + */
  36 + boolean impotComments(ShyComments shyComments);
  37 +
  38 + /**
  39 + * 评论分页、条件查询
  40 + *
  41 + * @param commentsDTO
  42 + * @return
  43 + */
  44 + PageInfo<ShyComments> getPage(CommentsDTO commentsDTO);
  45 +
  46 + /**
  47 + * 导出Excel表格
  48 + *
  49 + * @param commentsDTO
  50 + * @return
  51 + */
  52 + PageInfo<ShyComments> getPageExcel(CommentsDTO commentsDTO);
  53 +
  54 + /**
  55 + * 获取评论详情
  56 + *
  57 + * @param id
  58 + * @return
  59 + */
  60 + ShyComments getDetailsComment(Integer id);
  61 +
  62 + /**
  63 + * 修改状态 回调 返回布尔类型
  64 + *
  65 + * @param ids
  66 + * @param state
  67 + * @param userId
  68 + * @param updater
  69 + * @param msg
  70 + * @return
  71 + */
  72 + boolean updateState(String ids, Integer state, String userId, String updater, String msg);
  73 +
  74 + /**
  75 + * 认领
  76 + *
  77 + * @param ids
  78 + * @param num
  79 + * @param userId
  80 + * @param spid
  81 + * @return
  82 + */
  83 + Integer receive(String ids, Integer num, String userId, Integer spid);
  84 +
  85 + /**
  86 + * 退领
  87 + *
  88 + * @param ids
  89 + * @param userId
  90 + * @return
  91 + */
  92 + Integer retReceive(String ids, String userId);
  93 +
  94 + /**
  95 + * 根据主键id查询评论对象
  96 + *
  97 + * @param id
  98 + * @return
  99 + */
  100 + ShyComments selectByPrimaryKey(Integer id);
  101 +
  102 + /**
  103 + * 根据主键id修改对象
  104 + *
  105 + * @param comments
  106 + * @return
  107 + */
  108 + int updateByPrimaryKeySelective(ShyComments comments);
  109 +
  110 + /**
  111 + * 获取审核类型
  112 + *
  113 + * @param shyComments
  114 + */
  115 + void getShenheType(ShyComments shyComments);
  116 +}
... ...
src/main/java/com/cnlive/shenhe/service/ContentService.java 0 → 100644
  1 +package com.cnlive.shenhe.service;
  2 +
  3 +import com.cnlive.shenhe.dto.ContentDTO;
  4 +import com.cnlive.shenhe.entity.ShyContent;
  5 +import com.github.pagehelper.PageInfo;
  6 +
  7 +import java.util.List;
  8 +
  9 +/**
  10 + * @Author: yan-zhao-wang
  11 + * @DateTime: 2022-11-01 13:11
  12 + */
  13 +public interface ContentService {
  14 + /**
  15 + * 获取图文对象
  16 + *
  17 + * @param shyContent
  18 + * @return
  19 + */
  20 + ShyContent getShyContent(ShyContent shyContent);
  21 +
  22 + /**
  23 + * 获取图文集合
  24 + *
  25 + * @param shyContent
  26 + * @return
  27 + */
  28 + List<ShyContent> findShyContent(ShyContent shyContent);
  29 +
  30 + /**
  31 + * 根据条件 查询图文集合
  32 + *
  33 + * @return
  34 + */
  35 + List<ShyContent> findShyContentWithWebPage();
  36 +
  37 + /**
  38 + * 修改图文 返回布尔类型
  39 + *
  40 + * @param shyContent
  41 + * @return
  42 + */
  43 + boolean updateShyContent(ShyContent shyContent);
  44 +
  45 + /**
  46 + * 导入图文 返回布尔类型
  47 + *
  48 + * @param shyContent
  49 + * @return
  50 + */
  51 + boolean impotContent(ShyContent shyContent);
  52 +
  53 + /**
  54 + * 分页、条件查询 返回集合
  55 + *
  56 + * @param contentDTO
  57 + * @return
  58 + */
  59 + PageInfo<ShyContent> getPage(ContentDTO contentDTO);
  60 +
  61 + /**
  62 + * 根据条件导出数据excel
  63 + *
  64 + * @param contentDTO
  65 + * @return
  66 + */
  67 + List<ShyContent> findByCondition(ContentDTO contentDTO);
  68 +
  69 + /**
  70 + * 根据id获取图文详情
  71 + *
  72 + * @param id
  73 + * @return
  74 + */
  75 + ShyContent getDetailsContent(Integer id);
  76 +
  77 + /**
  78 + * 回调
  79 + *
  80 + * @param contentId
  81 + * @param msg
  82 + * @param state
  83 + * @param userId
  84 + * @param updater
  85 + * @return
  86 + */
  87 + boolean callback(String contentId, String msg, Integer state, String userId, String updater);
  88 +
  89 + /**
  90 + * 认领
  91 + *
  92 + * @param ids
  93 + * @param num
  94 + * @param userId
  95 + * @param spid
  96 + * @return
  97 + */
  98 + Integer receive(String ids, Integer num, String userId, Integer spid);
  99 +
  100 + /**
  101 + * 退领
  102 + *
  103 + * @param ids
  104 + * @param userId
  105 + * @return
  106 + */
  107 + Integer retReceive(String ids, String userId);
  108 +
  109 + /**
  110 + * 根据主键查询图文对象
  111 + *
  112 + * @param id
  113 + * @return
  114 + */
  115 + ShyContent selectByPrimaryKey(Integer id);
  116 +
  117 + /**
  118 + * 根据主键修改图文
  119 + *
  120 + * @param content
  121 + * @return
  122 + */
  123 + int updateByPrimaryKeySelective(ShyContent content);
  124 +
  125 + /**
  126 + * 获取审核类型
  127 + *
  128 + * @param spId
  129 + * @param ContentTag
  130 + * @return
  131 + */
  132 + Integer getShenheType(Integer spId, String ContentTag);
  133 +
  134 + /**
  135 + * 易盾网站过滤
  136 + * 送审类型:1:文本 2:图片 3.网页 4:点播音频
  137 + *
  138 + * @param shyContent
  139 + */
  140 + void contentFilter(ShyContent shyContent);
  141 +}
... ...
src/main/java/com/cnlive/shenhe/service/serviceImpl/CommentsServiceImpl.java
... ... @@ -6,6 +6,7 @@ import com.cnlive.shenhe.entity.ShyComments;
6 6 import com.cnlive.shenhe.entity.ShyUsers;
7 7 import com.cnlive.shenhe.mapper.ShyCommentsMapper;
8 8 import com.cnlive.shenhe.mapper.ShyUsersMapper;
  9 +import com.cnlive.shenhe.service.CommentsService;
9 10 import com.cnlive.shenhe.utils.AuditPass;
10 11 import com.cnlive.shenhe.utils.CommonConst;
11 12 import com.cnlive.shenhe.utils.CommonUtils;
... ... @@ -26,7 +27,7 @@ import java.util.List;
26 27 * @Description:
27 28 */
28 29 @Service
29   -public class CommentsServiceImpl {
  30 +public class CommentsServiceImpl implements CommentsService {
30 31  
31 32 private static Logger logger = LoggerFactory.getLogger(CommentsServiceImpl.class);
32 33 @Autowired
... ... @@ -45,7 +46,8 @@ public class CommentsServiceImpl {
45 46 * @param shyComments
46 47 * @return
47 48 */
48   - public List<ShyComments> findshyComments(ShyComments shyComments) {
  49 + @Override
  50 + public List<ShyComments> findShyComments(ShyComments shyComments) {
49 51 List<ShyComments> commentsList = shyCommentsMapper.selectByRowBounds(shyComments, new RowBounds(0, 100));
50 52 return commentsList;
51 53 }
... ... @@ -56,7 +58,8 @@ public class CommentsServiceImpl {
56 58 * @param shyComments
57 59 * @return
58 60 */
59   - public boolean updateshyComments1(ShyComments shyComments) {
  61 + @Override
  62 + public boolean updateShyComments1(ShyComments shyComments) {
60 63 int result = shyCommentsMapper.updateByPrimaryKey(shyComments);
61 64 if (result == 0) {
62 65 return false;
... ... @@ -70,6 +73,7 @@ public class CommentsServiceImpl {
70 73 * @param shyComments
71 74 * @return
72 75 */
  76 + @Override
73 77 public boolean impotComments(ShyComments shyComments) {
74 78 int result = shyCommentsMapper.insertSelective(shyComments);
75 79 if (result == 0) {
... ... @@ -84,6 +88,7 @@ public class CommentsServiceImpl {
84 88 * @param commentsDTO
85 89 * @return
86 90 */
  91 + @Override
87 92 public PageInfo<ShyComments> getPage(CommentsDTO commentsDTO) {
88 93 logger.info("接受参数对象为,CommentsDTO:{}", JSONObject.toJSON(commentsDTO));
89 94 Example example = new Example(ShyComments.class);
... ... @@ -145,6 +150,7 @@ public class CommentsServiceImpl {
145 150 * @param commentsDTO
146 151 * @return
147 152 */
  153 + @Override
148 154 public PageInfo<ShyComments> getPageExcel(CommentsDTO commentsDTO) {
149 155 Example example = new Example(ShyComments.class);
150 156 Example.Criteria criteria = example.createCriteria();
... ... @@ -202,6 +208,7 @@ public class CommentsServiceImpl {
202 208 * @param id
203 209 * @return
204 210 */
  211 + @Override
205 212 public ShyComments getDetailsComment(Integer id) {
206 213 ShyComments comment = shyCommentsMapper.selectByPrimaryKey(id);
207 214 if (!comment.getState().equals(CommonConst.AUDIT_INTT)) {
... ... @@ -230,6 +237,7 @@ public class CommentsServiceImpl {
230 237 * @param msg
231 238 * @return
232 239 */
  240 + @Override
233 241 public boolean updateState(String ids, Integer state, String userId, String updater, String msg) {
234 242 boolean success = true;
235 243 String[] commentIds = ids.split(",");
... ... @@ -289,6 +297,7 @@ public class CommentsServiceImpl {
289 297 * @param spid
290 298 * @return
291 299 */
  300 + @Override
292 301 public Integer receive(String ids, Integer num, String userId, Integer spid) {
293 302 Integer n = 0;
294 303 if (CommonUtils.isNotEmpty(ids)) {
... ... @@ -330,6 +339,7 @@ public class CommentsServiceImpl {
330 339 * @param userId
331 340 * @return
332 341 */
  342 + @Override
333 343 public Integer retReceive(String ids, String userId) {
334 344 Integer n = 0;
335 345 String[] cids = ids.split(",");
... ... @@ -353,6 +363,7 @@ public class CommentsServiceImpl {
353 363 * @param id
354 364 * @return
355 365 */
  366 + @Override
356 367 public ShyComments selectByPrimaryKey(Integer id) {
357 368 ShyComments shyComments = shyCommentsMapper.selectByPrimaryKey(id);
358 369 return shyComments;
... ... @@ -364,6 +375,7 @@ public class CommentsServiceImpl {
364 375 * @param comments
365 376 * @return
366 377 */
  378 + @Override
367 379 public int updateByPrimaryKeySelective(ShyComments comments) {
368 380 return shyCommentsMapper.updateByPrimaryKeySelective(comments);
369 381 }
... ... @@ -373,6 +385,7 @@ public class CommentsServiceImpl {
373 385 *
374 386 * @param shyComments
375 387 */
  388 + @Override
376 389 public void getShenheType(ShyComments shyComments) {
377 390 //获取评论免审sp
378 391 List<Integer> sites = sitesService.getBusinessList(CommonConst.BUSINESS_COMMENT);
... ...
src/main/java/com/cnlive/shenhe/service/serviceImpl/ContentServiceImpl.java
... ... @@ -6,6 +6,7 @@ import com.cnlive.shenhe.dto.ContentDTO;
6 6 import com.cnlive.shenhe.entity.*;
7 7 import com.cnlive.shenhe.mapper.ShyContentMapper;
8 8 import com.cnlive.shenhe.mapper.ShyUsersMapper;
  9 +import com.cnlive.shenhe.service.ContentService;
9 10 import com.cnlive.shenhe.utils.*;
10 11 import com.github.pagehelper.PageHelper;
11 12 import com.github.pagehelper.PageInfo;
... ... @@ -26,7 +27,7 @@ import java.util.List;
26 27 * @Description:
27 28 */
28 29 @Service
29   -public class ContentServiceImpl {
  30 +public class ContentServiceImpl implements ContentService {
30 31  
31 32 private static Logger logger = LoggerFactory.getLogger(ContentServiceImpl.class);
32 33 @Autowired
... ... @@ -49,6 +50,7 @@ public class ContentServiceImpl {
49 50 * @param shyContent
50 51 * @return
51 52 */
  53 + @Override
52 54 public ShyContent getShyContent(ShyContent shyContent) {
53 55 List<ShyContent> shyContentList = shyContentMapper.select(shyContent);
54 56 if (CommonUtils.isNotNull(shyContentList) && shyContentList.size() > 0) {
... ... @@ -63,7 +65,8 @@ public class ContentServiceImpl {
63 65 * @param shyContent
64 66 * @return
65 67 */
66   - public List<ShyContent> findshyContent(ShyContent shyContent) {
  68 + @Override
  69 + public List<ShyContent> findShyContent(ShyContent shyContent) {
67 70 return shyContentMapper.selectByRowBounds(shyContent, new RowBounds(0, 100));
68 71 }
69 72  
... ... @@ -72,6 +75,7 @@ public class ContentServiceImpl {
72 75 *
73 76 * @return
74 77 */
  78 + @Override
75 79 public List<ShyContent> findShyContentWithWebPage() {
76 80 List checkParamList = new ArrayList();
77 81 checkParamList.add("content");
... ... @@ -92,7 +96,8 @@ public class ContentServiceImpl {
92 96 * @param shyContent
93 97 * @return
94 98 */
95   - public boolean updateshyContent(ShyContent shyContent) {
  99 + @Override
  100 + public boolean updateShyContent(ShyContent shyContent) {
96 101 int result = shyContentMapper.updateByPrimaryKeySelective(shyContent);
97 102 if (result == 0) {
98 103 return false;
... ... @@ -106,6 +111,7 @@ public class ContentServiceImpl {
106 111 * @param shyContent
107 112 * @return
108 113 */
  114 + @Override
109 115 public boolean impotContent(ShyContent shyContent) {
110 116 int result = shyContentMapper.insertSelective(shyContent);
111 117 if (result == 0) {
... ... @@ -120,6 +126,7 @@ public class ContentServiceImpl {
120 126 * @param contentDTO
121 127 * @return
122 128 */
  129 + @Override
123 130 public PageInfo<ShyContent> getPage(ContentDTO contentDTO) {
124 131 Example example = new Example(ShyContent.class);
125 132 Example.Criteria criteria = example.createCriteria();
... ... @@ -172,6 +179,7 @@ public class ContentServiceImpl {
172 179 *
173 180 * @return
174 181 */
  182 + @Override
175 183 public List<ShyContent> findByCondition(ContentDTO contentDTO) {
176 184  
177 185 Example example = new Example(ShyContent.class);
... ... @@ -213,6 +221,7 @@ public class ContentServiceImpl {
213 221 * @param id
214 222 * @return
215 223 */
  224 + @Override
216 225 public ShyContent getDetailsContent(Integer id) {
217 226 ShyContent content = shyContentMapper.selectByPrimaryKey(id);
218 227 if (content.getReceive_status().equals(CommonConst.RECEIVE_AUDIT)) {
... ... @@ -245,6 +254,7 @@ public class ContentServiceImpl {
245 254 * @param updater
246 255 * @return
247 256 */
  257 + @Override
248 258 public boolean callback(String contentId, String msg, Integer state, String userId, String updater) {
249 259 boolean success = true;
250 260 ShyContent content = shyContentMapper.selectByPrimaryKey(Integer.parseInt(contentId));
... ... @@ -326,6 +336,7 @@ public class ContentServiceImpl {
326 336 * @param spid
327 337 * @return
328 338 */
  339 + @Override
329 340 public Integer receive(String ids, Integer num, String userId, Integer spid) {
330 341 Integer n = 0;
331 342 if (CommonUtils.isNotEmpty(ids)) {
... ... @@ -369,6 +380,7 @@ public class ContentServiceImpl {
369 380 * @param userId
370 381 * @return
371 382 */
  383 + @Override
372 384 public Integer retReceive(String ids, String userId) {
373 385 Integer n = 0;
374 386 String[] cids = ids.split(",");
... ... @@ -393,6 +405,7 @@ public class ContentServiceImpl {
393 405 * @param id
394 406 * @return
395 407 */
  408 + @Override
396 409 public ShyContent selectByPrimaryKey(Integer id) {
397 410 ShyContent shyContent = shyContentMapper.selectByPrimaryKey(id);
398 411 return shyContent;
... ... @@ -404,6 +417,7 @@ public class ContentServiceImpl {
404 417 * @param content
405 418 * @return
406 419 */
  420 + @Override
407 421 public int updateByPrimaryKeySelective(ShyContent content) {
408 422 return shyContentMapper.updateByPrimaryKeySelective(content);
409 423 }
... ... @@ -413,6 +427,7 @@ public class ContentServiceImpl {
413 427 *
414 428 * @param spId
415 429 */
  430 + @Override
416 431 public Integer getShenheType(Integer spId, String ContentTag) {
417 432 //获取图文免审sp
418 433 List<Integer> sites = sitesService.getBusinessList(CommonConst.BUSINESS_CONTENT);
... ... @@ -439,6 +454,7 @@ public class ContentServiceImpl {
439 454 * @param shyContent
440 455 * @return
441 456 */
  457 + @Override
442 458 public void contentFilter(ShyContent shyContent) {
443 459 logger.info("contentFilter接收的ShyContent对象:{}", shyContent.toString());
444 460 try {
... ...