Commit 0a2cdf7e066113e4c80bbd4fe104be1859bec18f

Authored by 徐近程
1 parent 43819bbc

图文审核根据昵称和sid查询

src/main/java/com/cnlive/shenhe/controller/ContentController.java
... ... @@ -61,13 +61,17 @@ public class ContentController extends BaseController {
61 61  
62 62 /**
63 63 * 图文列表
64   - *
  64 + *
65 65 * @param model
66 66 * @param title
  67 + * @param contentId
  68 + * @param content_tag
67 69 * @param start_date
68 70 * @param end_date
69 71 * @param receive_status
70 72 * @param sp_desc
  73 + * @param source
  74 + * @param author
71 75 * @param page
72 76 * @param pageSize
73 77 * @param orderByClause
... ... @@ -76,7 +80,7 @@ public class ContentController extends BaseController {
76 80 */
77 81 @GetMapping("/page")
78 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 84 Integer page, Integer pageSize, String orderByClause, HttpSession session) {
81 85 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
82 86 if(CommonUtils.isNull(sessionUser)){
... ... @@ -112,7 +116,7 @@ public class ContentController extends BaseController {
112 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 120 List<ShyContent> list = contentPage.getList();
117 121 if (!list.isEmpty()) {
118 122 for (ShyContent content : list) {
... ...
src/main/java/com/cnlive/shenhe/serviceImpl/ContentServiceImpl.java
... ... @@ -104,7 +104,7 @@ public class ContentServiceImpl {
104 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 108 Example example = new Example(ShyContent.class);
109 109 Example.Criteria criteria = example.createCriteria();
110 110 if (CommonUtils.isNotEmpty(orderByClause)) {
... ... @@ -121,6 +121,12 @@ public class ContentServiceImpl {
121 121 if (CommonUtils.isNotEmpty(title)) {
122 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 130 if (CommonUtils.isNotEmpty(updater)) {
125 131 criteria.andEqualTo("updater", updater);
126 132 }
... ...
src/main/resources/templates/page/content.html
... ... @@ -129,13 +129,29 @@
129 129 <input class="form-control" type="text" value="" id="sp_desc">
130 130 </div>
131 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 148 <label for="count" class="control-label cb-toolbar">每页条数:</label>
134 149 <div class="col-sm-5" style="padding: 0;">
135 150 <input class="form-control" type="text" value="" id="count">
136 151 </div>
137 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 155 <label for="contentId" class="control-label cb-toolbar">图文发布id:</label>
140 156 <div class="col-sm-5" style="padding: 0;">
141 157 <input class="form-control" type="text" value="" id="contentId">
... ...