You've already forked FrameTour-BE
- 移除TaskController上的@Deprecated注解 - 在VideoController中新增/checkBuyStatus接口用于查询视频购买状态 - 新增VideoReviewController控制器,提供评价管理功能 - 新增MapTypeHandler用于处理Map类型与JSON字段的转换 - 在VideoMapper中增加countBuyRecordByVideoId方法查询视频购买记录 - 新增视频评价相关实体类、DTO及Mapper接口 - 实现VideoReviewService服务类,支持评价新增、分页查询、统计分析和Excel导出 - 在VideoServiceImpl中实现checkVideoBuyStatus方法 - 修改VideoMapper.xml,关联task表并查询task_params字段 - 新增VideoReviewMapper.xml配置文件,实现评价相关SQL查询
69 lines
2.1 KiB
Java
69 lines
2.1 KiB
Java
package com.ycwl.basic.mapper;
|
|
|
|
import com.ycwl.basic.model.pc.task.entity.TaskEntity;
|
|
import com.ycwl.basic.model.pc.video.entity.MemberVideoEntity;
|
|
import com.ycwl.basic.model.pc.video.entity.VideoEntity;
|
|
import com.ycwl.basic.model.pc.video.req.VideoReqQuery;
|
|
import com.ycwl.basic.model.pc.video.resp.VideoRespVO;
|
|
import lombok.NonNull;
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
|
|
import java.util.Date;
|
|
import java.util.List;
|
|
|
|
/**
|
|
* @Author:longbinbin
|
|
* @Date:2024/12/2 15:27
|
|
* 成片
|
|
*/
|
|
@Mapper
|
|
public interface VideoMapper {
|
|
List<VideoRespVO> list(VideoReqQuery videoReqQuery);
|
|
VideoRespVO getById(Long id);
|
|
int add(VideoEntity task);
|
|
int deleteById(Long id);
|
|
int update(VideoEntity task);
|
|
int updateMeta(VideoEntity task);
|
|
|
|
VideoEntity findByTaskId(@NonNull Long taskId);
|
|
|
|
|
|
int addRelation(MemberVideoEntity source);
|
|
int addRelations(List<MemberVideoEntity> list);
|
|
int updateRelation(MemberVideoEntity memberVideoEntity);
|
|
|
|
List<VideoRespVO> queryByRelation(VideoReqQuery videoReqQuery);
|
|
|
|
List<MemberVideoEntity> userFaceTemplateVideo(Long userId, Long faceId, Long templateId);
|
|
|
|
MemberVideoEntity queryRelationByMemberTask(Long userId, Long taskId);
|
|
List<MemberVideoEntity> listRelationByTask(Long taskId);
|
|
List<MemberVideoEntity> listRelationByFace(Long faceId);
|
|
List<MemberVideoEntity> listRelationByFaceAndTemplate(Long faceId, Long templateId);
|
|
|
|
List<TaskEntity> listTaskByScenicRelation(Long userId, Long scenicId);
|
|
|
|
MemberVideoEntity queryUserVideo(Long userId, Long videoId);
|
|
|
|
int updateRelationWhenTaskSuccess(Long taskId, Long videoId, int isBuy);
|
|
|
|
List<MemberVideoEntity> listRelationByCreateTime(Date startTime, Date endTime);
|
|
|
|
VideoEntity getEntity(Long videoId);
|
|
|
|
int deleteNotBuyRelations(Long scenicId, Date endDate);
|
|
|
|
int deleteNotBuyFaceRelations(Long userId, Long faceId);
|
|
|
|
int deleteUselessVideo();
|
|
|
|
int updateMemberIdByFaceId(Long faceId, Long memberId);
|
|
|
|
/**
|
|
* 查询指定视频是否存在已购买记录
|
|
* @param videoId 视频ID
|
|
* @return 已购买记录数量
|
|
*/
|
|
int countBuyRecordByVideoId(Long videoId);
|
|
}
|