Просмотр исходного кода

智库咨询、智政、技术交易页面修改

Michael лет назад: 8
Родитель
Сommit
254b8b936d

+ 4 - 0
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -538,6 +538,10 @@ public class WebpageController extends BaseController {
 	public ModelAndView portalTechnologyTradingIndex(HttpServletRequest request, ModelAndView modelview) {
 		modelview.setViewName("/portal/technologyTrading/index");
 		handleBanners(modelview, BannersType.JI_SHU_JIAO_YI);
+		List<NewsPortalList> newsPortalList=newsService.portalNewsPolicy();		
+		modelview.addObject("newsPortalList", newsPortalList);
+		List<NewsPortalList> portalNewsQuestion=newsService.portalNewsQuestion();		
+		modelview.addObject("portalNewsQuestion", portalNewsQuestion);
 		return modelview;
 	}
 

+ 4 - 0
src/main/java/com/goafanti/common/dao/NewsMapper.java

@@ -31,4 +31,8 @@ public interface NewsMapper {
 	List<NewsSummary> findIndexNewsList(Map<String, Object> params);
 	
 	List<NewsSummary> findJmrhNewsList(Map<String, Object> params);
+	
+	List<NewsPortalList> portalNewsPolicy();
+	
+	List<NewsPortalList> portalNewsQuestion();
 }

+ 38 - 4
src/main/java/com/goafanti/common/mapper/NewsMapper.xml

@@ -240,12 +240,13 @@
 			a.source,
 			a.content
 		from news a
-		where 1 =1
+		where
+		a.type != 1 and a.type != 2
 		<if test="provinceId != null">
 			and a.province_id = #{provinceId,jdbcType=INTEGER}
 		</if>
 
-		<if test="type != null and type != 0" >
+		<if test="type != null and type != 0 " >
 			and a.type = #{type,jdbcType=INTEGER}
 		</if>
 		<!-- 
@@ -266,11 +267,12 @@
 		select 
 			count(0)
 		from news a
-		where 1 =1
+		where 
+		a.type != 1 and a.type != 2
 		<if test="provinceId != null">
 			and a.province_id = #{provinceId,jdbcType=INTEGER}
 		</if>
-		<if test="type != null and type != 0" >
+		<if test="type != null and type != 0 and type != 1 and type != 2" >
 			and a.type = #{type,jdbcType=INTEGER}
 		</if>
 		<!-- 	
@@ -282,4 +284,36 @@
 			and a.title like concat('%',#{keyword},'%')
 		</if>
 	</select>
+	<select id="portalNewsPolicy" resultType="com.goafanti.news.bo.NewsPortalList">
+		select
+			a.id,
+			DATE_FORMAT(a.create_time,'%Y-%d-%m') as createTime,
+			a.title,
+			a.title_img as titleImg,
+			a.type,
+			a.hot,
+			a.summary,
+			a.source,
+			a.content
+		from news a
+		where
+		a.type =5 or a.type =4
+		order by create_time desc
+	</select>
+	<select id="portalNewsQuestion" resultType="com.goafanti.news.bo.NewsPortalList">
+		select
+			a.id,
+			DATE_FORMAT(a.create_time,'%Y-%d-%m') as createTime,
+			a.title,
+			a.title_img as titleImg,
+			a.type,
+			a.hot,
+			a.summary,
+			a.source,
+			a.content
+		from news a
+		where
+		a.type =2
+		order by create_time desc
+	</select>
 </mapper>

+ 11 - 0
src/main/java/com/goafanti/news/service/NewsService.java

@@ -186,5 +186,16 @@ public class NewsService extends BaseMybatisDao<NewsMapper> {
 		params.put("type", type);
 		return newsMapper.findJmrhNewsList(params);
 	}
+	
+	public List<NewsPortalList> portalNewsPolicy(){
+		
+		return newsMapper.portalNewsPolicy();
+	}
+	public List<NewsPortalList> portalNewsQuestion(){
+		
+		return newsMapper.portalNewsQuestion();
+	}
+
+	
 
 }

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

@@ -71,6 +71,12 @@
 								th:href="${basePath + '/portal/financial/investmentInstitution.html'}">投资机构</a>
 							</li>
 						</ol></li>
+					<li><a th:href="${basePath + '/portal/aboutUs.html'}">关于公司</a>
+						<ol class="subnavigation">
+							<li><a
+								th:href="${basePath + '/portal/contactUs.html'}">联系我们</a>
+							</li>
+					</ol></li>
 					<!-- <li><a href="#">科技活动</a></li> <li><a href="#">平台共建</a></li> 	-->
 				</ul>
 			</div>
@@ -79,14 +85,14 @@
 					th:src="${portalHost+'/img/index_resiter.png'}" alt="" />
 				</a> 
 				<a href="javascript:;" class="head_login">登录</a> 
-				<a th:href="${basePath + '/portal/aboutUs.html'}">关于我们</a>
+				<a th:href="${basePath + '/portal/aboutUs.html'}">关于公司</a>
 				<div></div>
 			</div>
 			<div class="nav_right" th:if="${isLogin}">
 				<a th:href="${basePath + (isAdmin? '/admin/index.html':'/user/account/index.html')}"
 					th:text="${#strings.isEmpty(userName)?'个人中心':userName}">个人中心</a> 
 				<a th:href="${basePath + '/user/logout'}">退出</a> 
-				<a th:href="${basePath + '/portal/aboutUs.html'}">关于我们</a>
+				<a th:href="${basePath + '/portal/aboutUs.html'}">关于公司</a>
 				<div></div>
 			</div>
 		</div>
@@ -125,7 +131,7 @@
 			<div class="bottom">
 				<div class="bottom_text">
 					<div class="text_top">
-						<a th:href="${basePath + '/portal/aboutUs.html'}">关于我们</a>
+						<a th:href="${basePath + '/portal/aboutUs.html'}">关于公司</a>
 						<a th:href="${basePath + '/portal/contactUs.html'}">联系我们</a>
 						<p>Copyright &copy 2016-2017 科德 版权所有 湘ICP备15019731号 -2
 							技术支持:湖南阿凡提科技有限公司</p>

+ 1 - 1
src/main/webapp/WEB-INF/views/portal/financial/index.html

@@ -228,7 +228,7 @@
 				<div class="part">所属行业</div>
 				<div class="place_city">
 					<ul>
-						<li class="thon" value="464">教育休闲</li>
+						<li class="thon" value="null">全部行业</li>
 						<li value="463">包装印刷</li>
 						<li value="462">电气自动化</li>
 						<li value="460">航天航空</li>

+ 16 - 16
src/main/webapp/WEB-INF/views/portal/technologyTrading/index.html

@@ -68,20 +68,20 @@
 				<div>
 					<div class="clear_line"></div>
 					<div class="technolo_text">
-						<div val="116936328830402560">
-							<h5>长沙市科技局进行技术交易合同认定登记上门服务</h5>
+						<div th:val="${newsPortalList[0].id}">
+							<h5 th:text="${newsPortalList[0].title}">长沙市科技局进行技术交易合同认定登记上门服务</h5>
 							<a href="#">了解更多</a>
 						</div>
-						<div val="116935341277331456 ">
-							<h5>长沙市科技局印发《长沙市技术交易奖励暂行办法》</h5>
+						<div th:val="${newsPortalList[1].id}">
+							<h5 th:text="${newsPortalList[1].title}">长沙市科技局印发《长沙市技术交易奖励暂行办法》</h5>
 							<a href="#">了解更多</a>
 						</div>
-						<div val="116933097148530688">
-							<h5>常德市网上技术交易专项补助暂行办法</h5>
+						<div th:val="${newsPortalList[2].id}">
+							<h5 th:text="${newsPortalList[2].title}">常德市网上技术交易专项补助暂行办法</h5>
 							<a href="#">了解更多</a>
 						</div>
-						<div val="104164708885872640">
-							<h5>国家税务总局关于进一步做好企业研发费用加计扣除政策落实工作的通知 </h5>
+						<div th:val="${newsPortalList[3].id}">
+							<h5 th:text="${newsPortalList[3].title}">国家税务总局关于进一步做好企业研发费用加计扣除政策落实工作的通知 </h5>
 							<a href="#">了解更多</a>
 						</div>
 					</div>
@@ -94,21 +94,21 @@
 				<div>
 					<div class="clear_line"></div>
 					<div class="technolo_text">
-						<div val="120088780303908864">
+						<div th:val="${portalNewsQuestion[0].id}">
 							<a href="#">查看答案</a>
-							<h5>技淘网平台交易违规处罚</h5>
+							<h5 th:text="${portalNewsQuestion[0].title}">技淘网平台交易违规处罚</h5>
 						</div>
-						<div val="120088955617427456">
+						<div th:val="${portalNewsQuestion[1].id}">
 							<a href="#">查看答案</a>
-							<h5>技术需求发布规范</h5>
+							<h5 th:text="${portalNewsQuestion[1].title}">技术需求发布规范</h5>
 						</div>
-						<div val="120089164124667904">
+						<div th:val="${portalNewsQuestion[2].id}">
 							<a href="#">查看答案</a>
-							<h5>争议纠纷发起流程及规则</h5>
+							<h5 th:text="${portalNewsQuestion[2].title}">争议纠纷发起流程及规则</h5>
 						</div>
-						<div val="120089403078361088">
+						<div th:val="${portalNewsQuestion[3].id}">
 							<a href="#">查看答案</a>
-							<h5>交易安全保障</h5>
+							<h5 th:text="${portalNewsQuestion[3].title}">交易安全保障</h5>
 						</div>
 					</div>
 					<img th:src="${portalHost + '/img/technology_question.png'}" alt="" />