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

Merge branch 'master' of https://git.coding.net/aft/AFT.git

albertshaw лет назад: 8
Родитель
Сommit
b30d1f4bd1

+ 24 - 16
src/main/java/com/goafanti/news/controller/NewsController.java

@@ -15,18 +15,19 @@ import com.goafanti.banners.enums.BannersType;
 import com.goafanti.banners.service.BannersService;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.ErrorConstants;
-import com.goafanti.common.controller.BaseApiController;
+import com.goafanti.common.controller.BaseController;
 import com.goafanti.common.model.Banners;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.news.enums.NewsType;
 import com.goafanti.news.service.NewsService;
 
 @Controller
-public class NewsController extends BaseApiController {
+public class NewsController extends BaseController {
 	@Resource
-	NewsService newsService;
+	NewsService				newsService;
 	@Resource
-	private BannersService		bannersService;
+	private BannersService	bannersService;
+
 	/**
 	 * 策源地
 	 * 
@@ -55,15 +56,6 @@ public class NewsController extends BaseApiController {
 	@RequestMapping(value = "/portal/news/newsDetails", method = RequestMethod.GET)
 	public ModelAndView portalNewsNewsDetails(HttpServletRequest request, ModelAndView modelview, String noCache) {
 		modelview.setViewName("/portal/news/newsDetails");
-		/*if (StringUtils.equals(noCache, "clear")) {
-			newsService.cleanPortalList();
-		}
-		modelview.addObject("complete", newsService.findPortalList(5, 0, NewsType.ALL.getCode()));
-		modelview.addObject("kjkx", newsService.findPortalList(5, 0, NewsType.KJZX.getCode()));
-		modelview.addObject("jtdt", newsService.findPortalList(5, 0, NewsType.JTDT.getCode()));
-		modelview.addObject("zfwl", newsService.findPortalList(5, 0, NewsType.ZFWL.getCode()));
-		modelview.addObject("gjzc", newsService.findPortalList(5, 0, NewsType.GJZC.getCode()));
-		modelview.addObject("dfzc", newsService.findPortalList(5, 0, NewsType.DFZC.getCode()));*/
 		return modelview;
 	}
 
@@ -97,18 +89,34 @@ public class NewsController extends BaseApiController {
 		res.setData(newsService.findNewsDetail(id));
 		return res;
 	}
-	
+
 	@RequestMapping(value = "/portal/news/newsDetail", method = RequestMethod.GET)
 	public ModelAndView portalHighTechEvaluateIprInfo(HttpServletRequest request, ModelAndView modelview) {
 		modelview.setViewName("/portal/news/newsDetail");
 		return modelview;
-	} 
-	
+	}
+
 	private void handleBanners(ModelAndView modelview, BannersType bannersType) {
 		List<Banners> banners = bannersService.findPortalBanners(bannersType.getKey());
 		if (!banners.isEmpty()) {
 			modelview.addObject("banners", banners);
 		}
 	}
+	
+	private Integer getPageNo(String pageNo){
+		if (StringUtils.isNumeric(pageNo)) {
+			Integer pn = Integer.parseInt(pageNo);
+			return pn < 1 ? 1 : pn;
+		}
+		return 1;
+	}
+	
+	private Integer getPageSize(String pageSize){
+		if (StringUtils.isNumeric(pageSize)) {
+			Integer ps = Integer.parseInt(pageSize);
+			return ps > 50 ? 50 : (ps < 10 ? 10 : ps);
+		}
+		return 10;
+	}
 
 }

+ 55 - 0
src/main/java/com/goafanti/portal/controller/PortalActivityController.java

@@ -8,11 +8,14 @@ import javax.servlet.http.HttpServletRequest;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.ModelAndView;
 
 import com.goafanti.activity.service.ActivityService;
 import com.goafanti.banners.enums.BannersType;
 import com.goafanti.banners.service.BannersService;
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.BaseController;
 import com.goafanti.common.model.Banners;
 import com.goafanti.common.utils.StringUtils;
