Browse Source

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

anderx 7 years ago
parent
commit
ed436d1b71

+ 24 - 8
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -3,6 +3,7 @@ package com.goafanti.common.controller;
 
 import java.util.Arrays;
 import java.util.Date;
+import java.util.Iterator;
 import java.util.List;
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
@@ -761,7 +762,7 @@ public class WebpageController extends BaseController {
 		}
 		modelview.addObject("projects", jtBusinessProjects);
 		List<PolicyResult> policies = (List<PolicyResult>) policyService
-				.searchPolicy("", 2, null, null, "web_index", 1, 2, null).getList();
+				.searchPolicy("", 2, null, null, "web_index", 1, 3, null).getList();
 		for (PolicyResult p : policies) {
 			if (null != p.getTitleImg() && p.getTitleImg().contains(",")) {
 				p.setTitleImg(p.getTitleImg().substring(0, p.getTitleImg().indexOf(",")));
@@ -769,11 +770,11 @@ public class WebpageController extends BaseController {
 		}
 		modelview.addObject("policys", policies);//政策
 		List<News> newsList = (List<News>) newsService
-				.listNews(0, null, null, null, null, null, null, 1, 3, "2", null, null).getList();
+				.listNews(0, null, null, null, null, null, null, 1, 3, "2", null, null,null).getList();
 		modelview.addObject("news", newsList);//资讯
 		//
 		List<News> subscriptions = (List<News>) newsService
-				.listNews(99, null, null, null, null, null, null, 1, 4, "2", null, null).getList();
+				.listNews(99, null, null, null, null, null, null, 1, 4, "2", null, null,null).getList();
 		modelview.addObject("subscription", subscriptions);//技淘观点精选
 
 		if (subscriptions != null && subscriptions.size() > 0 && subscriptions.get(0).getSourceUrl() != null
@@ -1105,7 +1106,7 @@ public class WebpageController extends BaseController {
 		
 		// 知产百科
 		List<News> news = (List<News>) newsService
-				.listNews(98, null, null, null, null, null, null, 1, 4, 2 + "", null, "web_tech_service_index")
+				.listNews(98, null, null, null, null, null, null, 1, 4, 2 + "", null, "web_tech_service_index",null)
 				.getList();
 		for (News n : news) {
 			if (null != n.getTitleImg() && n.getTitleImg().contains(",")) {
@@ -1413,12 +1414,27 @@ public class WebpageController extends BaseController {
 	public Result policyAndNewsList(Policy policy, Integer pageNo, Integer pageSize){
 		Result res = new Result();
 		//如果type是null 查看政策和新闻等的数据
-		if(null == policy.getType()){
+		if(null == policy.getType() || "".equals(policy.getType())){
 			res.setData(policyService.searchPolicyAndNewsList(policy, pageNo, pageSize));
-		}else if(policy.getType() >= 0){//资讯\观点\知产 news表
-			res.setData(newsService.listNews(policy.getType(), null, null, null, null, null, null, pageNo, pageSize, "2", null, null).getList());
+		}else if(policy.getType() == 0 || policy.getType() == 99 || policy.getType() == 98 ){//资讯\观点\知产 news表
+			Pagination<News> listNews = newsService.listNews(policy.getType(), null, null, null, null, null, null, pageNo, pageSize, "2", null, null,policy.getProvince());
+			@SuppressWarnings("unchecked")
+			Iterator<News> iterator = (Iterator<News>) listNews.getList().iterator();
+			while (iterator.hasNext()) {
+				News news = (News) iterator.next();
+				news.setType(1);
+				news.setHot(news.getHotspot());//是否热门处理
+			}
+			res.setData(listNews);
 		}else{//政策
-			res.setData(policyService.searchPolicy(policy.getTitle(), 2, null, null, null, pageNo, pageSize, policy.getProvince()));
+			Pagination<PolicyResult> policyList = policyService.searchPolicy(policy.getTitle(), 2, null, null, null, pageNo, pageSize, policy.getProvince());
+			@SuppressWarnings("unchecked")
+			Iterator<PolicyResult> iterator = (Iterator<PolicyResult>) policyList.getList().iterator();
+			while (iterator.hasNext()) {
+				PolicyResult policyResult = (PolicyResult) iterator.next();
+				policyResult.setType(0);
+			}
+			res.setData(policyList);
 		}
 		return res;
 	} 

+ 9 - 6
src/main/java/com/goafanti/common/mapper/PolicyMapper.xml

@@ -572,6 +572,7 @@
   p.title_img as titleImg ,
   p.content,
   p.summary,
+  p.hot,
   dg.name as provinceS,
   dgg.name as cityS
   from policy p
@@ -678,7 +679,8 @@
   	  select * from (
 		  select p.title, p.author, p.audit_status as auditStatus, 
 		  p.edit_time as editTime, p.id, p.source, p.release_date as releaseDate, 
-		  p.title_img as titleImg , p.content, p.summary, dg.name as provinceS
+		  p.title_img as titleImg , p.content, p.summary, dg.name as provinceS, 0 `type`
+		  , p.hot
 		  from policy p 
 		  left join district_glossory dg on dg.id =p.province 
 		  where p.audit_status =2 
@@ -686,12 +688,13 @@
 		  and p.title like concat('%',#{policy.title,jdbcType=VARCHAR},'%')
 		  </if>
 		  <if test="policy.province != null">
-		  and p.province = #{policy.title,,jdbcType=INTEGER}
+		  and p.province = #{policy.province,jdbcType=INTEGER}
 		  </if> 
 		  union
 		  select n.title, n.author, n.audit_status as auditStatus,
 		  n.edit_time as editTime, n.id, n.source, n.release_date as releaseDate,
-		  n.title_img as titleImg, n.content, n.summary, dg.name as provinceS
+		  n.title_img as titleImg, n.content, n.summary, dg.name as provinceS, 1 `type`
+		  ,n.hotspot
 		  from news n
 		  left join district_glossory dg on dg.id = n.province_id 
 		  where audit_status = 2 
@@ -699,7 +702,7 @@
 		  and title like concat('%',#{policy.title,jdbcType=VARCHAR},'%')
 		  </if>
 		  <if test="policy.province != null">
-		  and province_id = #{policy.title,,jdbcType=INTEGER}
+		  and province_id = #{policy.province,jdbcType=INTEGER}
 		  </if> 
 		) a order by releaseDate desc 
 		 <if test="page_sql!=null">
@@ -716,7 +719,7 @@
 		  and p.title like concat('%',#{policy.title,jdbcType=VARCHAR},'%')
 		  </if>
 		  <if test="policy.province != null">
-		  and p.province = #{policy.title,,jdbcType=INTEGER}
+		  and p.province = #{policy.province,jdbcType=INTEGER}
 		  </if> 
 		  union
 		  select n.id
@@ -727,7 +730,7 @@
 		  and title like concat('%',#{policy.title,jdbcType=VARCHAR},'%')
 		  </if>
 		  <if test="policy.province != null">
-		  and province_id = #{policy.title,,jdbcType=INTEGER}
+		  and province_id = #{policy.province,jdbcType=INTEGER}
 		  </if> 
 		) a 
   </select>

+ 1 - 1
src/main/java/com/goafanti/news/controller/AdminNewsApiController.java

@@ -67,7 +67,7 @@ public class AdminNewsApiController extends BaseApiController {
 		if (StringUtils.isNumeric(pageNo)) {
 			pNo = Integer.parseInt(pageNo);
 		}
-		res.setData(newsService.listNews(type, title, author, startCreateTime, endCreateTime, source, hot, pNo, pSize,auditStatus,releaseStatus,publishPage)); 
+		res.setData(newsService.listNews(type, title, author, startCreateTime, endCreateTime, source, hot, pNo, pSize,auditStatus,releaseStatus,publishPage,null)); 
 		return res;
 	}
 

+ 2 - 6
src/main/java/com/goafanti/news/service/NewsService.java

@@ -7,8 +7,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 
-import org.apache.shiro.web.util.SavedRequest;
-import org.codehaus.groovy.classgen.ReturnAdder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -29,7 +27,6 @@ import com.goafanti.common.enums.collectType;
 import com.goafanti.common.model.JtCollectSearch;
 import com.goafanti.common.model.News;
 import com.goafanti.common.model.NewsPublish;
-import com.goafanti.common.model.NewsPublishExample;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.common.utils.StringUtils;
@@ -204,7 +201,7 @@ public class NewsService extends BaseMybatisDao<NewsMapper> {
 	 * */
 	@SuppressWarnings("unchecked")
 	public Pagination<News> listNews(Integer type, String title, String author, String startCreateTime,
-			String endCreateTime, String source, Integer hot, Integer pNo, Integer pSize,String auditStatus,String releaseStatus,String publishPage) {
+			String endCreateTime, String source, Integer hot, Integer pNo, Integer pSize,String auditStatus,String releaseStatus,String publishPage,Integer provinceId) {
 		Map<String, Object> params = new HashMap<>();
 		if(null !=publishPage) {
 			params.put("publishPage", publishPage);
@@ -246,8 +243,7 @@ public class NewsService extends BaseMybatisDao<NewsMapper> {
 		if (StringUtils.isNotBlank(source)) {
 			params.put("source", source);
 		}
-		String provinceId =null; //省份
-		if (StringUtils.isNotBlank(provinceId)) {
+		if (null != provinceId) {
 			params.put("provinceId", provinceId);
 		}
 

+ 2 - 2
src/main/webapp/WEB-INF/views/common.html

@@ -75,7 +75,7 @@
 
 				</li>
 				<li>
-					<div>知识产权赚钱</div>
+					<div>知识产权运用</div>
 					<span>
 						<img th:src="${portalHost+'/img/index/index_webkit2.png'}" alt="">
 					</span>
@@ -195,7 +195,7 @@
                     </li>
                     <li th:class="${subM}=='serviceIndex'?active:''" >
                     <div>
-                        <a th:href="@{/portal/service/serviceIndex}">知识产权赚钱</a>
+                        <a th:href="@{/portal/service/serviceIndex}">知识产权运用</a>
  
                        </div>
                     </li>

+ 13 - 15
src/main/webapp/WEB-INF/views/portal/index.html

@@ -63,28 +63,28 @@
 
 				</li>
 				<li>
-					<div>知识产权赚钱</div>
+					<div>知识产权运用</div>
 					<span>
 						<img th:src="${portalHost+'/img/index/index_webkit2.png'}" alt="">
 					</span>
 					<p>
-						<a th:href="@{/portal/service/serviceIndex#serviceHigh}">高企服务</a>
-						<a th:href="@{/portal/service/serviceIndex#serviceProject}">科技项目</a>
+						<a th:href="@{/portal/service/serviceIndex#serviceHigh}">高新技术企业服务</a>
 					</p>
 					<p>
-						<a th:href="@{/portal/service/serviceIndex#serviceProperty}">知识产权</a>
-						<a th:href="@{/portal/service/serviceIndex#serviceCustomer}">合作客户</a>
+						<a th:href="@{/portal/service/serviceIndex#serviceAuthentication}">企业资质认定</a>
 					</p>
 					<p>
-						<a th:href="@{/portal/service/serviceIndex#serviceAuthentication}">企业认证</a>
-						<a th:href="@{/portal/service/serviceIndex#serviceAbility}">服务能力</a>
+						<!-- <a th:href="@{/portal/service/serviceIndex#serviceProperty}">知识产权</a> -->
+						<a th:href="@{/portal/service/serviceIndex#serviceProject}">科技项目</a>
+						<a th:href="@{/portal/service/serviceIndex#serviceCustomer}">合作客户</a>
 					</p>
 					<p>
 						<a th:href="@{/portal/service/serviceIndex#serviceAdministration}">管理体系</a>
-						<a th:href="@{/portal/service/serviceIndex#serviceProcess}">服务流程</a>
+						<a th:href="@{/portal/service/serviceIndex#serviceAbility}">服务能力</a>
 					</p>
 					<p>
-						<a th:href="@{/portal/service/serviceIndex#serviceBrand}">品牌通</a>
+						<a th:href="@{/portal/service/serviceIndex#serviceProcess}">服务流程</a>
+						<a th:href="@{/portal/service/serviceIndex#serviceBrand}">品牌通   </a>
 					</p>
 				</li>
 				<li>
@@ -244,7 +244,7 @@
 				<li>
 				<a th:href="@{/portal/service/serviceIndex}">
 					<img th:src="${portalHost+'/img/index/index_icon2.png'}" alt="">
-					<p>知识产权赚钱</p></a>
+					<p>知识产权运用</p></a>
 				</li>
 				<li>
 				<a th:href="@{/portal/technologyTrading/tradingIndex}">
@@ -388,10 +388,10 @@
 		<div class="news">
 			<div class="policy">
 				<h4>政策
-					<a th:href="@{/portal/thinkTank/policyList}"><span class="line"></span><span>></span></a> 
+					<a th:href="@{/portal/thinkTank/policyList?type=1}"><span class="line"></span><span>></span></a> 
 					
 				</h4>
-				<img th:src="(${policys[0].titleImg}==null)?${portalHost+'/img/index/index_new2.jpg'}:${avatarUploadHost+policys[0].titleImg}" alt="">
+				<!-- <img th:src="(${policys[0].titleImg}==null)?${portalHost+'/img/index/index_new2.jpg'}:${avatarUploadHost+policys[0].titleImg}" alt=""> -->
 				<ul>				
 					<li th:each="p,pStatus:${policys}" th:if="${pStatus.index}==0">
 						<a th:href="@{/portal/news/newsDetail(id=${p.id},type=0)}">
@@ -409,9 +409,7 @@
 			</div>
 			<div class="consultation">
 				<h4>资讯
-				<span class="line"></span><!--<span>></span>
-				
-				 <a th:href="@{/portal/thinkTank/policyList}"><span class="line"></span><span>></span></a> -->
+				 <a th:href="@{/portal/thinkTank/policyList?type=0}"><span class="line"></span><span>></span></a>
 				</h4>
 				<ul>
 					

File diff suppressed because it is too large
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/service/patent.html


File diff suppressed because it is too large
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/service/serviceDetails.html


File diff suppressed because it is too large
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/service/serviceIndex.html


File diff suppressed because it is too large
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/technologyTrading/tradingIndex.html


+ 72 - 69
src/main/webapp/WEB-INF/views/portal/thinkTank/policyList.html

@@ -12,78 +12,81 @@
 		<div th:replace="common::nav('thinkTank','policyList')"></div>
 
 	<!--banner-->
-	<div class="carousel">
-			<img th:src="${portalHost + '/img/thinkTank_banner01.jpg'}" alt=""/>
+	<div class="banner">
+			<img th:src="${portalHost + '/img/newMenu/policyBanner.png'}" alt=""/>
 	</div>
 	<!--主体内容区域开始-->
-    <div class="main_top">
-    	<div class="head_bj">
-	    	<div class="container">    		           
-	            <ul class="detail_toptitle">
-	            	<li><img th:src="${portalHost + '/img/detail_home.jpg'}" alt="" /></li>
-	                <li>></li>               
-	                <li class="that"><a th:href="${basePath + '/portal/thinkTank/policyList.html'}">智政</a></li>
-	            </ul>
-	            <div class="portal-content">
-					<div class="search-criteria row">
-						<div class="search-title col-md-1">
-							<span>所在区域</span>
-						</div>
-						<div class="search-select col-md-11">
-							<ul id="industryList" class="clearfix"></ul>
-						</div>
-					</div>					
-					<div class="searchs">
-		 				<div class="select">
-		 					搜一搜 					
-		 				</div> 				
-		 				<div id="search_on">					
-		 					<input type="search" placeholder="高新"/>
-		 				</div>
-		 				<button id="btn_search"></button>						 			
-			 		</div>
-			 	</div>
-			</div>	       
-	    </div>	   
-        <div class="invest_midt  container">       		
-       		<div class="invest_contant">
-       			<div class="invest_left">       					 				
-		 			<div class="policy">
-	 				    <ul>
-	 					</ul>	 				
-	 				</div>		
-       				<div class="pagination_box">
-						<nav aria-label="Page navigation" class="clearfix">							
-							<ul class="pagination">								
-								<li class="pagePre">
-									<a href="#" aria-label="Previous">
-										<span aria-hidden="true" value="1">首页</span>
-									</a>
-								</li>								
-								<li class="pageNumber active"><a href="#" value="1">1</a></li>																
-								<li class="pageNext">
-									<a href="#" aria-label="Next">
-										<span aria-hidden="true">末页</span>
-									</a>
-								</li>							
-							</ul>
-							<span class="totalCount">共 0 页 0 条数据</span>
-						</nav>
-					</div>
-       			</div>
-       			<div class="invest_right">
-       				<h5>热点资讯</h5>
-       				<ul>
-       					<li th:each="news:${newsList}">
-       						<a th:href="@{/portal/news/newsDetail(id=${news.id})}">
-	       						<p th:text="${news.title}"></p>
-	       						<time th:text="${news.createTimeFormattedDate}"></time>
-       						</a>
-       					</li>     					
-       				</ul>
-       			</div> 
-       		</div>	
+	<div class="container">
+        <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="policyContent">
+			<div class="type">
+				<p>类型</p>
+				<ol>
+					<li value="">不限</li>
+					<li value="1">政策</li>
+					<li value="0">资讯</li>
+					<li value='99'>技淘观点</li>
+					<li value='98'>知产百科</li>
+				</ol>
+			</div>	
+			<div class="area">
+				<p>地区</p>
+				<ol>
+					
+				</ol>
+				<span class="more">更多+</span>
+			</div>
+		</div>
+		<div class="listContent">
+			<div class="newLsit">
+				<ul>
+					
+				</ul>
+				<div class="pagination_box">
+					<nav aria-label="Page navigation" class="clearfix">
+						<ul class="pagination">
+							<li class="pagePre">
+								<a href="#" aria-label="Previous">
+									<span aria-hidden="true">首页</span>
+								</a>
+							</li>
+							<li class="pageNumber"><a href="#" value="1">1</a></li>
+							<li class="pageNext">
+								<a href="#" aria-label="Next">
+									<span aria-hidden="true">末页</span>
+								</a>
+							</li>
+						</ul>
+						<div class="inp">
+							<input type="text" class=""><button class="btn btn-default">跳转</button>
+						</div>
+						<span class="totalCount">共0条数据</span>
+					</nav>
+				</div>
+			</div>
+			<div class="hotNew">
+				<p><span>热点资讯</span></p>
+   				<ul>
+  					<li th:each="news:${newsList}">
+  						<a th:href="@{/portal/news/newsDetail(id=${news.id})}">
+   						<p th:text="${news.title}"></p>
+   						<time th:text="${news.createTimeFormattedDate}"></time>
+  						</a>
+  					</li>     					
+    			</ul>
+			</div>
+		</div>
     </div>
   	<!--主体内容区域结束-->
 	<footer>