Commit 0a2cdf7e066113e4c80bbd4fe104be1859bec18f
1 parent
43819bbc
图文审核根据昵称和sid查询
Showing
3 changed files
with
32 additions
and
6 deletions
src/main/java/com/cnlive/shenhe/controller/ContentController.java
| @@ -61,13 +61,17 @@ public class ContentController extends BaseController { | @@ -61,13 +61,17 @@ public class ContentController extends BaseController { | ||
| 61 | 61 | ||
| 62 | /** | 62 | /** |
| 63 | * 图文列表 | 63 | * 图文列表 |
| 64 | - * | 64 | + * |
| 65 | * @param model | 65 | * @param model |
| 66 | * @param title | 66 | * @param title |
| 67 | + * @param contentId | ||
| 68 | + * @param content_tag | ||
| 67 | * @param start_date | 69 | * @param start_date |
| 68 | * @param end_date | 70 | * @param end_date |
| 69 | * @param receive_status | 71 | * @param receive_status |
| 70 | * @param sp_desc | 72 | * @param sp_desc |
| 73 | + * @param source | ||
| 74 | + * @param author | ||
| 71 | * @param page | 75 | * @param page |
| 72 | * @param pageSize | 76 | * @param pageSize |
| 73 | * @param orderByClause | 77 | * @param orderByClause |
| @@ -76,7 +80,7 @@ public class ContentController extends BaseController { | @@ -76,7 +80,7 @@ public class ContentController extends BaseController { | ||
| 76 | */ | 80 | */ |
| 77 | @GetMapping("/page") | 81 | @GetMapping("/page") |
| 78 | public String getPage(Model model, String title,String contentId, String content_tag, | 82 | public String getPage(Model model, String title,String contentId, String content_tag, |
| 79 | - String start_date, String end_date, Integer receive_status, String sp_desc, | 83 | + String start_date, String end_date, Integer receive_status, String sp_desc,String source,String author, |
| 80 | Integer page, Integer pageSize, String orderByClause, HttpSession session) { | 84 | Integer page, Integer pageSize, String orderByClause, HttpSession session) { |
| 81 | SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); | 85 | SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); |
| 82 | if(CommonUtils.isNull(sessionUser)){ | 86 | if(CommonUtils.isNull(sessionUser)){ |
| @@ -112,7 +116,7 @@ public class ContentController extends BaseController { | @@ -112,7 +116,7 @@ public class ContentController extends BaseController { | ||
| 112 | } catch (Exception e) { | 116 | } catch (Exception e) { |
| 113 | } | 117 | } |
| 114 | } | 118 | } |
| 115 | - PageInfo<ShyContent> contentPage = contentService.getPage( title,content_tag,contentId, sDate, eDate, receive_status, null, page, pageSize, orderByClause, spid, userId); | 119 | + PageInfo<ShyContent> contentPage = contentService.getPage( title,source,author,content_tag,contentId, sDate, eDate, receive_status, null, page, pageSize, orderByClause, spid, userId); |
| 116 | List<ShyContent> list = contentPage.getList(); | 120 | List<ShyContent> list = contentPage.getList(); |
| 117 | if (!list.isEmpty()) { | 121 | if (!list.isEmpty()) { |
| 118 | for (ShyContent content : list) { | 122 | for (ShyContent content : list) { |
src/main/java/com/cnlive/shenhe/serviceImpl/ContentServiceImpl.java
| @@ -104,7 +104,7 @@ public class ContentServiceImpl { | @@ -104,7 +104,7 @@ public class ContentServiceImpl { | ||
| 104 | return shyCommentsMapper.updateByPrimaryKeySelective(shyComments); | 104 | return shyCommentsMapper.updateByPrimaryKeySelective(shyComments); |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | - public PageInfo<ShyContent> getPage( String title,String content_tag,String contentId, Date start_date, Date end_date, Integer receive_status, String updater, Integer page, Integer pageSize, String orderByClause, Integer spid, String userId) { | 107 | + public PageInfo<ShyContent> getPage( String title,String source,String author,String content_tag,String contentId, Date start_date, Date end_date, Integer receive_status, String updater, Integer page, Integer pageSize, String orderByClause, Integer spid, String userId) { |
| 108 | Example example = new Example(ShyContent.class); | 108 | Example example = new Example(ShyContent.class); |
| 109 | Example.Criteria criteria = example.createCriteria(); | 109 | Example.Criteria criteria = example.createCriteria(); |
| 110 | if (CommonUtils.isNotEmpty(orderByClause)) { | 110 | if (CommonUtils.isNotEmpty(orderByClause)) { |
| @@ -121,6 +121,12 @@ public class ContentServiceImpl { | @@ -121,6 +121,12 @@ public class ContentServiceImpl { | ||
| 121 | if (CommonUtils.isNotEmpty(title)) { | 121 | if (CommonUtils.isNotEmpty(title)) { |
| 122 | criteria.andLike("title", "%" + title + "%"); | 122 | criteria.andLike("title", "%" + title + "%"); |
| 123 | } | 123 | } |
| 124 | + if (CommonUtils.isNotEmpty(source)) { | ||
| 125 | + criteria.andEqualTo(source); | ||
| 126 | + } | ||
| 127 | + if (CommonUtils.isNotEmpty(author)) { | ||
| 128 | + criteria.andEqualTo(author); | ||
| 129 | + } | ||
| 124 | if (CommonUtils.isNotEmpty(updater)) { | 130 | if (CommonUtils.isNotEmpty(updater)) { |
| 125 | criteria.andEqualTo("updater", updater); | 131 | criteria.andEqualTo("updater", updater); |
| 126 | } | 132 | } |
src/main/resources/templates/page/content.html
| @@ -129,13 +129,29 @@ | @@ -129,13 +129,29 @@ | ||
| 129 | <input class="form-control" type="text" value="" id="sp_desc"> | 129 | <input class="form-control" type="text" value="" id="sp_desc"> |
| 130 | </div> | 130 | </div> |
| 131 | </div> | 131 | </div> |
| 132 | - <div class="col-md-6" style="padding: 0;width: 15%;" th:if="${session.sessionUser.spid==0}"> | 132 | + |
| 133 | + <div class="col-md-6" style="padding: 0;width: 25%;" th:if="${session.sessionUser.spid==0}"> | ||
| 134 | + <label for="source" class="control-label cb-toolbar">来源(昵称):</label> | ||
| 135 | + <div class="col-sm-7" style="padding: 0;"> | ||
| 136 | + <input class="form-control" type="text" value="" id="source"> | ||
| 137 | + </div> | ||
| 138 | + </div> | ||
| 139 | + | ||
| 140 | + <div class="col-md-6" style="padding: 0;width: 25%;" th:if="${session.sessionUser.spid==0}"> | ||
| 141 | + <label for="author" class="control-label cb-toolbar">作者(sid):</label> | ||
| 142 | + <div class="col-sm-7" style="padding: 0;"> | ||
| 143 | + <input class="form-control" type="text" value="" id="author"> | ||
| 144 | + </div> | ||
| 145 | + </div> | ||
| 146 | + | ||
| 147 | + <div class="col-md-6" style="padding: 0;width: 15%;" th:if="${session.sessionUser.spid==0}"> | ||
| 133 | <label for="count" class="control-label cb-toolbar">每页条数:</label> | 148 | <label for="count" class="control-label cb-toolbar">每页条数:</label> |
| 134 | <div class="col-sm-5" style="padding: 0;"> | 149 | <div class="col-sm-5" style="padding: 0;"> |
| 135 | <input class="form-control" type="text" value="" id="count"> | 150 | <input class="form-control" type="text" value="" id="count"> |
| 136 | </div> | 151 | </div> |
| 137 | </div> | 152 | </div> |
| 138 | - <div class="col-md-6" style="padding: 0;width: 20%;" th:if="${session.sessionUser.spid==0}"> | 153 | + |
| 154 | + <div class="col-md-6" style="padding: 0;width: 20%;" th:if="${session.sessionUser.spid==0}"> | ||
| 139 | <label for="contentId" class="control-label cb-toolbar">图文发布id:</label> | 155 | <label for="contentId" class="control-label cb-toolbar">图文发布id:</label> |
| 140 | <div class="col-sm-5" style="padding: 0;"> | 156 | <div class="col-sm-5" style="padding: 0;"> |
| 141 | <input class="form-control" type="text" value="" id="contentId"> | 157 | <input class="form-control" type="text" value="" id="contentId"> |