|
|
@ -68,16 +68,22 @@ public class CompeteVedioService implements ICompeteVedioService{ |
|
|
|
|
|
|
|
@Override |
|
|
|
public String uploadVideoPath(VideoDto.UploadVdeo param) { |
|
|
|
CompeteVideoExample competeVideoExample=new CompeteVideoExample(); |
|
|
|
competeVideoExample.createCriteria().andProjectIdEqualTo(param.getCompeteProjectId()).andPlayerIdEqualTo(param.getPlayerOrTeamId()).andRecStatusEqualTo((byte)0); |
|
|
|
List<CompeteVideo> competeVideos = competeVideoMapper.selectByExample(competeVideoExample); |
|
|
|
if(competeVideos.size()>0){ |
|
|
|
return competeVideos.get(0).getVideoUrl(); |
|
|
|
} |
|
|
|
CompeteVideo competeVideo=new CompeteVideo(); |
|
|
|
competeVideo.setId(snowflake.nextId()); |
|
|
|
competeVideo.setCompeteTimeId(param.getCompeteTimeId()); |
|
|
|
competeVideo.setProjectId(param.getCompeteProjectId()); |
|
|
|
//competeVideo.setProjectId(param.getCompeteProjectId());
|
|
|
|
competeVideo.setPlayerId(param.getPlayerOrTeamId()); |
|
|
|
competeVideo.setVideoUrl(param.getVideoPath()); |
|
|
|
competeVideo.setRecStatus((byte) 0); |
|
|
|
long startTime = System.currentTimeMillis(); |
|
|
|
competeVideo.setUploadTime(startTime); |
|
|
|
competeVideoMapper.insert(competeVideo); |
|
|
|
competeVideoMapper.insertSelective(competeVideo); |
|
|
|
return param.getVideoPath(); |
|
|
|
} |
|
|
|
|
|
|
|