Преглед изворни кода

Merge branch 'test' of ssh://anderx@git.jishutao.com:55555/jishutao/jitao-server.git into test

anderx пре 7 година
родитељ
комит
6cadf207bc

+ 2 - 0
src/main/java/com/goafanti/admin/controller/AdminVideoApiController.java

@@ -253,6 +253,8 @@ public class AdminVideoApiController extends CertifyApiController {
 		// 5.关闭线程池
 		service.shutdown();
 		// LOGGER.info("=============返回给前端=============");
+		
+		//System.out.println("task运行结果" +  result.get());
 		return "SUCESS";
 	}
 

+ 4 - 0
src/main/java/com/goafanti/admin/service/AdminVideoService.java

@@ -1,5 +1,7 @@
 package com.goafanti.admin.service;
 
+import java.util.List;
+
 import com.goafanti.admin.bo.AdminVideoBo;
 import com.goafanti.common.model.JtVideo;
 import com.goafanti.core.mybatis.page.Pagination;
@@ -19,4 +21,6 @@ public interface AdminVideoService {
 	
 	int nameCheck(String name);
 	
+	List<JtVideo> getAllVideoExcludeId(String id);
+	
 }

+ 6 - 0
src/main/java/com/goafanti/admin/service/impl/AdminVideoServiceImpl.java

@@ -2,6 +2,7 @@ package com.goafanti.admin.service.impl;
 
 import java.util.Date;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 
@@ -75,6 +76,11 @@ public class AdminVideoServiceImpl extends BaseMybatisDao<JtVideoMapper> impleme
 		return jtVideoMapper.nameCheck(name);
 	}
 
+	@Override
+	public List<JtVideo> getAllVideoExcludeId(String id) {
+		return jtVideoMapper.getAllVideoExcludeId(id);
+	}
+
 	
 
 }

+ 14 - 2
src/main/java/com/goafanti/common/controller/PortalController.java

@@ -222,7 +222,7 @@ public class PortalController extends BaseController {
 		
 		return modelAndView;
 	}
-	
+	
 	@RequestMapping(value="/portal/video",method = RequestMethod.GET)
 	public ModelAndView video(ModelAndView modelAndView){
 		modelAndView.setViewName("/portal/video/video");
@@ -237,5 +237,17 @@ public class PortalController extends BaseController {
 		result.setData(adminVideoService.getVideoList(video, pageNo, pageSize,2));
 		return result;
 	}
-
+	
+	//跳转视频详情
+	@RequestMapping(value="/open/protal/videoDetail", method = RequestMethod.GET)
+	public ModelAndView videoDetail(ModelAndView modelAndView,String id){
+		modelAndView.setViewName("/portal/video/videoDetail");
+		//获得视频信息
+		modelAndView.addObject("videoPlay",adminVideoService.getVideoById(id));
+		
+		//获得所有视频列表
+		modelAndView.addObject("videoList",adminVideoService.getAllVideoExcludeId(id));
+		
+		return modelAndView;
+	}
 }

+ 2 - 0
src/main/java/com/goafanti/common/dao/JtVideoMapper.java

@@ -85,4 +85,6 @@ public interface JtVideoMapper {
 	AdminVideoBo getIndexVideo(String summary);
 	
 	int nameCheck(String name);
+	
+	List<JtVideo> getAllVideoExcludeId(String id);
 }

+ 12 - 0
src/main/java/com/goafanti/common/mapper/JtVideoMapper.xml

@@ -523,4 +523,16 @@
   <select id="nameCheck" parameterType="java.lang.String" resultType="java.lang.Integer">
   	select count(*) from jt_video where status &lt; 3 and name = #{_parameter,jdbcType=VARCHAR}
   </select>
+  
+  <!-- 查看所有视频信息 -->
+  <select id="getAllVideoExcludeId" parameterType="java.lang.String" resultMap="BaseResultMap">
+  	select 
+     <include refid="Base_Column_List" />
+  	from jt_video
+    where 
+    transcoding = 2
+    and status = 1
+    and id &lt;&gt; #{_parameter,jdbcType=VARCHAR}
+    order by release_time desc
+  </select>
 </mapper>

+ 6 - 1
src/main/resources/props/config_prod.properties

@@ -63,4 +63,9 @@ patentTemplate=SMS_72005286
 
 avatar.host=//s.jishutao.com
 