@@ -48,6 +51,42 @@ public class PortalActivityController extends BaseController {
 		handleBanners(modelview, BannersType.HUO_DONG_XIANG_QING);
 		return modelview;
 	}
+	
+	/**
+	 * 活动列表
+	 */
+	@RequestMapping(value = "/portal/activity/list", method = RequestMethod.GET)
+	@ResponseBody
+	public Result portalActivityList(String pageSize, String pageNo, Integer form, String noCache){
+		Result res = new Result();
+		if (StringUtils.equals(noCache, "clear")) {
+			activityService.cleanActivityPortalList();
+		}
+		
+		Integer pN = getPageNo(pageNo);
+		Integer pS = getPageSize(pageSize);
+		res.setData(activityService.findPortalList((pN - 1) * pS, pS, form));
+		return res;
+	}
+	
+	/**
+	 * 活动详情info
+	 */
+	@RequestMapping(value = "/portal/activity/detail", method = RequestMethod.GET)
+	@ResponseBody
+	public Result portalActivityDetail(String id){
+		Result res = new Result();
+		if (StringUtils.isBlank(id)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "活动ID"));
+			return res;
+		}
+		if (!StringUtils.isNumeric(id)){
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "活动ID"));
+			return res;
+		}
+		res.setData(activityService.findActivityDetail(Long.parseLong(id)));
+		return res;
+	}
 
 	private void handleBanners(ModelAndView modelview, BannersType bannersType) {
 		List<Banners> banners = bannersService.findPortalBanners(bannersType.getKey());
@@ -55,4 +94,20 @@ public class PortalActivityController extends BaseController {
 			modelview.addObject("banners", banners);
 		}
 	}
+	
+	private Integer getPageNo(String pageNo){
+		if (StringUtils.isNumeric(pageNo)) {
+			Integer pn = Integer.parseInt(pageNo);
+			return pn < 1 ? 1 : pn;
+		}
+		return 1;
+	}
+	
+	private Integer getPageSize(String pageSize){
+		if (StringUtils.isNumeric(pageSize)) {
+			Integer ps = Integer.parseInt(pageSize);
+			return ps > 50 ? 50 : (ps < 10 ? 10 : ps);
+		}
+		return 10;
+	}
 }

+ 19 - 2
src/main/java/com/goafanti/portal/controller/PortalLectureController.java

@@ -15,8 +15,9 @@ import com.goafanti.banners.enums.BannersType;
 import com.goafanti.banners.service.BannersService;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.AFTConstants;
-import com.goafanti.common.controller.BaseApiController;
+import com.goafanti.common.controller.BaseController;
 import com.goafanti.common.model.Banners;
+import com.goafanti.common.utils.StringUtils;
 import com.goafanti.lecture.bo.LectureListBo;
 import com.goafanti.lecture.service.LectureService;
 
@@ -24,7 +25,7 @@ import com.goafanti.lecture.service.LectureService;
  * 科技讲堂
  */
 @Controller
-public class PortalLectureController extends BaseApiController {
+public class PortalLectureController extends BaseController {
 	@Resource
 	private LectureService lectureService;
 	@Resource
@@ -62,5 +63,21 @@ public class PortalLectureController extends BaseApiController {
 			modelview.addObject("banners", banners);
 		}
 	}
+	
+	private Integer getPageNo(String pageNo){
+		if (StringUtils.isNumeric(pageNo)) {
+			Integer pn = Integer.parseInt(pageNo);
+			return pn < 1 ? 1 : pn;
+		}
+		return 1;
+	}
+	
+	private Integer getPageSize(String pageSize){
+		if (StringUtils.isNumeric(pageSize)) {
+			Integer ps = Integer.parseInt(pageSize);
+			return ps > 50 ? 50 : (ps < 10 ? 10 : ps);
+		}
+		return 10;
+	}
 
 }

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

@@ -69,8 +69,9 @@
 			</li>
 			<li th:classappend="${mainM=='activityIndex'}? 'active'">
 				<a th:href="${basePath + '/portal/activity/activityIndex.html'}">活动圈</a>
