Commit 1189b26a82be0c6ad64b034a6b6120fc99c44bec

Authored by 陈浩
1 parent 9f2fd237

update

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