Antiloveg 8 years ago
parent
commit
b52376a599

+ 1 - 1
src/main/java/com/goafanti/common/dao/StarMapper.java

@@ -27,5 +27,5 @@ public interface StarMapper {
 
 	void insertBatch(List<Star> startList);
 
-	List<BigShotStarListBo> listBigShotStar(String uid);
+	List<BigShotStarListBo> listBigShotStar();
 }

+ 1 - 3
src/main/java/com/goafanti/common/mapper/StarMapper.xml

@@ -152,15 +152,13 @@
   		uc.professional_title as professionalTitle,
   		uc.work_unit as workUnit,
   		adc.achievement_count as achievementNum,
-  		info.person_portrait_url as personPortraitUrl,
-  		interest.id as interestId
+  		info.person_portrait_url as personPortraitUrl
   	from star s
   	left join user u on u.id = s.uid
   	left join user_info info on info.uid = s.uid
   	left join user_identity ui on ui.uid = s.uid
   	left join user_career uc on uc.uid = s.uid
   	left join achievement_demand_count adc on adc.uid = s.uid 
-  	left join user_interest interest on interest.to_uid = s.uid and interest.from_uid = #{uid,jdbcType=VARCHAR}
   	where s.hot = 1 
   </select>
 </mapper>

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

@@ -10,10 +10,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.servlet.ModelAndView;
 
+import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.controller.BaseController;
-import com.goafanti.common.model.User;
-import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.engagedFieldGlossory.service.EngagedFieldGlossoryService;
 import com.goafanti.lecture.bo.BigShotLectureListBo;
 import com.goafanti.lecture.service.LectureService;
@@ -38,7 +37,7 @@ public class PortalBigShotController extends BaseController {
 	@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, TokenManager.getToken() instanceof User ? TokenManager.getUserId() : null);