-				<ul class="secondary_navigation_nav" th:style="${'width:'+(1*75)+'px;left:-'+(1*75/2-74.25/2)+'px;'}">
-					<li th:classappend="${subM=='activityDetail'}? 'active'"><a th:href="${basePath + '/portal/activity/details.html'}">活动详情</a></li>
+				<ul class="secondary_navigation_nav" th:style="${'width:'+(2*75)+'px;left:-'+(2*75/2-74.25/2)+'px;'}">
+					<li th:classappend="${subM=='activityDetail'}? 'active'"><a th:href="${basePath + '/portal/activity/details.html'}">在线直播</a></li>
+					<li th:classappend="${subM=='activityDetail'}? 'active'"><a th:href="${basePath + '/portal/activity/details.html'}">线下现场</a></li>
 				</ul>
 			</li>
 			<li th:classappend="${mainM=='websiteBuildIndex'}? 'active'">
@@ -243,7 +244,7 @@
 			window.showRoleList = /*[[${shiro.hasRole('999999') || shiro.isPermitted('api/admin/roleList')}]]*/false;
 			window.showAuditStatus = /*[[${shiro.hasRole('999999') || shiro.isPermitted('api/admin/auditStatus')}]]*/false;
 
-			window.showSystem = /*[[${shiro.hasRole('999999')}]]*/false;
+			window.showSystem = /*[[${shiro.hasRole('999999') || shiro.isPermitted('admin/system')}]]*/false;
 	/*]]>*/
 		</script>
 		<script th:inline="javascript" th:if="${userData!=null}">

+ 12 - 5
src/main/webapp/WEB-INF/views/portal/index.html

@@ -31,11 +31,18 @@
 				<div class="col-md-6">
 					<h2></h2>
 					<div class="input-group search">
-						<select id="searchType">
-                            <option value="/portal/search/demand.html">需求</option>
-                            <option value="/portal/search/achievement.html">技术</option>
-                            <option value="/portal/search/subscriberUser.html">行家</option>
-                        </select>
+						<div class="input-group-btn" id="searchType">
+                            <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
+							<span class="txt">需求</span> 
+                            <span class="caret"></span>
+                            <input type="hidden" id="searchUrl" value="/portal/search/demand.html">
+						</button>
+                            <ul class="dropdown-menu">
+                                <li><a href="/portal/search/demand.html">需求</a></li>
+                                <li><a href="/portal/search/achievement.html">技术</a></li>
+                                <li><a href="/portal/search/subscriberUser.html">行家</a></li>
+                            </ul>
+                        </div>
 						<input type="text" id="searchInput" class="form-control"> <span class="input-group-btn">
 							<button class="btn" id="achievementBtn" type="button">搜索</button>
 						</span>

+ 6 - 6
src/main/webapp/WEB-INF/views/portal/international/internationalIndex.html

@@ -181,7 +181,7 @@
                             <a href="javascript:void(0)" class="customer-service">咨询</a>
                         </div>
                     </div>
-                    <a href="#">
+                    <a href="#" class="customer-service">
                         <div class="expert_content_hv">
                             <p>加拿大工程院院士</p>
                             <p>能源系统与燃料电池技术</p>
@@ -198,7 +198,7 @@
                             <a href="javascript:void(0)" class="customer-service">咨询</a>
                         </div>
                     </div>
-                    <a href="#">
+                    <a href="#" class="customer-service">
                         <div class="expert_content_hv">
                             <p>德国不莱梅大学制造技术教授</p>
                             <p>制造技术</p>
@@ -215,7 +215,7 @@
                             <a href="javascript:void(0)" class="customer-service">咨询</a>
                         </div>
                     </div>
-                    <a href="#">
+                    <a href="#" class="customer-service">
                         <div class="expert_content_hv">
                             <p>加拿大渥太华大学信息技术与工程学院教授</p>
                             <p>无线网络技术算法</p>
