| | |
| | | import org.apache.log4j.Logger; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.yeshi.buwan.dao.juhe.IqiyiUpdateQueueDao; |
| | | import com.yeshi.buwan.iqiyi.entity.IqiyiUpdateQueue; |
| | | import com.yeshi.buwan.dao.juhe.iqiyi.IqiyiUpdateQueueDao; |
| | | import com.yeshi.buwan.videos.iqiyi.entity.IqiyiUpdateQueue; |
| | | import com.yeshi.buwan.util.Constant; |
| | | |
| | | @Service |
| | |
| | | * @param url |
| | | */ |
| | | public void addToUpdateQueue(String name, String url) { |
| | | List<IqiyiUpdateQueue> list = iqiyiUpdateQueueDao.list("from IqiyiUpdateQueue queue where queue.url=?", |
| | | List<IqiyiUpdateQueue> list = iqiyiUpdateQueueDao.list("from IqiyiUpdateQueue mq where mq.url=?", |
| | | new Serializable[] { url }); |
| | | if (list != null && list.size() > 1) |
| | | return; |
| | |
| | | public List<IqiyiUpdateQueue> listUpdateQueue(String key, int page) { |
| | | key = key == null ? "" : key; |
| | | List<IqiyiUpdateQueue> list = iqiyiUpdateQueueDao.list( |
| | | "from IqiyiUpdateQueue queue where queue.name like ? order by queue.id desc", |
| | | "from IqiyiUpdateQueue mq where mq.name like ? order by mq.id desc", |
| | | (page - 1) * Constant.pageCount, Constant.pageCount, new Serializable[] { "%" + key + "%" }); |
| | | return list; |
| | | } |
| | | |
| | | public long countUpdateQueue(String key, int page) { |
| | | key = key == null ? "" : key; |
| | | return iqiyiUpdateQueueDao.getCount("from IqiyiUpdateQueue queue where queue.name like ?", |
| | | return iqiyiUpdateQueueDao.getCount("from IqiyiUpdateQueue mq where mq.name like ?", |
| | | new Serializable[] { "%" + key + "%" }); |
| | | } |
| | | |