+		List<BigShotStarListBo> starList = starService.listBigShotStar(AFTConstants.BIG_SHOT_STAR_CACHE_KEY);
 		if (null != starList && starList.size() > 0) {
 			for (BigShotStarListBo bo : starList) {
 				if (StringUtils.isNotBlank(bo.getUid())) {
@@ -66,5 +65,13 @@ public class PortalBigShotController extends BaseController {
 		mv.setViewName("/portal/scienceTechnology/bigShot");
 		return mv;
 	}
+	
+	/**
+	 * 关注
+	 */
+	public Result interestStatus(){
+		Result res = new Result();
+		return res;
+	}
 
 }

+ 1 - 1
src/main/java/com/goafanti/star/service/StarService.java

@@ -15,7 +15,7 @@ public interface StarService {
 
 	void save(List<Star> star, String[] hot);
 
-	public List<BigShotStarListBo> listBigShotStar(Integer bigShotStarCacheKey, String uid);
+	public List<BigShotStarListBo> listBigShotStar(Integer bigShotStarCacheKey);
 	
 	public void clearBigShotStarList(Integer bigShotStarCacheKey);
 	

+ 2 - 2
src/main/java/com/goafanti/star/service/impl/StarServiceImpl.java

@@ -60,8 +60,8 @@ public class StarServiceImpl implements StarService {
 
 	@Override
 	@Cacheable(value = "BigShotStarListCache", key = "'BigShotStarList:'+#bigShotStarCacheKey")
-	public List<BigShotStarListBo> listBigShotStar(Integer bigShotStarCacheKey, String uid) {
-		return starMapper.listBigShotStar(uid);
+	public List<BigShotStarListBo> listBigShotStar(Integer bigShotStarCacheKey) {
+		return starMapper.listBigShotStar();
 	}
 
 	@Override

+ 25 - 13
src/main/webapp/WEB-INF/views/portal/news/newsDetails.html

@@ -51,8 +51,10 @@
 								<img th:src="${avatarUploadHost + it.titleImg}">
 							</div>
 							<div class="newsDetails_txt">
-								<p th:text="${it.summary}"></p>
-								<a th:href="${'/portal/news/newsDetail.html?newsId=' + it.id}">[详细]</a>
+								<p>
+									<span th:text="${it.summary}"></span><a
+										th:href="${'/portal/news/newsDetail.html?newsId=' + it.id}">[详细]</a>
+								</p>
 								<span th:text="${it.source}"></span> <i
 									th:text="${it.createTimeFormattedDate}"></i>
 							</div>
@@ -76,8 +78,10 @@
 								<img th:src="${avatarUploadHost + it.titleImg}">
 							</div>
 							<div class="newsDetails_txt">
-								<p th:text="${it.summary}"></p>
-								<a th:href="${'/portal/news/newsDetail.html?newsId=' + it.id}">[详细]</a>
+								<p>
+									<span th:text="${it.summary}"></span><a
+										th:href="${'/portal/news/newsDetail.html?newsId=' + it.id}">[详细]</a>
+								</p>
 								<span th:text="${it.source}"></span> <i
 									th:text="${it.createTimeFormattedDate}"></i>
 							</div>
@@ -101,8 +105,10 @@
 								<img th:src="${avatarUploadHost + it.titleImg}">
 							</div>
 							<div class="newsDetails_txt">
-								<p th:text="${it.summary}"></p>
-								<a th:href="${'/portal/news/newsDetail.html?newsId=' + it.id}">[详细]</a>
+								<p>
+									<span th:text="${it.summary}"></span><a
+										th:href="${'/portal/news/newsDetail.html?newsId=' + it.id}">[详细]</a>
+								</p>
 								<span th:text="${it.source}"></span> <i
 									th:text="${it.createTimeFormattedDate}"></i>
 							</div>
@@ -126,8 +132,10 @@
 								<img th:src="${avatarUploadHost + it.titleImg}">
 							</div>
 							<div class="newsDetails_txt">
-								<p th:text="${it.summary}"></p>
-								<a th:href="${'/portal/news/newsDetail.html?newsId=' + it.id}">[详细]</a>
+								<p>
+									<span th:text="${it.summary}"></span><a
+										th:href="${'/portal/news/newsDetail.html?newsId=' + it.id}">[详细]</a>
+								</p>
 								<span th:text="${it.source}"></span> <i
 									th:text="${it.createTimeFormattedDate}"></i>
 							</div>
@@ -151,8 +159,10 @@
 								<img th:src="${avatarUploadHost + it.titleImg}">
 							</div>
 							<div class="newsDetails_txt">
-								<p th:text="${it.summary}"></p>
-								<a th:href="${'/portal/news/newsDetail.html?newsId=' + it.id}">[详细]</a>
+								<p>
+									<span th:text="${it.summary}"></span><a
+										th:href="${'/portal/news/newsDetail.html?newsId=' + it.id}">[详细]</a>
+								</p>
 								<span th:text="${it.source}"></span> <i
 									th:text="${it.createTimeFormattedDate}"></i>
 							</div>
@@ -176,8 +186,10 @@
 								<img th:src="${avatarUploadHost + it.titleImg}">
 							</div>
 							<div class="newsDetails_txt">
-								<p th:text="${it.summary}"></p>
-								<a th:href="${'/portal/news/newsDetail.html?newsId=' + it.id}">[详细]</a>
+								<p>
+									<span th:text="${it.summary}"></span><a
+										th:href="${'/portal/news/newsDetail.html?newsId=' + it.id}">[详细]</a>
+								</p>
 								<span th:text="${it.source}"></span> <i
 									th:text="${it.createTimeFormattedDate}"></i>
 							</div>
@@ -197,7 +209,7 @@
 	</footer>
 	<script type="text/javascript" th:src="${portalHost + '/vendors.js'}"></script>
 	<script type="text/javascript"
-		th:src="${portalHost + '/news/newsDetails.js'}"></script> 
+		th:src="${portalHost + '/news/newsDetails.js'}"></script>
 </body>
 
 </html>