| | |
| | | import com.yeshi.buwan.service.inter.system.SystemConfigService; |
| | | import com.yeshi.buwan.util.mq.CMQManager; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | return selectByPrimaryKey(id); |
| | | } |
| | | |
| | | @Override |
| | | public List<InternetSearchVideo> listByIds(List<String> ids) { |
| | | if (ids == null || ids.size() == 0) { |
| | | return new ArrayList<>(); |
| | | } |
| | | Query query = new Query(); |
| | | List<Criteria> orList = new ArrayList<>(); |
| | | for (String id : ids) { |
| | | orList.add(Criteria.where("id").is(id)); |
| | | } |
| | | Criteria[] ors = new Criteria[orList.size()]; |
| | | orList.toArray(ors); |
| | | query.addCriteria(new Criteria().orOperator(ors)); |
| | | return internetSearchVideoDao.findList(query); |
| | | } |
| | | |
| | | |
| | | } |