@@ -232,7 +232,7 @@
                             <a href="javascript:void(0)" class="customer-service">咨询</a>
                         </div>
                     </div>
-                    <a href="#">
+                    <a href="#" class="customer-service">
                         <div class="expert_content_hv">
                             <p>英国皇家学会院士</p>
                             <p>神经科学</p>
@@ -249,7 +249,7 @@
                             <a href="javascript:void(0)" class="customer-service">咨询</a>
                         </div>
                     </div>
-                    <a href="#">
+                    <a href="#" class="customer-service">
                         <div class="expert_content_hv">
                             <p>加拿大微孔塑料领域首席科学家</p>
                             <p>微孔塑料</p>
@@ -266,7 +266,7 @@
                             <a href="javascript:void(0)" class="customer-service">咨询</a>
                         </div>
                     </div>
-                    <a href="#">
+                    <a href="#" class="customer-service">
                         <div class="expert_content_hv">
                             <p>美国工程院院士</p>
                             <p>核工程</p>

+ 8 - 32
src/main/webapp/WEB-INF/views/portal/news/newsDetail.html

@@ -31,41 +31,17 @@
 
 	<div class="container newsDetails_content">
 		<ul id="newsDetailsTab">
-			<li class="active"><a href="/portal/news/newsDetails.html?type=0" data-toggle="tab">全部</a></li>
-			<li><a href="/portal/news/newsDetails.html?type=1" data-toggle="tab">技淘动态</a></li>
-			<li><a href="/portal/news/newsDetails.html?type=2" data-toggle="tab">政府往来</a></li>
-			<li><a href="/portal/news/newsDetails.html?type=3" data-toggle="tab">科技资讯</a></li>
-			<li><a href="/portal/news/newsDetails.html?type=4" data-toggle="tab">国家政策</a></li>
-			<li><a href="/portal/news/newsDetails.html?type=5" data-toggle="tab">地方政策</a></li>
+			<li><a href="/portal/news/newsDetails.html?type=0">全部</a></li>
+			<li><a href="/portal/news/newsDetails.html?type=1">技淘动态</a></li>
+			<li><a href="/portal/news/newsDetails.html?type=2">政府往来</a></li>
+			<li><a href="/portal/news/newsDetails.html?type=3">科技资讯</a></li>
+			<li><a href="/portal/news/newsDetails.html?type=4">国家政策</a></li>
+			<li><a href="/portal/news/newsDetails.html?type=5">地方政策</a></li>
 		</ul>
 		<div class="newsDetail_content">
-			<h4>【快讯】科技部火炬中心邀请科易网董事长林国海作专题讲座</h4>
-			<p class="from_info">来源:<span class="from_web">科易网</span>时间:<span class="from_date">2016-09-30</span></p>
+			<h4></h4>
+			<p class="from_info">来源:<span class="from_web"></span>时间:<span class="from_date"></span></p>
 			<div id="content_container">
