wubb 8 years ago
parent
commit
a067fda5f0

+ 5 - 1
src/main/java/com/goafanti/fragment/controller/FragmentController.java

@@ -7,6 +7,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 
 import com.goafanti.common.controller.BaseApiController;
+import com.goafanti.common.utils.StringUtils;
 import com.goafanti.fragment.service.FragmentService;
 
 @RestController
@@ -17,7 +18,10 @@ public class FragmentController extends BaseApiController {
 	FragmentService fragmentService;
 
 	@RequestMapping(value = "/get/{id}", method = RequestMethod.GET, produces = "text/html;charset=UTF-8")
-	public String get(@PathVariable String id) {
+	public String get(@PathVariable String id, String noCache) {
+		if (StringUtils.isNotBlank(noCache)) {
+			fragmentService.clean(id);
+		}
 		return fragmentService.selectById(id);
 	}
 

+ 11 - 0
src/main/java/com/goafanti/fragment/service/FragmentService.java

@@ -1,6 +1,9 @@
 package com.goafanti.fragment.service;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheEvict;
 import org.springframework.cache.annotation.CachePut;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
@@ -8,6 +11,7 @@ import org.springframework.transaction.annotation.Transactional;
 
 import com.goafanti.common.dao.HtmlFragmentMapper;
 import com.goafanti.common.model.HtmlFragment;
+import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 
 @Service
@@ -15,12 +19,19 @@ import com.goafanti.core.mybatis.BaseMybatisDao;
 public class FragmentService extends BaseMybatisDao<HtmlFragmentMapper> {
 	@Autowired
 	HtmlFragmentMapper htmlFragmentMapper;
+	
+	private static final Logger	logger	= LoggerFactory.getLogger(FragmentService.class);
 
 	@Cacheable(value = "HtmlFragmentCache", key = "'HtmlFragment:'+#id")
 	public String selectById(String id) {
 		HtmlFragment hf = htmlFragmentMapper.selectByPrimaryKey(id);
 		return hf == null ? "" : hf.getContent();
 	}
+	
+	@CacheEvict(value = "HtmlFragmentCache", key = "'HtmlFragment:'+#id")
+	public void clean(String id) {
+		LoggerUtils.debug(logger, "清除页面缓存:[%s]", id);
+	}
 
 	@CachePut(value = "HtmlFragmentCache", key = "'HtmlFragment:'+#id")
 	public String save(String id, String content) {

+ 3 - 1
src/main/java/com/goafanti/user/controller/UserLoginController.java

@@ -4,6 +4,7 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 
 import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.web.util.WebUtils;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -59,7 +60,8 @@ public class UserLoginController extends BaseController {
 	@ResponseBody
 	public Result signin(User user,Boolean remember, HttpServletRequest request) {
 		Result res = new Result();
-		res.setData(TokenManager.login(user, remember));
+		TokenManager.login(user, remember);
+		res.setData(WebUtils.getAndClearSavedRequest(request));
 		return res;
 	}
 	

File diff suppressed because it is too large
+ 4 - 2
src/main/webapp/WEB-INF/views/common.html


+ 2 - 25
src/main/webapp/WEB-INF/views/portal/activity/activityIndex.html

@@ -32,34 +32,11 @@
 		</div>
 		<div class="secondary_navigation"></div>
 	</div>
-	<div id="myCarousel" class="carousel slide">
-		<!-- 轮播(Carousel)指标 -->
-		<ol class="carousel-indicators">
-			<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
-			<li data-target="#myCarousel" data-slide-to="1"></li>
-			<li data-target="#myCarousel" data-slide-to="2"></li>
-		</ol>
-		<!-- 轮播(Carousel)项目 -->
-		<div class="carousel-inner">
 			<div class="item active">
-				<img th:src="${portalHost + '/img/slide_img_1.png'}"
+				<img th:src="${portalHost + '/img/activity_index_banner.jpg'}"
 					alt="First slide">
 			</div>
-			<div class="item">
-				<img th:src="${portalHost + '/img/slide_img_1.png'}"
-					alt="Second slide">
-			</div>
-			<div class="item">
-				<img th:src="${portalHost + '/img/slide_img_1.png'}"
-					alt="Third slide">
-			</div>
-		</div>
-		<!-- 轮播(Carousel)导航 -->
-		<a class="carousel-control left" href="#myCarousel" data-slide="prev"><span
-			class="glyphicon glyphicon-chevron-left"></span></a> <a
-			class="carousel-control right" href="#myCarousel" data-slide="next"><span
-			class="glyphicon glyphicon-chevron-right"></span></a>
-	</div>
+
 	<div class="container active_info">
 		<div class="div_title">
 			<img th:src="${portalHost + '/img/active_info_ioc.png'}">

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


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


File diff suppressed because it is too large
+ 6 - 31
src/main/webapp/WEB-INF/views/portal/international/internationalIndex.html


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


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


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


+ 5 - 5
src/main/webapp/WEB-INF/views/portal/ipr/service.html

@@ -23,8 +23,8 @@
 					<li class="active"><a
 						th:href="${basePath + '/portal/ipr/service.html'}">知识产权服务</a></li>
 					<li><a th:href="${basePath + '/portal/ipr/apply.html'}">知识产权申请</a></li>
-					<li><a href="#">专利运营与布局</a></li>
-					<li><a href="#">知识产权贯标</a></li>
+					<li><a th:href="${basePath + '/portal/ipr/patentOperation.html'}">专利运营与布局</a></li>
+					<li><a th:href="${basePath + '/portal/ipr/iso.html'}">知识产权贯标</a></li>
 				</ul>
 			</div>
 			<div class="col-md-1 search">
@@ -43,15 +43,15 @@
 		<!-- 轮播(Carousel)项目 -->
 		<div class="carousel-inner">
 			<div class="item active">
-				<img th:src="${portalHost + '/img/slide_img_1.png'}"
+				<img th:src="${portalHost + '/img/ipr_service_banner_1.jpg'}"
 					alt="First slide">
 			</div>
 			<div class="item">
-				<img th:src="${portalHost + '/img/slide_img_1.png'}"
+				<img th:src="${portalHost + '/img/ipr_service_banner_2.jpg'}"
 					alt="Second slide">
 			</div>
 			<div class="item">
-				<img th:src="${portalHost + '/img/slide_img_1.png'}"
+				<img th:src="${portalHost + '/img/ipr_service_banner_3.jpg'}"
 					alt="Third slide">
 			</div>
 		</div>

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


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