Commit afe0d390185a84ac27620f981fbecb068eaf1677

Authored by 徐近程
2 parents 3646e745 31b25e6a

Merge branch 'dev'

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",source);
  126 + }
  127 + if (CommonUtils.isNotEmpty(author)) {
  128 + criteria.andEqualTo("author",author);
  129 + }
124 130 if (CommonUtils.isNotEmpty(updater)) {
125 131 criteria.andEqualTo("updater", updater);
126 132 }
... ...
src/main/resources/templates/page/content.html
... ... @@ -85,6 +85,24 @@
85 85 </div>
86 86 </div>
87 87  
  88 + <div class="btn-group margin-bottom col-md-6" style="padding: 0;width: 23%;float: left;">
  89 + <div class="col-md-5" style="padding: 0;width: 100%;">
  90 + <label for="source" class="control-label cb-toolbar">来源(昵称):</label>
  91 + <div class="col-sm-9" style="padding: 0;">
  92 + <input class="form-control" type="text" value="" id="source">
  93 + </div>
  94 + </div>
  95 + </div>
  96 +
  97 + <div class="btn-group margin-bottom col-md-6" style="padding: 0;width: 23%;float: left;">
  98 + <div class="col-md-5" style="padding: 0;width: 100%;">
  99 + <label for="author" class="control-label cb-toolbar">作者(sid):</label>
  100 + <div class="col-sm-9" style="padding: 0;">
  101 + <input class="form-control" type="text" value="" id="author">
  102 + </div>
  103 + </div>
  104 + </div>
  105 +
88 106 <div class="btn-group margin-bottom col-md-6" style="padding: 0;width: 10%;float: left;">
89 107 <div class="col-md-5" style="padding: 0;width: 100%;">
90 108 <label for="content_tag" class="control-label cb-toolbar">标签:</label>
... ... @@ -129,13 +147,15 @@
129 147 <input class="form-control" type="text" value="" id="sp_desc">
130 148 </div>
131 149 </div>
132   - <div class="col-md-6" style="padding: 0;width: 15%;" th:if="${session.sessionUser.spid==0}">
  150 +
  151 + <div class="col-md-6" style="padding: 0;width: 15%;" th:if="${session.sessionUser.spid==0}">
133 152 <label for="count" class="control-label cb-toolbar">每页条数:</label>
134 153 <div class="col-sm-5" style="padding: 0;">
135 154 <input class="form-control" type="text" value="" id="count">
136 155 </div>
137 156 </div>
138   - <div class="col-md-6" style="padding: 0;width: 20%;" th:if="${session.sessionUser.spid==0}">
  157 +
  158 + <div class="col-md-6" style="padding: 0;width: 20%;" th:if="${session.sessionUser.spid==0}">
139 159 <label for="contentId" class="control-label cb-toolbar">图文发布id:</label>
140 160 <div class="col-sm-5" style="padding: 0;">
141 161 <input class="form-control" type="text" value="" id="contentId">
... ... @@ -408,6 +428,8 @@
408 428 }
409 429  
410 430 var title = "";
  431 + var source = "";
  432 + var author = "";
411 433 var start_date ="";
412 434 var end_date = "";
413 435 var sp_desc ="";
... ... @@ -417,6 +439,8 @@
417 439  
418 440 function updateValue(){
419 441 title = $("#video_titleID").val();
  442 + source = $("#source").val();
  443 + author = $("#author").val();
420 444 start_date = $("#start_date").val();
421 445 end_date = $("#end_date").val();
422 446 var spId=[[${session.sessionUser.spid}]];
... ... @@ -433,32 +457,32 @@
433 457 function quanbu() {
434 458 updateValue();
435 459  
436   - window.location.href = "/content/page?title=" + title + "&start_date=" + start_date + "&end_date=" + end_date + "&sp_desc=" + sp_desc+"&pageSize="+count+"&contentId="+contentId+"&content_tag="+content_tag;
  460 + window.location.href = "/content/page?title=" + title + "&source=" + source + "&author=" + author + "&start_date=" + start_date + "&end_date=" + end_date + "&sp_desc=" + sp_desc+"&pageSize="+count+"&contentId="+contentId+"&content_tag="+content_tag;
437 461 }
438 462  
439 463 //全部待领
440 464 $('#daishen').click(function () {
441 465 updateValue();
442 466 var receive_status = 0;
443   - window.location.href = "/content/page?title=" + title + "&start_date=" + start_date + "&end_date=" + end_date + "&receive_status=" + receive_status + "&sp_desc=" + sp_desc+"&pageSize="+count+"&contentId="+contentId+"&content_tag="+content_tag;
  467 + window.location.href = "/content/page?title=" + title + "&source=" + source + "&author=" + author + "&start_date=" + start_date + "&end_date=" + end_date + "&receive_status=" + receive_status + "&sp_desc=" + sp_desc+"&pageSize="+count+"&contentId="+contentId+"&content_tag="+content_tag;
444 468 });
445 469 //我的待审核
446 470 $('#Mydaishen').click(function () {
447 471 updateValue();
448 472 var receive_status = 1;
449   - window.location.href = "/content/page?title=" + title + "&start_date=" + start_date + "&end_date=" + end_date + "&receive_status=" + receive_status + "&sp_desc=" + sp_desc+"&pageSize="+count+"&contentId="+contentId+"&content_tag="+content_tag;
  473 + window.location.href = "/content/page?title=" + title + "&source=" + source + "&author=" + author + "&start_date=" + start_date + "&end_date=" + end_date + "&receive_status=" + receive_status + "&sp_desc=" + sp_desc+"&pageSize="+count+"&contentId="+contentId+"&content_tag="+content_tag;
450 474 });
451 475 //我的已审核
452 476 $('#yishen').click(function () {
453 477 updateValue();
454 478 var receive_status = 2;
455   - window.location.href = "/content/page?title=" + title + "&start_date=" + start_date + "&end_date=" + end_date + "&receive_status=" + receive_status + "&sp_desc=" + sp_desc+"&pageSize="+count+"&contentId="+contentId+"&content_tag="+content_tag;
  479 + window.location.href = "/content/page?title=" + title + "&source=" + source + "&author=" + author + "&start_date=" + start_date + "&end_date=" + end_date + "&receive_status=" + receive_status + "&sp_desc=" + sp_desc+"&pageSize="+count+"&contentId="+contentId+"&content_tag="+content_tag;
456 480 });
457 481  
458 482  
459 483 //查询
460 484 $('#videos_query').click(function () {
461   - window.location.href = "/content/page?title=" + title + "&start_date=" + start_date + "&end_date=" + end_date + "&receive_status=" + "&sp_desc=" + sp_desc+"&pageSize="+count+"&contentId="+contentId+"&content_tag="+content_tag;
  485 + window.location.href = "/content/page?title=" + title +"&source=" + source + "&author=" + author + "&start_date=" + start_date + "&end_date=" + end_date + "&receive_status=" + "&sp_desc=" + sp_desc+"&pageSize="+count+"&contentId="+contentId+"&content_tag="+content_tag;
462 486 });
463 487 /*全选的操作*/
464 488 $('#select_all').click(function () {
... ...