-avatar.upload.host=//s.jishutao.com/upload
+avatar.upload.host=//s.jishutao.com/upload
+
+ffmpeg.path=/usr/bin/ffmpeg
+ffprobe.path=/usr/bin/ffprobe
+
+video.path=prod

+ 90 - 0
src/main/webapp/WEB-INF/views/portal/video/videoDetail.html

@@ -0,0 +1,90 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head th:replace="common::header(~{::title},~{::link})">
+		<meta charset="UTF-8">
+		<title>技淘网-技淘视频</title>
+		
+	<link th:href="${portalHost+'/dll/dll.css'}"  rel="stylesheet">
+	<link th:href="${portalHost+'/vendors.css'}" rel="stylesheet">
+	<link th:href="${portalHost+'/newMenu/videoDetail.css'}" rel="stylesheet">
+</head>
+	<body>
+		<div th:replace="common::nav('','videoDetail')"></div>  
+		<!-- 公共头部 -->
+		<div class="indexSearch">
+			<div class="search-inp">
+				<div class="input-group">
+					<input type="text" class="form-control demandSearch" placeholder="请输入视频名称">
+					<span class="input-group-btn">
+						<button class="btn btn-default searchBtn" type="button">
+							<img  th:src="${portalHost+'/img/newMenu/search-icon.jpg'}" alt=""> 搜索
+						</button>
+					</span>
+				</div>
+			</div>
+		</div>
+	   	<div class="videoBody">
+			<div class="videoCenter">
+			    <div class="videoPlay">
+					<video id="videoDe" controls="true" controlslist="nodownload">
+						<source th:src="${'http://118.190.205.7:8000' + videoPlay.url}"   type="video/mp4"/> 
+					</video>
+					<div class="share">
+						<div>
+							<img th:src="${portalHost+'/img/indedImg/share.png'}" alt=""> <span>分享</span>
+						</div>
+						<ul>
+							<li class="qqHy"></li>
+							<li class="qqKj"></li>
+							<li class="xlWb"></li>
+						</ul>
+					</div>
+				</div>
+				<div class="videoList">
+					<h3>技淘视频</h3>
+					<ul>
+						<!-- 放三个 -->
+						<li class="active">
+							<a th:href="@{/open/protal/videoDetail(id=${videoPlay.id})}">
+								<img th:src="${avatarUploadHost+videoPlay.coverUrl}" alt="">
+								<div class="txt">
+									<h4 th:text="${videoPlay.name}">申请军工三证72问</h4>
+									<!-- 2排字 -->
+									<p th:text="${#strings.abbreviate(videoPlay.summary,14)}">注意此处限制2排字注意此处限制2排字注意此处限制2排字注意此处限制2排字注意此处限制2排字</p>
+									<input type="hidden" th:value="${'http://118.190.205.7:8000' + videoPlay.url}"/>
+								</div>
+							</a>
+						</li>
+						<li th:each="list:${videoList}">
+							<a th:href="@{/open/protal/videoDetail(id=${list.id})}">
+							<img th:src="${avatarUploadHost+list.coverUrl}" alt="">
+							<div class="txt">
+								<h4 th:text="${list.name}">申请军工三证72问</h4>
+								<!-- 2排字 -->
+								<p th:text="${#strings.abbreviate(list.summary,14)}">注意此处限制2排字注意此处限制2排字注意此处限制2排字注意此处限制2排字注意此处限制2排字</p>
+								<input type="hidden" th:value="${'http://118.190.205.7:8000' + list.url}"/>
+							</div>
+							</a>
+						</li>
+						
+					</ul>
+				</div>
+			</div>
+			<h2 th:text="${videoPlay.name}">申请军工三证</h2>
+		</div>	
+		<div class="summary">
+			<h4>简介</h4>
+			<p th:text="${videoPlay.summary}">工资质条件的一句话简介简介简介军工资质条件的一句话简介简介简介</p>
+		</div>
+		<!-- 下面是公共底部 -->
+	<footer>
+        <div th:replace="common::copyright"></div>
+		<div th:replace="common::login"></div>
+    </footer>
+    <div th:replace="common::footer(~{::script})">
+    	<script type="text/javascript" th:src="${portalHost + '/dll/dll.js'}"></script>
+    	<script type="text/javascript" th:src="${portalHost + '/vendors.js'}"></script>
+		<script type="text/javascript" th:src="${portalHost+'/newMenu/videoDetail.js'}"></script>
+	</div>
+	</body>
+</html>