| | |
| | | |
| | | import com.iplatform.model.po.Rc_video_t1; |
| | | import com.iplatform.model.po.Rc_video_t2; |
| | | import com.iplatform.model.po.Rc_video_user; |
| | | import com.walker.infrastructure.utils.DateUtils; |
| | | import com.walker.infrastructure.utils.StringUtils; |
| | | import com.walker.jdbc.service.BaseServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | private static final String SQL_CHECK_VIDEO_STATUS = "select * from milvus_video_status where id=?"; |
| | | private static final String SQL_CLEAR_VIDEO_T1 = "delete from rc_video_t1 where src_img=?"; |
| | | private static final String SQL_CLEAR_VIDEO_T2 = "delete from rc_video_t2 where src_video_id=?"; |
| | | |
| | | private static final String SQL_GET_BATCH_VIDEO = "select user_id, src_video_id from rc_video_batch where batch_id=?"; |
| | | |
| | | private static final String SQL_UPDATE_TASK_STATUS_LOAD = "update rc_task_status set status='1', end_time=? where last_value=? and status='0'"; |
| | | |
| | | /** |
| | | * 写入视频相似度第一级临时数据,每个图像包含多个相似视频记录。 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 写入用户推荐视频记录集合,并更新批次任务状态为(已完成) |
| | | * @param videoUserList |
| | | * @param batchId |
| | | */ |
| | | public void execBatchInsertVideoUser(List<Rc_video_user> videoUserList, String batchId){ |
| | | this.insert(videoUserList); |
| | | Object[] param = new Object[2]; |
| | | param[0] = Long.parseLong(DateUtils.getDateTimeSecondForShow()); |
| | | param[1] = Long.parseLong(batchId); |
| | | this.execute(SQL_UPDATE_TASK_STATUS_LOAD, param); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 返回一个批次用户对应视频记录集合,用于最后更新用户推荐视频数据。 |
| | | * @param batchId |
| | | * @return |
| | | * @date 2022-09-26 |
| | | */ |
| | | public List<Map<String, Object>> queryBatchUserVideoList(String batchId){ |
| | | return this.select(SQL_GET_BATCH_VIDEO, new Object[]{batchId}); |
| | | } |
| | | |
| | | public List<Rc_video_t2> queryVideoT_2List(String batchId){ |
| | | return this.select(new Rc_video_t2(), "where batch_id=?", new Object[]{batchId}); |
| | | } |
| | | |
| | | /** |
| | | * 根据原始视频ID返回相似记录集合。 |
| | | * @param srcVideoId |
| | | * @return |