Commit 0282c7141391ca193b6c15c8bc6d2bef0def677e
1 parent
4baea1b6
修改字段
Showing
4 changed files
with
7 additions
and
7 deletions
src/main/java/com/cnlive/shenhe/controller/CommentsController.java
| ... | ... | @@ -53,7 +53,7 @@ public class CommentsController { |
| 53 | 53 | */ |
| 54 | 54 | @GetMapping("/page") |
| 55 | 55 | public String getPage(Model model, String activity_id, String content, Integer is_hot, |
| 56 | - String start_date, String end_date, String state, Boolean receive, | |
| 56 | + String start_date, String end_date, String state, Integer receive, | |
| 57 | 57 | Integer page, Integer pageSize, String orderByClause, HttpSession session) { |
| 58 | 58 | SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); |
| 59 | 59 | Integer spid = sessionUser.getSpid(); | ... | ... |
src/main/java/com/cnlive/shenhe/controller/VideosController.java
| ... | ... | @@ -112,7 +112,7 @@ public class VideosController { |
| 112 | 112 | * @return |
| 113 | 113 | */ |
| 114 | 114 | @GetMapping("/page") |
| 115 | - public Object getListVideos(Model model, String video_title, String start_date, String end_date, Integer state, Boolean receive, Integer page, Integer pageSize, String video_priority, String orderByClause, String sp_desc, HttpSession session) { | |
| 115 | + public Object getListVideos(Model model, String video_title, String start_date, String end_date, Integer state, Integer receive, Integer page, Integer pageSize, String video_priority, String orderByClause, String sp_desc, HttpSession session) { | |
| 116 | 116 | SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); |
| 117 | 117 | Integer spid = sessionUser.getSpid(); |
| 118 | 118 | String userId = sessionUser.getUserId(); |
| ... | ... | @@ -153,7 +153,7 @@ public class VideosController { |
| 153 | 153 | String state1 = state == null ? "" : state.toString(); |
| 154 | 154 | String receive1 = ""; |
| 155 | 155 | if (CommonUtils.isNotNull(receive)) { |
| 156 | - receive1 = receive ? "true" : "false"; | |
| 156 | + receive1 = receive==CommonConst.RECEIVE_AFTER ? "true" : "false"; | |
| 157 | 157 | } else { |
| 158 | 158 | receive1 = ""; |
| 159 | 159 | } | ... | ... |
src/main/java/com/cnlive/shenhe/serviceImpl/CommentsServiceImpl.java
| ... | ... | @@ -75,7 +75,7 @@ public class CommentsServiceImpl { |
| 75 | 75 | return shyCommentsMapper.updateByPrimaryKeySelective(shyComments); |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | - public PageInfo<ShyComments> getPage(String activity_id, String content, Integer is_hot, Date start_date, Date end_date, String states, Boolean receive, String updater, Integer page, Integer pageSize, String orderByClause, Integer spid, String userId) { | |
| 78 | + public PageInfo<ShyComments> getPage(String activity_id, String content, Integer is_hot, Date start_date, Date end_date, String states, Integer receive, String updater, Integer page, Integer pageSize, String orderByClause, Integer spid, String userId) { | |
| 79 | 79 | Example example = new Example(ShyComments.class); |
| 80 | 80 | Example.Criteria criteria = example.createCriteria(); |
| 81 | 81 | if (CommonUtils.isNotEmpty(orderByClause)) { |
| ... | ... | @@ -104,7 +104,7 @@ public class CommentsServiceImpl { |
| 104 | 104 | } |
| 105 | 105 | if (CommonUtils.isNotNull(receive)) { |
| 106 | 106 | criteria.andEqualTo("receive", receive); |
| 107 | - if (receive) { | |
| 107 | + if (receive==CommonConst.RECEIVE_AFTER) { | |
| 108 | 108 | criteria.andEqualTo("receive_user_id", userId); |
| 109 | 109 | } |
| 110 | 110 | } | ... | ... |
src/main/java/com/cnlive/shenhe/serviceImpl/VideosServiceImpl.java
| ... | ... | @@ -112,7 +112,7 @@ public class VideosServiceImpl { |
| 112 | 112 | return shyVideosMapper.updateByPrimaryKey(shyVideos); |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | - public PageInfo<ShyVideos> getListContent(String video_title, String start_date, String end_date, Integer state, Boolean receive, Integer page, Integer pageSize, String video_priority, String orderByClause, Integer spid, String userId) { | |
| 115 | + public PageInfo<ShyVideos> getListContent(String video_title, String start_date, String end_date, Integer state, Integer receive, Integer page, Integer pageSize, String video_priority, String orderByClause, Integer spid, String userId) { | |
| 116 | 116 | Example example = new Example(ShyVideos.class); |
| 117 | 117 | Example.Criteria criteria = example.createCriteria(); |
| 118 | 118 | Example.Criteria criteria2 = example.createCriteria(); |
| ... | ... | @@ -149,7 +149,7 @@ public class VideosServiceImpl { |
| 149 | 149 | if (CommonUtils.isNotNull(receive)) { |
| 150 | 150 | criteria.andEqualTo("receive", receive); |
| 151 | 151 | criteria2.andEqualTo("receive", receive); |
| 152 | - if (receive == true) { | |
| 152 | + if (receive == CommonConst.RECEIVE_AFTER) { | |
| 153 | 153 | criteria.andEqualTo("receive_user_id", userId); |
| 154 | 154 | criteria2.andEqualTo("receive_user_id", userId); |
| 155 | 155 | } | ... | ... |