Antiloveg 8 years ago
parent
commit
7a4fcc9b36

+ 4 - 0
src/main/java/com/goafanti/core/cache/serializer/FastJsonRedisSerializer.java

@@ -16,6 +16,10 @@ public class FastJsonRedisSerializer implements RedisSerializer<Object> {
 		pc.addAccept("com.goafanti.common.model.News");
 		pc.addAccept("com.goafanti.news.bo.NewsSummary");
 		pc.addAccept("com.goafanti.common.model.Banners");
+		pc.addAccept("com.goafanti.common.EngagedFieldGlossory");
+		pc.addAccept("com.goafanti.star.bo.BigShotStarListBo");
+		pc.addAccept("com.goafanti.lecture.bo.LectureListBo");
+		pc.addAccept("com.goafanti.lecture.bo.BigShotLectureListBo");
 	}
 
 	@Override

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

@@ -12,6 +12,7 @@ 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.Cacheable;
 import org.springframework.stereotype.Service;
 
 import com.goafanti.common.constant.AFTConstants;
@@ -121,7 +122,7 @@ public class LectureServiceImpl extends BaseMybatisDao<LectureMapper> implements
 	}
 
 	@Override
-	//@Cacheable(value = "LectureDynamicListCache", key = "'LectureDynamicList:'+#lectureDynamicListCacheKey")
+	@Cacheable(value = "LectureDynamicListCache", key = "'LectureDynamicList:'+#lectureDynamicListCacheKey")
 	public List<LectureListBo> listDynamic(Integer lectureDynamicListCacheKey) {
 		return lectureMapper.listDynamic();
 	}
@@ -133,7 +134,7 @@ public class LectureServiceImpl extends BaseMybatisDao<LectureMapper> implements
 	}
 
 	@Override
-	//@Cacheable(value = "BigShotLectureListCache", key = "'BigShotLectureList:'+#bigShotLectureCacheKey")
+	@Cacheable(value = "BigShotLectureListCache", key = "'BigShotLectureList:'+#bigShotLectureCacheKey")
 	public List<BigShotLectureListBo> listBigShotLecture(Integer bigShotLectureCacheKey) {
 		return lectureMapper.listBigShotLecture();
 	}
@@ -145,7 +146,7 @@ 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();
 	}

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

@@ -9,6 +9,7 @@ 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.Cacheable;
 import org.springframework.stereotype.Service;
 
 import com.goafanti.common.dao.StarMapper;
@@ -66,7 +67,7 @@ public class StarServiceImpl implements StarService {
 	}
 
 	@Override
-	//@Cacheable(value = "BigShotStarListCache", key = "'BigShotStarList:'+#bigShotStarCacheKey")
+	@Cacheable(value = "BigShotStarListCache", key = "'BigShotStarList:'+#bigShotStarCacheKey")
 	public List<BigShotStarListBo> listBigShotStar(Integer bigShotStarCacheKey) {
 		return starMapper.listBigShotStar();
 	}