package com.yeshi.buwan.service.imp.recommend;
|
|
import java.util.List;
|
|
import javax.annotation.Resource;
|
|
import org.springframework.cache.annotation.Cacheable;
|
import org.springframework.stereotype.Service;
|
|
import com.yeshi.buwan.dao.recommend.AdRecommendRightDao;
|
import com.yeshi.buwan.domain.recommend.AdRecommendRight;
|
|
@Service
|
public class AdRecommendRightService {
|
|
@Resource
|
private AdRecommendRightDao adRecommendRightDao;
|
|
@Cacheable(value="homeCache",key="'getAdRecommendRight'")
|
public AdRecommendRight getAdRecommendRight() {
|
List<AdRecommendRight> list = adRecommendRightDao.list("from AdRecommendRight");
|
if (list == null || list.size() == 0) {
|
return null;
|
} else {
|
return list.get(0);
|
}
|
}
|
}
|