Commit 1189b26a82be0c6ad64b034a6b6120fc99c44bec
1 parent
9f2fd237
update
Showing
3 changed files
with
6 additions
and
6 deletions
src/main/java/com/cnlive/shenhe/controller/CommentsController.java
| ... | ... | @@ -15,9 +15,7 @@ import org.springframework.web.bind.annotation.PostMapping; |
| 15 | 15 | import org.springframework.web.bind.annotation.RequestBody; |
| 16 | 16 | import org.springframework.web.bind.annotation.RequestMapping; |
| 17 | 17 | import org.springframework.web.bind.annotation.ResponseBody; |
| 18 | - | |
| 19 | 18 | import java.util.Arrays; |
| 20 | -import java.util.HashMap; | |
| 21 | 19 | import java.util.List; |
| 22 | 20 | |
| 23 | 21 | /** |
| ... | ... | @@ -95,7 +93,7 @@ public class CommentsController { |
| 95 | 93 | * @param json |
| 96 | 94 | * @return |
| 97 | 95 | */ |
| 98 | - @RequestMapping("/shenheComment") | |
| 96 | + @PostMapping("/shenheComment") | |
| 99 | 97 | @ResponseBody |
| 100 | 98 | public ResponseBean shenheInfo(@RequestBody JSONObject json){ |
| 101 | 99 | Pass.commentPass(json); | ... | ... |
src/main/java/com/cnlive/shenhe/serviceImpl/CommentsServiceImpl.java
| ... | ... | @@ -3,7 +3,6 @@ package com.cnlive.shenhe.serviceImpl; |
| 3 | 3 | import com.alibaba.fastjson.JSONObject; |
| 4 | 4 | import com.cnlive.shenhe.entity.AcpComments; |
| 5 | 5 | import com.cnlive.shenhe.entity.ShySites; |
| 6 | -import com.cnlive.shenhe.entity.ShyVideos; | |
| 7 | 6 | import com.cnlive.shenhe.mapper.AcpCommentsMapper; |
| 8 | 7 | import com.cnlive.shenhe.mapper.ShySitesMapper; |
| 9 | 8 | import com.cnlive.shenhe.utils.CommonUtils; |
| ... | ... | @@ -43,7 +42,7 @@ public class CommentsServiceImpl { |
| 43 | 42 | acpComments.setId(id); |
| 44 | 43 | acpComments.setState(json.getInteger("state")); |
| 45 | 44 | acpComments.setMsg(json.getString("msg")); |
| 46 | - int result = acpCommentsMapper.updateByPrimaryKey(acpComments); | |
| 45 | + int result = acpCommentsMapper.updateByPrimaryKeySelective(acpComments); | |
| 47 | 46 | return result; |
| 48 | 47 | } |
| 49 | 48 | public PageInfo<AcpComments> getListComments(String activity_id,String content,Integer is_hot,String start_date,String end_date,Integer state,String auditor,Integer page,Integer pageSize,String orderByClause){ |
| ... | ... | @@ -59,6 +58,9 @@ public class CommentsServiceImpl { |
| 59 | 58 | if (CommonUtils.isNotEmpty(content)){ |
| 60 | 59 | criteria.andLike("comment_content", "%" + content + "%"); |
| 61 | 60 | } |
| 61 | + if (CommonUtils.isNotEmpty(auditor)){ | |
| 62 | + criteria.andEqualTo("auditor", auditor ); | |
| 63 | + } | |
| 62 | 64 | if (CommonUtils.isNotNull(is_hot)){ |
| 63 | 65 | criteria.andEqualTo("is_hot", is_hot ); |
| 64 | 66 | } | ... | ... |
src/main/java/com/cnlive/shenhe/serviceImpl/VideosServiceImpl.java
| ... | ... | @@ -41,7 +41,7 @@ public class VideosServiceImpl { |
| 41 | 41 | shyVideos.setState(state); |
| 42 | 42 | shyVideos.setVideo_tags(attr_tags); |
| 43 | 43 | shyVideos.setMsg(msg); |
| 44 | - return shyVideosMapper.updateByPrimaryKey(shyVideos); | |
| 44 | + return shyVideosMapper.updateByPrimaryKeySelective(shyVideos); | |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | public PageInfo<ShyVideos> getListContent(String video_title, String start_date,String end_date,Integer state, Integer page, Integer pageSize, String orderByClause, Integer spid){ | ... | ... |