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,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",source);
  126 + }
  127 + if (CommonUtils.isNotEmpty(author)) {
  128 + criteria.andEqualTo("author",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
@@ -85,6 +85,24 @@ @@ -85,6 +85,24 @@
85 </div> 85 </div>
86 </div> 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 <div class="btn-group margin-bottom col-md-6" style="padding: 0;width: 10%;float: left;"> 106 <div class="btn-group margin-bottom col-md-6" style="padding: 0;width: 10%;float: left;">
89 <div class="col-md-5" style="padding: 0;width: 100%;"> 107 <div class="col-md-5" style="padding: 0;width: 100%;">
90 <label for="content_tag" class="control-label cb-toolbar">标签:</label> 108 <label for="content_tag" class="control-label cb-toolbar">标签:</label>
@@ -129,13 +147,15 @@ @@ -129,13 +147,15 @@
129 <input class="form-control" type="text" value="" id="sp_desc"> 147 <input class="form-control" type="text" value="" id="sp_desc">
130 </div> 148 </div>
131 </div> 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 <label for="count" class="control-label cb-toolbar">每页条数:</label> 152 <label for="count" class="control-label cb-toolbar">每页条数:</label>
134 <div class="col-sm-5" style="padding: 0;"> 153 <div class="col-sm-5" style="padding: 0;">
135 <input class="form-control" type="text" value="" id="count"> 154 <input class="form-control" type="text" value="" id="count">
136 </div> 155 </div>
137 </div> 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 <label for="contentId" class="control-label cb-toolbar">图文发布id:</label> 159 <label for="contentId" class="control-label cb-toolbar">图文发布id:</label>
140 <div class="col-sm-5" style="padding: 0;"> 160 <div class="col-sm-5" style="padding: 0;">
141 <input class="form-control" type="text" value="" id="contentId"> 161 <input class="form-control" type="text" value="" id="contentId">
@@ -408,6 +428,8 @@ @@ -408,6 +428,8 @@
408 } 428 }
409 429
410 var title = ""; 430 var title = "";
  431 + var source = "";
  432 + var author = "";
411 var start_date =""; 433 var start_date ="";
412 var end_date = ""; 434 var end_date = "";
413 var sp_desc =""; 435 var sp_desc ="";
@@ -417,6 +439,8 @@ @@ -417,6 +439,8 @@
417 439
418 function updateValue(){ 440 function updateValue(){
419 title = $("#video_titleID").val(); 441 title = $("#video_titleID").val();
  442 + source = $("#source").val();
  443 + author = $("#author").val();
420 start_date = $("#start_date").val(); 444 start_date = $("#start_date").val();
421 end_date = $("#end_date").val(); 445 end_date = $("#end_date").val();
422 var spId=[[${session.sessionUser.spid}]]; 446 var spId=[[${session.sessionUser.spid}]];
@@ -433,32 +457,32 @@ @@ -433,32 +457,32 @@
433 function quanbu() { 457 function quanbu() {
434 updateValue(); 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 $('#daishen').click(function () { 464 $('#daishen').click(function () {
441 updateValue(); 465 updateValue();
442 var receive_status = 0; 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 $('#Mydaishen').click(function () { 470 $('#Mydaishen').click(function () {
447 updateValue(); 471 updateValue();
448 var receive_status = 1; 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 $('#yishen').click(function () { 476 $('#yishen').click(function () {
453 updateValue(); 477 updateValue();
454 var receive_status = 2; 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 $('#videos_query').click(function () { 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 $('#select_all').click(function () { 488 $('#select_all').click(function () {