Antiloveg пре 8 година
родитељ
комит
f2c7aa0a4c

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

@@ -312,29 +312,29 @@ public class WebpageController extends BaseController {
 	/**
 	 * 大咖说
 	 */
-	@RequestMapping(value = "/portal/scienceTechnology/bigShot", method = RequestMethod.GET)
+	/*@RequestMapping(value = "/portal/scienceTechnology/bigShot", method = RequestMethod.GET)
 	public ModelAndView portalScienceTechnologyBigShot(HttpServletRequest request, ModelAndView modelview) {
 		modelview.setViewName("/portal/scienceTechnology/bigShot");
 		return modelview;
-	}
+	}*/
 
 	/**
 	 * 科技讲堂
 	 */
-	@RequestMapping(value = "/portal/scienceTechnology/lecture", method = RequestMethod.GET)
+	/*@RequestMapping(value = "/portal/scienceTechnology/lecture", method = RequestMethod.GET)
 	public ModelAndView portalScienceTechnologyLecture(HttpServletRequest request, ModelAndView modelview) {
 		modelview.setViewName("/portal/scienceTechnology/lecture");
 		return modelview;
-	}
+	}*/
 
 	/**
 	 * 科技明星
 	 */
-	@RequestMapping(value = "/portal/scienceTechnology/star", method = RequestMethod.GET)
+	/*@RequestMapping(value = "/portal/scienceTechnology/star", method = RequestMethod.GET)
 	public ModelAndView portalScienceTechnologyStar(HttpServletRequest request, ModelAndView modelview) {
 		modelview.setViewName("/portal/scienceTechnology/star");
 		return modelview;
-	}
+	}*/
 
 	/**
 	 * 首页

+ 2 - 2
src/main/java/com/goafanti/lecture/service/impl/LectureServiceImpl.java

@@ -146,13 +146,13 @@ public class LectureServiceImpl extends BaseMybatisDao<LectureMapper> implements
 	}
 
 	@Override
-	@Cacheable(value = "LectureListCache", key = "'LectureList:'+#lectureListCacheKey")
+	//@Cacheable(value = "LectureListCache", key = "'LectureList:'+#lectureListCacheKey")
 	public List<LectureListBo> findLectureList(Integer lectureListCacheKey) {
 		return lectureMapper.findLectureList();
 	}
 	
 	@Override
-	@Cacheable(value = "LectureListCache", key = "'LectureList:'+#lectureListCacheKey")
+	@CacheEvict(value = "LectureListCache", key = "'LectureList:'+#lectureListCacheKey")
 	public void clearLectureList(Integer lectureListCacheKey) {
 		LoggerUtils.debug(logger, "清除科技讲堂列表缓存:[%s]", lectureListCacheKey);
 	}

+ 5 - 3
src/main/java/com/goafanti/portal/controller/PortalBigShotController.java

@@ -5,6 +5,8 @@ import java.util.List;
 import javax.annotation.Resource;
 
 import org.apache.commons.lang3.StringUtils;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.servlet.ModelAndView;
 
@@ -31,8 +33,7 @@ public class PortalBigShotController extends BaseController {
 	@Resource
 	private EngagedFieldGlossoryService	engagedFieldGlossoryService;
 
-	// @RequestMapping(value = "/portal/scienceTechnology/bigShot", method =
-	// RequestMethod.GET)
+	@RequestMapping(value = "/portal/scienceTechnology/bigShot", method = RequestMethod.GET)
 	public ModelAndView bigShot() {
 		ModelAndView mv = new ModelAndView();
 		List<BigShotStarListBo> starList = starService.listBigShotStar(AFTConstants.BIG_SHOT_STAR_CACHE_KEY);
@@ -57,7 +58,8 @@ public class PortalBigShotController extends BaseController {
 			}
 			mv.addObject("starList", starList);
 		}
-		List<BigShotLectureListBo> lectureList = lectureService.listBigShotLecture(AFTConstants.BIG_SHOT_LECTURE_CACHE_KEY);
+		List<BigShotLectureListBo> lectureList = lectureService
+				.listBigShotLecture(AFTConstants.BIG_SHOT_LECTURE_CACHE_KEY);
 		mv.addObject("lectureList", lectureList);
 		mv.setViewName("/portal/scienceTechnology/bigShot");
 		return mv;

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

@@ -25,8 +25,7 @@ public class PortalLectureController extends BaseController {
 	@Resource
 	private LectureService lectureService;
 
-	// @RequestMapping(value = "/portal/scienceTechnology/lecture", method =
-	// RequestMethod.GET)
+	 @RequestMapping(value = "/portal/scienceTechnology/lecture", method = RequestMethod.GET)
 	public ModelAndView lecture() {
 		ModelAndView mv = new ModelAndView();
 		List<LectureListBo> lectureList = lectureService.findLectureList(AFTConstants.LECTURE_LIST_CACHE_KEY);

+ 5 - 3
src/main/java/com/goafanti/portal/controller/PortalStarController.java

@@ -5,6 +5,8 @@ import java.util.List;
 import javax.annotation.Resource;
 
 import org.apache.commons.lang3.StringUtils;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.servlet.ModelAndView;
 
@@ -31,11 +33,11 @@ public class PortalStarController extends BaseController {
 	@Resource
 	private EngagedFieldGlossoryService	engagedFieldGlossoryService;
 
-	// @RequestMapping(value = "/portal/scienceTechnology/star", method =
-	// RequestMethod.GET)
+	 @RequestMapping(value = "/portal/scienceTechnology/star", method = RequestMethod.GET)
 	public ModelAndView star() {
 		ModelAndView mv = new ModelAndView();
-		List<LectureListBo> lectureDynamicList = lectureService.listDynamic(AFTConstants.LECTURE_DYNAMIC_LIST_CACHE_KEY);
+		List<LectureListBo> lectureDynamicList = lectureService
+				.listDynamic(AFTConstants.LECTURE_DYNAMIC_LIST_CACHE_KEY);
 		mv.addObject("lectureDynamicList", lectureDynamicList);
 		List<BigShotStarListBo> starList = starService.listBigShotStar(AFTConstants.BIG_SHOT_STAR_CACHE_KEY);
 		if (null != starList && starList.size() > 0) {

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

@@ -56,68 +56,20 @@
 		</div>
 		<div class="star_list">
 			<ul>
-				<li>
-					<div class="star_content_img">
-						<img th:src="${portalHost + '/img/star_img_1.png'}">
-						<a href="#">
-                            <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
-                            关注
-                        </a>
-					</div>
-					<div class="star_content_info">
-						<h4>陈政清</h4>
-						<h5>湖南大学 土木工程学院</h5>
-						<h5>“985”工程首席科学家</h5>
-						<p class="mt20"><label>技术:</label> <span class="red">4</span>项</p>
-						<p><label>粉丝:</label> <span class="red">456</span>人</p>
-					</div>
-				</li>
-				<li>
+				<li th:each="star,iterStart:${starList}">
 					<div class="star_content_img">
-						<img th:src="${portalHost + '/img/star_img_2.png'}">
+						<img th:src="${avatarHost + star.personPortraitUrl}">
 						<a href="#">
                             <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
                             关注
                         </a>
 					</div>
 					<div class="star_content_info">
-						<h4>袁隆平</h4>
-						<h5>中国工程院院士</h5>
-						<h5>中国杂交水稻工程技术研究中心主任</h5>
-						<p class="mt20"><label>技术:</label> <span class="red">6</span>项</p>
-						<p><label>粉丝:</label> <span class="red">3647</span>人</p>
-					</div>
-				</li>
-				<li>
-					<div class="star_content_img">
-						<img th:src="${portalHost + '/img/star_img_3.png'}">
-						<a href="#">
-                            <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
-                            关注
-                        </a>
-					</div>
-					<div class="star_content_info">
-						<h4>钟志华</h4>
-						<h5>中国工程院机械与运载工程学部院士</h5>
-						<h5>车辆工程专家</h5>
-						<p class="mt20"><label>技术:</label> <span class="red">5</span>项</p>
-						<p><label>粉丝:</label> <span class="red">79</span>人</p>
-					</div>
-				</li>
-				<li>
-					<div class="star_content_img">
-						<img th:src="${portalHost + '/img/star_img_4.png'}">
-						<a href="#">
-                            <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
-                            关注
-                        </a>
-					</div>
-					<div class="star_content_info">
-						<h4>张泽</h4>
-						<h5>中国科学院院士</h5>
-						<h5>材料科学晶体结构专家</h5>
-						<p class="mt20"><label>技术:</label> <span class="red">2</span>项</p>
-						<p><label>粉丝:</label> <span class="red">56</span>人</p>
+						<h4 th:text="${star.username}">陈政清</h4>
+						<h5 th:text="${star.workUnit}">湖南大学 土木工程学院</h5>
+						<h5 th:text="${star.professionalTitle}">“985”工程首席科学家</h5>
+						<p class="mt20"><label>技术:</label> <span class="red" th:text="${star.achievementNum}">4</span>项</p>
+						<p><label>粉丝:</label> <span class="red" th:text="${star.fansNum}">456</span>人</p>
 					</div>
 				</li>
 			</ul>
@@ -150,43 +102,13 @@
 		</div>
 		<div class="star_list">
 			<ul>
-				<li>
-					<div class="star_content_img">
-						<img th:src="${portalHost + '/img/star_img_5.jpg'}">
-					</div>
-					<div class="lecture_content_info">
-						<h5>科技成果转化项目开展讲座</h5>
-						<p class="mt20">2017-06-30</p>
-						<a href="#" class="customer-service">报名中</a>
-					</div>
-				</li>
-				<li>
-					<div class="star_content_img">
-						<img th:src="${portalHost + '/img/star_img_6.jpg'}">
-					</div>
-					<div class="lecture_content_info">
-						<h5>技术转移服务运营模式</h5>
-						<p class="mt20">2017-06-10</p>
-						<a href="#" class="customer-service">报名中</a>
-					</div>
-				</li>
-				<li>
-					<div class="star_content_img">
-						<img th:src="${portalHost + '/img/star_img_7.jpg'}">
-					</div>
-					<div class="lecture_content_info">
-						<h5>精准扶贫:互联网+农村电子商务</h5>
-						<p class="mt20">2017-08-10</p>
-						<a href="#" class="customer-service">报名中</a>
-					</div>
-				</li>
-				<li>
+				<li th:each="leccture,iterStart:${lectureList}">
 					<div class="star_content_img">
-						<img th:src="${portalHost + '/img/star_img_8.jpg'}">
+						<img th:src="${avatarHost + lecture.lectureUrl}">
 					</div>
 					<div class="lecture_content_info">
-						<h5>互联网在物流行业中的应用</h5>
-						<p class="mt20">2017-07-20</p>
+						<h5 th:text="${lecture.name}">科技成果转化项目开展讲座</h5>
+						<p class="mt20" th:text="${lecture.lectureTimeFormattedDate}">2017-06-30</p>
 						<a href="#" class="customer-service">报名中</a>
 					</div>
 				</li>

Разлика између датотеке није приказан због своје велике величине
+ 7 - 48
src/main/webapp/WEB-INF/views/portal/scienceTechnology/lecture.html


+ 11 - 91
src/main/webapp/WEB-INF/views/portal/scienceTechnology/star.html

@@ -134,10 +134,10 @@
 			<div id="active_notice_ul">
 				<div class="qimo">
 					<div id="active_notice_ul1">
-						<ul>
-							<li><a href='#'>· 袁隆平取得重大突破</a></li>
-							<li><a href='#'>· 周凌宇举办科技成果发布会</a></li>
-							<li><a href='#'>· 中国科交会</a></li>
+						<ul th:each="lectureDynamic,iterStart:${lectureDynamicList}">
+							<li th:text="${lectureDynamic.username}"><a href='#'>· 袁隆平取得重大突破</a></li>
+							<li th:text="${lectureDynamic.name}"><a href='#'>· 周凌宇举办科技成果发布会</a></li>
+							<li th:text="${lectureDynamic.lectureTime}"><a href='#'>· 中国科交会</a></li>
 						</ul>
 					</div>
 					<div id="active_notice_ul2"></div>
@@ -153,101 +153,21 @@
 		</div>
 		<div id="myTabContent" class="expert_list">
 			<ul>
-				<li>
+				<li th:each="star,iterStart:${starList}">
 					<div class="expert_content_img">
-						<img th:src="${portalHost + '/img/big_star_img_s_1.png'}">
+						<img th:src="${avatarHost + star.personPortraitUrl}">
 						<a href="#">
                             <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
                             关注
                         </a>
 					</div>
 					<div class="expert_content_info">
-						<h4>薛志敏</h4>
+						<h4 th:text="${star.username}">薛志敏</h4>
 						<!--<a href="#" class="start">邀请开讲</a>-->
-						<p>中南大学湘雅二医院</p>
-						<p>精神病学 精神卫生学 生物精神病学</p>
-						<p class="mt25"><label>技术: </label> <span class="red">4</span>人</p>
-						<p><label>粉丝: </label> <span class="red">654</span>次</p>
-					</div>
-				</li>
-				<li>
-					<div class="expert_content_img">
-						<img th:src="${portalHost + '/img/big_star_img_s_2.png'}">
-						<a href="#">
-                            <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
-                            关注
-                        </a>
-					</div>
-					<div class="expert_content_info">
-						<h4>李官成</h4>
-						<p>中南大学 肿瘤研究所</p>
-						<p>肿瘤免疫学</p>
-						<p class="mt25"><label>技术: </label> <span class="red">9</span>人</p>
-						<p><label>粉丝: </label> <span class="red">233</span>次</p>
-					</div>
-				</li>
-				<li>
-					<div class="expert_content_img">
-						<img th:src="${portalHost + '/img/big_star_img_s_3.png'}">
-						<a href="#">
-                            <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
-                            关注
-                        </a>
-					</div>
-					<div class="expert_content_info">
-						<h4>周凌宇</h4>
-						<p>中南大学 土木工程 结构工程</p>
-						<p>钢-混组合箱梁受力性能</p>
-						<p class="mt25"><label>技术: </label> <span class="red">13</span>人</p>
-						<p><label>粉丝: </label> <span class="red">309</span>次</p>
-					</div>
-				</li>
-				<li>
-					<div class="expert_content_img">
-						<img th:src="${portalHost + '/img/big_star_img_s_4.png'}">
-						<a href="#">
-                            <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
-                            关注
-                        </a>
-					</div>
-					<div class="expert_content_info">
-						<h4>孙立忠</h4>
-						<p>湘潭大学材料科学与工程学院</p>
-						<p>微纳光电子材料 石墨纳米带电输运</p>
-						<p class="mt25"><label>技术: </label> <span class="red">14</span>人</p>
-						<p><label>粉丝: </label> <span class="red">569</span>次</p>
-					</div>
-				</li>
-				<li>
-					<div class="expert_content_img">
-						<img th:src="${portalHost + '/img/big_star_img_s_5.png'}">
-						<a href="#">
-                            <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
-                            关注
-                        </a>
-					</div>
-					<div class="expert_content_info">
-						<h4>邓联文</h4>
-						<p>中南大学 电子信息学院</p>
-						<p>电子信息材料</p>
-						<p class="mt25"><label>技术: </label> <span class="red">19</span>人</p>
-						<p><label>粉丝: </label> <span class="red">529</span>次</p>
-					</div>
-				</li>
-				<li>
-					<div class="expert_content_img">
-						<img th:src="${portalHost + '/img/big_star_img_s_6.png'}">
-						<a href="#">
-                            <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
-                            关注
-                        </a>
-					</div>
-					<div class="expert_content_info">
-						<h4>何红生</h4>
-						<p>湖南省煤炭地质勘查院</p>
-						<p>页岩气、煤层气、煤炭地质、矿产地质</p>
-						<p class="mt25"><label>技术: </label> <span class="red">59</span>人</p>
-						<p><label>粉丝: </label> <span class="red">759</span>次</p>
+						<p th:text="${star.workUnit}">中南大学湘雅二医院</p>
+						<p th:text="${star.engagedField}">精神病学 精神卫生学 生物精神病学</p>
+						<p class="mt25"><label>技术: </label> <span class="red" th:text="${star.achievementNum}">4</span>人</p>
+						<p><label>粉丝: </label> <span class="red" th:text="${star.fansNum}">654</span>次</p>
 					</div>
 				</li>
 			</ul>