-				<p class="d6_dcpb">  今天上午,科易网董事长林国海应科技部火炬中心邀请,为2016年中国创新驿站培训班作了一场关于《‘互联网+’技术转移体系与市场化探索》的专题讲座。</p>
-				<p style="text-align: center" class="d6_dcpb"><img alt="" width="600" height="450" src="http://kynews.k8008.com/UpLoad/JPG/2016/9/30/2016930100217636108265376180747.jpg"
-					 data-bd-imgshare-binded="1"></p>
-				<p style="text-align: center" class="d6_dcpb">  讲座现场</p>
-				<p class="d6_dcpb">  火炬中心技术市场管理处郭俊峰处长、郭曼工程师,苏州科技局潘华露副局长、科技服务业处朱廉诚处长等领导,与2016年中国创新驿站培训班的省市级技术市场负责人共同参加了讲座。</p>
-				<p style="text-align: center" class="d6_dcpb"><img alt="" width="600" height="450" src="http://kynews.k8008.com/UpLoad/JPG/2016/9/30/2016930100217636108265376960752.jpg"
-					 data-bd-imgshare-binded="1"></p>
-				<p style="text-align: center" class="d6_dcpb">  林董事长讲演中</p>
-				<p class="d6_dcpb">  讲座围绕技术转移的工作路径、产品思维、体系创新、商业模式的维度展开,提出了以产品思维进行供给侧改革和以机制、政策、服务、规则四大环节的创新重构,创新要素价值链等创新理念。</p>
-				<p class="d6_dcpb">  林董事长深入浅出、穿插案例、直击要点的讲演,牢牢抓住了与会人员的注意力。他关于技术转移工作的四点体会,获得了现场众多资深科技工作者的高度认同。</p>
-				<p style="text-align: center" class="d6_dcpb"><img alt="" width="600" height="450" src="http://kynews.k8008.com/UpLoad/JPG/2016/9/30/2016930100217636108265377740757.jpg"
-					 data-bd-imgshare-binded="1"></p>
-				<p style="text-align: center" class="d6_dcpb">  林董事长关于技术转移工作的四点体会</p>
-				<p class="d6_dcpb">  来自湖南省科技厅、海南省科技厅、安徽省科技成果转化中心等单位的多位参会代表,在会上积极向林董事长提问,并提出希望到科易网总部考察。</p>
-				<p style="text-align: center" class="d6_dcpb"><img alt="" width="600" height="450" src="http://kynews.k8008.com/UpLoad/JPG/2016/9/30/2016930100217636108265378208760.jpg"
-					 data-bd-imgshare-binded="1"></p>
-				<p style="text-align: center" class="d6_dcpb">  来自海南省科技厅的参会代表向林董事长提问</p>
-				<p class="d6_dcpb">  讲座结束后,参会代表们纷纷找林董事长和随行工作人员索要名片,此次带去的科易网宣传彩页更是被索取一空,现场氛围十分热烈。</p>
-				<p class="d6_dcpb">  这是科易技术市场模式受认可和欢迎的有力证明。目前,该模式已在全国30个地区得到应用,构建了有效果、可持续的区域科技创新服务体系。</p>
-				<p class="d6_dcpb">  作为技术转移领域践行者的科易网,也一直将自己定位为技术转移创新模式和理念的布道者。应邀到全国各地分享经验,已成为林董事长的“常态化”工作。</p>
-				<p class="d6_dcpb">  就在昨天,林董事长还应邀出席常州科技服务业协会成立大会上作专题报告——《“互联网+”形势下的科技服务业应对策略》,并获得了与会人员的“集体点赞”。</p>
-				<p style="text-align: center" class="d6_dcpb"><img alt="" width="600" height="438" src="http://kynews.k8008.com/UpLoad/JPG/2016/9/30/2016930100217636108265378988765.jpg"
-					 data-bd-imgshare-binded="1"></p>
-				<p style="text-align: center" class="d6_dcpb">  林董事长在常州科技服务业协会成立大会上作报告</p>
 			</div>
 		</div>
 	</div>

+ 1 - 1
src/main/webapp/WEB-INF/views/portal/scienceTechnology/bigShot.html

@@ -64,7 +64,7 @@
 							<span class="txt">
 								<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> 关注
 							</span>
-							<input type="hidden" id="uid" th:value="${star.uid}">
+							<input type="hidden" class="uid" th:value="${star.uid}">
 							<input type="hidden" class="interestId" value="">
                         </a>
 					</div>

Разница между файлами не показана из-за своего большого размера
+ 2 - 2
src/main/webapp/WEB-INF/views/portal/technologyTrading/index.html


+ 1 - 1
src/main/webapp/WEB-INF/views/portal/websiteBuild/websiteBuildIndex.html

@@ -42,7 +42,7 @@
 	</div>
 			
 	<div class="container customized">
-        <a href="#">发起平台定制</a>
+        <a href="#" class="customer-service">发起平台定制</a>
         <div class="customized_txt">
             <h4>平台研发阶段工作内容及周期规划</h4>
             <div class="customized_txt_content">