| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.orm.hibernate4.HibernateCallback; |
| | | import org.springframework.stereotype.Service; |
| | | import org.yeshi.utils.StringUtil; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | |
| | | } |
| | | } |
| | | |
| | | public List<CategoryVideo> getCategoryList(List<VideoInfo> videoInfoList) { |
| | | String hql = "from CategoryVideo cv where "; |
| | | List<String> orList=new ArrayList<>(); |
| | | for (VideoInfo videoInfo : videoInfoList) { |
| | | orList.add( "cv.video.id=" + videoInfo.getId() ); |
| | | } |
| | | hql+= StringUtil.concat(orList," or "); |
| | | return categoryVideoDao.list(hql); |
| | | } |
| | | |
| | | } |