Commit 1efe139460aa3c03766a65739f406c3fd9ccb92d

Authored by 徐近程
1 parent 80c395c7

update

src/main/java/com/cnlive/shenhe/controller/VideosController.java
... ... @@ -115,7 +115,7 @@ public class VideosController extends BaseController {
115 115 * @return
116 116 */
117 117 @GetMapping("/page")
118   - 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, String sp_Id, HttpSession session) {
  118 + 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, String sp_Id,Integer source, HttpSession session) {
119 119 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
120 120 if (CommonUtils.isNull(sessionUser)) {
121 121 return "redirect:/users/login";
... ... @@ -136,7 +136,7 @@ public class VideosController extends BaseController {
136 136 } else if (CommonUtils.isEmpty(sp_desc) && spid == 0) {
137 137 spid = null;
138 138 }
139   - PageInfo<ShyVideos> videoPage = videosService.getListContent(video_title, start_date, end_date, state, receive, page, pageSize, video_priority, orderByClause, spid, userId,sp_Id);
  139 + PageInfo<ShyVideos> videoPage = videosService.getListContent(video_title, start_date, end_date, state, receive, page, pageSize, video_priority, orderByClause, spid, userId,sp_Id,source);
140 140 List<ShyVideos> list = videoPage.getList();
141 141 if (!list.isEmpty()) {
142 142 for (ShyVideos videos : list) {
... ... @@ -160,14 +160,14 @@ public class VideosController extends BaseController {
160 160 if (CommonUtils.isNotNull(shySites)) {
161 161 if (CommonUtils.isNotEmpty(videos.getCategory()) && videos.getCategory().equals(CommonConst.CATEGORY_WITNESS)) {
162 162 //0-目击者 1-童声共济 2-全民健身 3-目击者政府监督 4-美食中国 5-老年大学
163   - String source = videos.getSource();
164   - if ("1".equals(source)) {
  163 + String source1 = videos.getSource();
  164 + if ("1".equals(source1)) {
165 165 videos.setSpid_desc("童声共济" + "(目击者)");
166   - } else if ("2".equals(source)) {
  166 + } else if ("2".equals(source1)) {
167 167 videos.setSpid_desc("全民健身" + "(目击者)");
168   - } else if ("4".equals(source)) {
  168 + } else if ("4".equals(source1)) {
169 169 videos.setSpid_desc("美食中国" + "(目击者)");
170   - } else if ("5".equals(source)) {
  170 + } else if ("5".equals(source1)) {
171 171 videos.setSpid_desc("老年大学" + "(目击者)");
172 172 } else {
173 173 videos.setSpid_desc(shySites.getName() + "(目击者)");
... ...
src/main/java/com/cnlive/shenhe/serviceImpl/VideosServiceImpl.java
... ... @@ -109,7 +109,7 @@ public class VideosServiceImpl {
109 109 return shyVideosMapper.updateByPrimaryKey(shyVideos);
110 110 }
111 111  
112   - 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, String sp_Id) {
  112 + 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, String sp_Id,Integer source) {
113 113 Example example = new Example(ShyVideos.class);
114 114 Example.Criteria criteria = example.createCriteria();
115 115 Example.Criteria criteria2 = example.createCriteria();
... ... @@ -142,6 +142,11 @@ public class VideosServiceImpl {
142 142 criteria2.andEqualTo("video_priority", video_priority);
143 143 }
144 144  
  145 + if (CommonUtils.isNotEmpty(video_priority)) {
  146 + criteria.andEqualTo("source", source);
  147 + criteria2.andEqualTo("source", source);
  148 + }
  149 +
145 150 if (CommonUtils.isNotNull(spid)) {
146 151 criteria.andEqualTo("spid", spid);
147 152 criteria2.andEqualTo("spid", spid);
... ...
src/main/resources/templates/page/video.html
... ... @@ -100,6 +100,29 @@
100 100 </div>
101 101 </div>
102 102  
  103 + <div class="btn-group margin-bottom col-md-6" style="padding: 0;width: 10%;float: left;">
  104 + <div class="col-md-5" style="padding: 0;width: 100%;">
  105 + <label for="state" class="control-label cb-toolbar">目击者分类:</label>
  106 + <div class="col-sm-8" style="padding: 0;">
  107 + <select class="form-control" id="source" name="source">
  108 + <option value="">全部</option>
  109 + <option value="0">上传目击者视频</option>
  110 + <option value="1">童声共济视频</option>
  111 + <option value="2">全民健身视频</option>
  112 + <option value="3">问政监管视频</option>
  113 + <option value="4">中国网老年大学视频</option>
  114 + <option value="5">美食中国视频</option>
  115 + <option value="6">旅游摄影大赛视频</option>
  116 + <option value="7">全国老年大学公开课评选活动</option>
  117 + <option value="8">甲申同文</option>
  118 + <option value="9">中国老年大学艺术团万人同唱一首歌</option>
  119 + <option value="10">孩子声音上太空视频</option>
  120 + </select>
  121 + <!--<input class="form-control" name="video_priority" type="text" id="video_priority">-->
  122 + </div>
  123 + </div>
  124 + </div>
  125 +
103 126 <div class="btn-group margin-bottom col-md-6 pull-right"
104 127 style="position: relative;width: 75%;float: left !important;">
105 128 <div class="col-md-18" style="width: 100%;padding: 0;">
... ...