package com.hp.cmsz.service; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; import com.hp.cmsz.repository.ChannelDao; import com.hp.cmsz.repository.PublicDao; /** * * @author Sophia * */ //Spring Bean的标识. @Component //默认将类中的所有public函数纳入事务管理. @Transactional(readOnly = true) public class JpfxService { @Autowired private ChannelDao channelDao; @Autowired private PublicDao publicDao; //渠道 public List<Object[]> getJpfxChannel(){ return (List<Object[]>) channelDao.findJpfxChannel(); } //月份 public List<Object[]> getMonthByYearName(List<String> yearNameList){ return (List<Object[]>) publicDao.findMonthByYearName(yearNameList); } }