| | |
| | | |
| | | import com.iplatform.model.po.Rc_video_batch; |
| | | import com.iplatform.model.po.Rc_video_t2; |
| | | import com.iplatform.model.po.Rc_video_user; |
| | | import com.walker.db.page.GenericPager; |
| | | import com.walker.jdbc.service.BaseServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | public class VideoShowServiceImpl extends BaseServiceImpl { |
| | | |
| | | /** |
| | | * 查询给定用户推荐的视频集合 |
| | | * @param userId |
| | | * @param limit 限制返回几条 |
| | | * @return |
| | | */ |
| | | public List<Rc_video_user> queryRecommendList(long userId, int limit){ |
| | | if(limit <= 0){ |
| | | limit = 128; |
| | | } |
| | | return this.select("select video_id, score from rc_video_user where user_id=? order by score desc limit ?", new Object[]{userId, limit}, new Rc_video_user()); |
| | | } |
| | | |
| | | /** |
| | | * 返回部分原始视频集合,用于选择相似视频使用。 |
| | | * @return |
| | | */ |