24 changed files with 1930 additions and 108 deletions
@ -0,0 +1,56 @@ |
|||
package com.ccsens.mt.api; |
|||
|
|||
import com.ccsens.cloudutil.annotation.MustLogin; |
|||
import com.ccsens.mt.bean.dto.TopicDto; |
|||
import com.ccsens.mt.bean.dto.VideoDto; |
|||
import com.ccsens.mt.bean.vo.VideoVo; |
|||
import com.ccsens.mt.service.IVideoService; |
|||
import com.ccsens.util.JsonResponse; |
|||
import com.ccsens.util.bean.dto.QueryDto; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiImplicitParams; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import io.swagger.annotations.ApiParam; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RequestMethod; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.annotation.Resource; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
@Slf4j |
|||
@Api(tags = "报表相关api") |
|||
@RestController |
|||
@RequestMapping("/video") |
|||
public class VideoController { |
|||
@Resource |
|||
private IVideoService videoService; |
|||
|
|||
@MustLogin |
|||
@ApiOperation(value = "查看选手上传的视频信息", notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/get", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<List<VideoVo.GetVideoInfo>> getVideoByPlayerId(@RequestBody @ApiParam @Validated QueryDto<VideoDto.GetVideo> params) { |
|||
log.info("查看选手上传的视频信息:{}",params.toString()); |
|||
List<VideoVo.GetVideoInfo> getVideoInfoList = videoService.getVideoByPlayerId(params); |
|||
return JsonResponse.newInstance().ok(getVideoInfoList); |
|||
} |
|||
|
|||
@MustLogin |
|||
@ApiOperation(value = "上传的视频信息", notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/get", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<List<VideoVo.GetVideoInfo>> uploadVideo(@RequestBody @ApiParam @Validated QueryDto<VideoDto.UploadVideo> params) { |
|||
log.info("查看选手上传的视频信息:{}",params.toString()); |
|||
List<VideoVo.GetVideoInfo> getVideoInfoList = videoService.uploadVideo(params); |
|||
return JsonResponse.newInstance().ok(getVideoInfoList); |
|||
} |
|||
} |
@ -0,0 +1,40 @@ |
|||
package com.ccsens.mt.bean.dto; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
@Data |
|||
public class VideoDto { |
|||
@Data |
|||
@ApiModel("查看上传视频的信息") |
|||
public static class GetVideo{ |
|||
@ApiModelProperty("大赛id") |
|||
private Long competeTimeId; |
|||
@ApiModelProperty("比赛code") |
|||
private String competeCode; |
|||
@ApiModelProperty("查询的是单人还是团队 0个人 1团队") |
|||
private byte team = 0; |
|||
@ApiModelProperty("如果查询的是单人则是选手id。查询团队则传入团队id") |
|||
private Long playerId; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("上传视频信息") |
|||
public static class UploadVideo{ |
|||
@ApiModelProperty("大赛id") |
|||
private Long competeTimeId; |
|||
@ApiModelProperty("比赛code") |
|||
private String competeCode; |
|||
@ApiModelProperty("上传的是单人还是团队 0个人 1团队") |
|||
private byte team = 0; |
|||
@ApiModelProperty("如果上传的是单人则是选手id。上传团队则传入团队id") |
|||
private Long playerId; |
|||
@ApiModelProperty("视频文件id") |
|||
private Long videoFileId; |
|||
} |
|||
} |
@ -0,0 +1,150 @@ |
|||
package com.ccsens.mt.bean.po; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
public class CompeteVideo implements Serializable { |
|||
private Long id; |
|||
|
|||
private Long competeTimeId; |
|||
|
|||
private String competeCode; |
|||
|
|||
private Byte team; |
|||
|
|||
private Long playerId; |
|||
|
|||
private Long fileId; |
|||
|
|||
private String videoUrl; |
|||
|
|||
private Long time; |
|||
|
|||
private Long uploadUserId; |
|||
|
|||
private Date createdAt; |
|||
|
|||
private Date updatedAt; |
|||
|
|||
private Byte recStatus; |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
public Long getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(Long id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public Long getCompeteTimeId() { |
|||
return competeTimeId; |
|||
} |
|||
|
|||
public void setCompeteTimeId(Long competeTimeId) { |
|||
this.competeTimeId = competeTimeId; |
|||
} |
|||
|
|||
public String getCompeteCode() { |
|||
return competeCode; |
|||
} |
|||
|
|||
public void setCompeteCode(String competeCode) { |
|||
this.competeCode = competeCode == null ? null : competeCode.trim(); |
|||
} |
|||
|
|||
public Byte getTeam() { |
|||
return team; |
|||
} |
|||
|
|||
public void setTeam(Byte team) { |
|||
this.team = team; |
|||
} |
|||
|
|||
public Long getPlayerId() { |
|||
return playerId; |
|||
} |
|||
|
|||
public void setPlayerId(Long playerId) { |
|||
this.playerId = playerId; |
|||
} |
|||
|
|||
public Long getFileId() { |
|||
return fileId; |
|||
} |
|||
|
|||
public void setFileId(Long fileId) { |
|||
this.fileId = fileId; |
|||
} |
|||
|
|||
public String getVideoUrl() { |
|||
return videoUrl; |
|||
} |
|||
|
|||
public void setVideoUrl(String videoUrl) { |
|||
this.videoUrl = videoUrl == null ? null : videoUrl.trim(); |
|||
} |
|||
|
|||
public Long getTime() { |
|||
return time; |
|||
} |
|||
|
|||
public void setTime(Long time) { |
|||
this.time = time; |
|||
} |
|||
|
|||
public Long getUploadUserId() { |
|||
return uploadUserId; |
|||
} |
|||
|
|||
public void setUploadUserId(Long uploadUserId) { |
|||
this.uploadUserId = uploadUserId; |
|||
} |
|||
|
|||
public Date getCreatedAt() { |
|||
return createdAt; |
|||
} |
|||
|
|||
public void setCreatedAt(Date createdAt) { |
|||
this.createdAt = createdAt; |
|||
} |
|||
|
|||
public Date getUpdatedAt() { |
|||
return updatedAt; |
|||
} |
|||
|
|||
public void setUpdatedAt(Date updatedAt) { |
|||
this.updatedAt = updatedAt; |
|||
} |
|||
|
|||
public Byte getRecStatus() { |
|||
return recStatus; |
|||
} |
|||
|
|||
public void setRecStatus(Byte recStatus) { |
|||
this.recStatus = recStatus; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
StringBuilder sb = new StringBuilder(); |
|||
sb.append(getClass().getSimpleName()); |
|||
sb.append(" ["); |
|||
sb.append("Hash = ").append(hashCode()); |
|||
sb.append(", id=").append(id); |
|||
sb.append(", competeTimeId=").append(competeTimeId); |
|||
sb.append(", competeCode=").append(competeCode); |
|||
sb.append(", team=").append(team); |
|||
sb.append(", playerId=").append(playerId); |
|||
sb.append(", fileId=").append(fileId); |
|||
sb.append(", videoUrl=").append(videoUrl); |
|||
sb.append(", time=").append(time); |
|||
sb.append(", uploadUserId=").append(uploadUserId); |
|||
sb.append(", createdAt=").append(createdAt); |
|||
sb.append(", updatedAt=").append(updatedAt); |
|||
sb.append(", recStatus=").append(recStatus); |
|||
sb.append("]"); |
|||
return sb.toString(); |
|||
} |
|||
} |
@ -0,0 +1,941 @@ |
|||
package com.ccsens.mt.bean.po; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
public class CompeteVideoExample { |
|||
protected String orderByClause; |
|||
|
|||
protected boolean distinct; |
|||
|
|||
protected List<Criteria> oredCriteria; |
|||
|
|||
public CompeteVideoExample() { |
|||
oredCriteria = new ArrayList<Criteria>(); |
|||
} |
|||
|
|||
public void setOrderByClause(String orderByClause) { |
|||
this.orderByClause = orderByClause; |
|||
} |
|||
|
|||
public String getOrderByClause() { |
|||
return orderByClause; |
|||
} |
|||
|
|||
public void setDistinct(boolean distinct) { |
|||
this.distinct = distinct; |
|||
} |
|||
|
|||
public boolean isDistinct() { |
|||
return distinct; |
|||
} |
|||
|
|||
public List<Criteria> getOredCriteria() { |
|||
return oredCriteria; |
|||
} |
|||
|
|||
public void or(Criteria criteria) { |
|||
oredCriteria.add(criteria); |
|||
} |
|||
|
|||
public Criteria or() { |
|||
Criteria criteria = createCriteriaInternal(); |
|||
oredCriteria.add(criteria); |
|||
return criteria; |
|||
} |
|||
|
|||
public Criteria createCriteria() { |
|||
Criteria criteria = createCriteriaInternal(); |
|||
if (oredCriteria.size() == 0) { |
|||
oredCriteria.add(criteria); |
|||
} |
|||
return criteria; |
|||
} |
|||
|
|||
protected Criteria createCriteriaInternal() { |
|||
Criteria criteria = new Criteria(); |
|||
return criteria; |
|||
} |
|||
|
|||
public void clear() { |
|||
oredCriteria.clear(); |
|||
orderByClause = null; |
|||
distinct = false; |
|||
} |
|||
|
|||
protected abstract static class GeneratedCriteria { |
|||
protected List<Criterion> criteria; |
|||
|
|||
protected GeneratedCriteria() { |
|||
super(); |
|||
criteria = new ArrayList<Criterion>(); |
|||
} |
|||
|
|||
public boolean isValid() { |
|||
return criteria.size() > 0; |
|||
} |
|||
|
|||
public List<Criterion> getAllCriteria() { |
|||
return criteria; |
|||
} |
|||
|
|||
public List<Criterion> getCriteria() { |
|||
return criteria; |
|||
} |
|||
|
|||
protected void addCriterion(String condition) { |
|||
if (condition == null) { |
|||
throw new RuntimeException("Value for condition cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition)); |
|||
} |
|||
|
|||
protected void addCriterion(String condition, Object value, String property) { |
|||
if (value == null) { |
|||
throw new RuntimeException("Value for " + property + " cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition, value)); |
|||
} |
|||
|
|||
protected void addCriterion(String condition, Object value1, Object value2, String property) { |
|||
if (value1 == null || value2 == null) { |
|||
throw new RuntimeException("Between values for " + property + " cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition, value1, value2)); |
|||
} |
|||
|
|||
public Criteria andIdIsNull() { |
|||
addCriterion("id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdIsNotNull() { |
|||
addCriterion("id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdEqualTo(Long value) { |
|||
addCriterion("id =", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotEqualTo(Long value) { |
|||
addCriterion("id <>", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdGreaterThan(Long value) { |
|||
addCriterion("id >", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("id >=", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdLessThan(Long value) { |
|||
addCriterion("id <", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdLessThanOrEqualTo(Long value) { |
|||
addCriterion("id <=", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdIn(List<Long> values) { |
|||
addCriterion("id in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotIn(List<Long> values) { |
|||
addCriterion("id not in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdBetween(Long value1, Long value2) { |
|||
addCriterion("id between", value1, value2, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotBetween(Long value1, Long value2) { |
|||
addCriterion("id not between", value1, value2, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompeteTimeIdIsNull() { |
|||
addCriterion("compete_time_id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompeteTimeIdIsNotNull() { |
|||
addCriterion("compete_time_id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompeteTimeIdEqualTo(Long value) { |
|||
addCriterion("compete_time_id =", value, "competeTimeId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompeteTimeIdNotEqualTo(Long value) { |
|||
addCriterion("compete_time_id <>", value, "competeTimeId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompeteTimeIdGreaterThan(Long value) { |
|||
addCriterion("compete_time_id >", value, "competeTimeId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompeteTimeIdGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("compete_time_id >=", value, "competeTimeId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompeteTimeIdLessThan(Long value) { |
|||
addCriterion("compete_time_id <", value, "competeTimeId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompeteTimeIdLessThanOrEqualTo(Long value) { |
|||
addCriterion("compete_time_id <=", value, "competeTimeId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompeteTimeIdIn(List<Long> values) { |
|||
addCriterion("compete_time_id in", values, "competeTimeId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompeteTimeIdNotIn(List<Long> values) { |
|||
addCriterion("compete_time_id not in", values, "competeTimeId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompeteTimeIdBetween(Long value1, Long value2) { |
|||
addCriterion("compete_time_id between", value1, value2, "competeTimeId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompeteTimeIdNotBetween(Long value1, Long value2) { |
|||
addCriterion("compete_time_id not between", value1, value2, "competeTimeId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompeteCodeIsNull() { |
|||
addCriterion("compete_code is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompeteCodeIsNotNull() { |
|||
addCriterion("compete_code is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompeteCodeEqualTo(String value) { |
|||
addCriterion("compete_code =", value, "competeCode"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompeteCodeNotEqualTo(String value) { |
|||
addCriterion("compete_code <>", value, "competeCode"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompeteCodeGreaterThan(String value) { |
|||
addCriterion("compete_code >", value, "competeCode"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompeteCodeGreaterThanOrEqualTo(String value) { |
|||
addCriterion("compete_code >=", value, "competeCode"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompeteCodeLessThan(String value) { |
|||
addCriterion("compete_code <", value, "competeCode"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompeteCodeLessThanOrEqualTo(String value) { |
|||
addCriterion("compete_code <=", value, "competeCode"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompeteCodeLike(String value) { |
|||
addCriterion("compete_code like", value, "competeCode"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompeteCodeNotLike(String value) { |
|||
addCriterion("compete_code not like", value, "competeCode"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompeteCodeIn(List<String> values) { |
|||
addCriterion("compete_code in", values, "competeCode"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompeteCodeNotIn(List<String> values) { |
|||
addCriterion("compete_code not in", values, "competeCode"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompeteCodeBetween(String value1, String value2) { |
|||
addCriterion("compete_code between", value1, value2, "competeCode"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompeteCodeNotBetween(String value1, String value2) { |
|||
addCriterion("compete_code not between", value1, value2, "competeCode"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTeamIsNull() { |
|||
addCriterion("team is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTeamIsNotNull() { |
|||
addCriterion("team is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTeamEqualTo(Byte value) { |
|||
addCriterion("team =", value, "team"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTeamNotEqualTo(Byte value) { |
|||
addCriterion("team <>", value, "team"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTeamGreaterThan(Byte value) { |
|||
addCriterion("team >", value, "team"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTeamGreaterThanOrEqualTo(Byte value) { |
|||
addCriterion("team >=", value, "team"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTeamLessThan(Byte value) { |
|||
addCriterion("team <", value, "team"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTeamLessThanOrEqualTo(Byte value) { |
|||
addCriterion("team <=", value, "team"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTeamIn(List<Byte> values) { |
|||
addCriterion("team in", values, "team"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTeamNotIn(List<Byte> values) { |
|||
addCriterion("team not in", values, "team"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTeamBetween(Byte value1, Byte value2) { |
|||
addCriterion("team between", value1, value2, "team"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTeamNotBetween(Byte value1, Byte value2) { |
|||
addCriterion("team not between", value1, value2, "team"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPlayerIdIsNull() { |
|||
addCriterion("player_id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPlayerIdIsNotNull() { |
|||
addCriterion("player_id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPlayerIdEqualTo(Long value) { |
|||
addCriterion("player_id =", value, "playerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPlayerIdNotEqualTo(Long value) { |
|||
addCriterion("player_id <>", value, "playerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPlayerIdGreaterThan(Long value) { |
|||
addCriterion("player_id >", value, "playerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPlayerIdGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("player_id >=", value, "playerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPlayerIdLessThan(Long value) { |
|||
addCriterion("player_id <", value, "playerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPlayerIdLessThanOrEqualTo(Long value) { |
|||
addCriterion("player_id <=", value, "playerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPlayerIdIn(List<Long> values) { |
|||
addCriterion("player_id in", values, "playerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPlayerIdNotIn(List<Long> values) { |
|||
addCriterion("player_id not in", values, "playerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPlayerIdBetween(Long value1, Long value2) { |
|||
addCriterion("player_id between", value1, value2, "playerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPlayerIdNotBetween(Long value1, Long value2) { |
|||
addCriterion("player_id not between", value1, value2, "playerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andFileIdIsNull() { |
|||
addCriterion("file_id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andFileIdIsNotNull() { |
|||
addCriterion("file_id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andFileIdEqualTo(Long value) { |
|||
addCriterion("file_id =", value, "fileId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andFileIdNotEqualTo(Long value) { |
|||
addCriterion("file_id <>", value, "fileId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andFileIdGreaterThan(Long value) { |
|||
addCriterion("file_id >", value, "fileId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andFileIdGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("file_id >=", value, "fileId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andFileIdLessThan(Long value) { |
|||
addCriterion("file_id <", value, "fileId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andFileIdLessThanOrEqualTo(Long value) { |
|||
addCriterion("file_id <=", value, "fileId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andFileIdIn(List<Long> values) { |
|||
addCriterion("file_id in", values, "fileId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andFileIdNotIn(List<Long> values) { |
|||
addCriterion("file_id not in", values, "fileId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andFileIdBetween(Long value1, Long value2) { |
|||
addCriterion("file_id between", value1, value2, "fileId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andFileIdNotBetween(Long value1, Long value2) { |
|||
addCriterion("file_id not between", value1, value2, "fileId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlIsNull() { |
|||
addCriterion("video_url is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlIsNotNull() { |
|||
addCriterion("video_url is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlEqualTo(String value) { |
|||
addCriterion("video_url =", value, "videoUrl"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlNotEqualTo(String value) { |
|||
addCriterion("video_url <>", value, "videoUrl"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlGreaterThan(String value) { |
|||
addCriterion("video_url >", value, "videoUrl"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlGreaterThanOrEqualTo(String value) { |
|||
addCriterion("video_url >=", value, "videoUrl"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlLessThan(String value) { |
|||
addCriterion("video_url <", value, "videoUrl"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlLessThanOrEqualTo(String value) { |
|||
addCriterion("video_url <=", value, "videoUrl"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlLike(String value) { |
|||
addCriterion("video_url like", value, "videoUrl"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlNotLike(String value) { |
|||
addCriterion("video_url not like", value, "videoUrl"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlIn(List<String> values) { |
|||
addCriterion("video_url in", values, "videoUrl"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlNotIn(List<String> values) { |
|||
addCriterion("video_url not in", values, "videoUrl"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlBetween(String value1, String value2) { |
|||
addCriterion("video_url between", value1, value2, "videoUrl"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlNotBetween(String value1, String value2) { |
|||
addCriterion("video_url not between", value1, value2, "videoUrl"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTimeIsNull() { |
|||
addCriterion("time is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTimeIsNotNull() { |
|||
addCriterion("time is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTimeEqualTo(Long value) { |
|||
addCriterion("time =", value, "time"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTimeNotEqualTo(Long value) { |
|||
addCriterion("time <>", value, "time"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTimeGreaterThan(Long value) { |
|||
addCriterion("time >", value, "time"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTimeGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("time >=", value, "time"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTimeLessThan(Long value) { |
|||
addCriterion("time <", value, "time"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTimeLessThanOrEqualTo(Long value) { |
|||
addCriterion("time <=", value, "time"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTimeIn(List<Long> values) { |
|||
addCriterion("time in", values, "time"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTimeNotIn(List<Long> values) { |
|||
addCriterion("time not in", values, "time"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTimeBetween(Long value1, Long value2) { |
|||
addCriterion("time between", value1, value2, "time"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTimeNotBetween(Long value1, Long value2) { |
|||
addCriterion("time not between", value1, value2, "time"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUploadUserIdIsNull() { |
|||
addCriterion("upload_user_id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUploadUserIdIsNotNull() { |
|||
addCriterion("upload_user_id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUploadUserIdEqualTo(Long value) { |
|||
addCriterion("upload_user_id =", value, "uploadUserId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUploadUserIdNotEqualTo(Long value) { |
|||
addCriterion("upload_user_id <>", value, "uploadUserId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUploadUserIdGreaterThan(Long value) { |
|||
addCriterion("upload_user_id >", value, "uploadUserId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUploadUserIdGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("upload_user_id >=", value, "uploadUserId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUploadUserIdLessThan(Long value) { |
|||
addCriterion("upload_user_id <", value, "uploadUserId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUploadUserIdLessThanOrEqualTo(Long value) { |
|||
addCriterion("upload_user_id <=", value, "uploadUserId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUploadUserIdIn(List<Long> values) { |
|||
addCriterion("upload_user_id in", values, "uploadUserId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUploadUserIdNotIn(List<Long> values) { |
|||
addCriterion("upload_user_id not in", values, "uploadUserId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUploadUserIdBetween(Long value1, Long value2) { |
|||
addCriterion("upload_user_id between", value1, value2, "uploadUserId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUploadUserIdNotBetween(Long value1, Long value2) { |
|||
addCriterion("upload_user_id not between", value1, value2, "uploadUserId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtIsNull() { |
|||
addCriterion("created_at is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtIsNotNull() { |
|||
addCriterion("created_at is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtEqualTo(Date value) { |
|||
addCriterion("created_at =", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtNotEqualTo(Date value) { |
|||
addCriterion("created_at <>", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtGreaterThan(Date value) { |
|||
addCriterion("created_at >", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { |
|||
addCriterion("created_at >=", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtLessThan(Date value) { |
|||
addCriterion("created_at <", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtLessThanOrEqualTo(Date value) { |
|||
addCriterion("created_at <=", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtIn(List<Date> values) { |
|||
addCriterion("created_at in", values, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtNotIn(List<Date> values) { |
|||
addCriterion("created_at not in", values, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtBetween(Date value1, Date value2) { |
|||
addCriterion("created_at between", value1, value2, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtNotBetween(Date value1, Date value2) { |
|||
addCriterion("created_at not between", value1, value2, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtIsNull() { |
|||
addCriterion("updated_at is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtIsNotNull() { |
|||
addCriterion("updated_at is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtEqualTo(Date value) { |
|||
addCriterion("updated_at =", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtNotEqualTo(Date value) { |
|||
addCriterion("updated_at <>", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtGreaterThan(Date value) { |
|||
addCriterion("updated_at >", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { |
|||
addCriterion("updated_at >=", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtLessThan(Date value) { |
|||
addCriterion("updated_at <", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { |
|||
addCriterion("updated_at <=", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtIn(List<Date> values) { |
|||
addCriterion("updated_at in", values, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtNotIn(List<Date> values) { |
|||
addCriterion("updated_at not in", values, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtBetween(Date value1, Date value2) { |
|||
addCriterion("updated_at between", value1, value2, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { |
|||
addCriterion("updated_at not between", value1, value2, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusIsNull() { |
|||
addCriterion("rec_status is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusIsNotNull() { |
|||
addCriterion("rec_status is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusEqualTo(Byte value) { |
|||
addCriterion("rec_status =", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusNotEqualTo(Byte value) { |
|||
addCriterion("rec_status <>", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusGreaterThan(Byte value) { |
|||
addCriterion("rec_status >", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { |
|||
addCriterion("rec_status >=", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusLessThan(Byte value) { |
|||
addCriterion("rec_status <", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusLessThanOrEqualTo(Byte value) { |
|||
addCriterion("rec_status <=", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusIn(List<Byte> values) { |
|||
addCriterion("rec_status in", values, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusNotIn(List<Byte> values) { |
|||
addCriterion("rec_status not in", values, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusBetween(Byte value1, Byte value2) { |
|||
addCriterion("rec_status between", value1, value2, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { |
|||
addCriterion("rec_status not between", value1, value2, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
} |
|||
|
|||
public static class Criteria extends GeneratedCriteria { |
|||
|
|||
protected Criteria() { |
|||
super(); |
|||
} |
|||
} |
|||
|
|||
public static class Criterion { |
|||
private String condition; |
|||
|
|||
private Object value; |
|||
|
|||
private Object secondValue; |
|||
|
|||
private boolean noValue; |
|||
|
|||
private boolean singleValue; |
|||
|
|||
private boolean betweenValue; |
|||
|
|||
private boolean listValue; |
|||
|
|||
private String typeHandler; |
|||
|
|||
public String getCondition() { |
|||
return condition; |
|||
} |
|||
|
|||
public Object getValue() { |
|||
return value; |
|||
} |
|||
|
|||
public Object getSecondValue() { |
|||
return secondValue; |
|||
} |
|||
|
|||
public boolean isNoValue() { |
|||
return noValue; |
|||
} |
|||
|
|||
public boolean isSingleValue() { |
|||
return singleValue; |
|||
} |
|||
|
|||
public boolean isBetweenValue() { |
|||
return betweenValue; |
|||
} |
|||
|
|||
public boolean isListValue() { |
|||
return listValue; |
|||
} |
|||
|
|||
public String getTypeHandler() { |
|||
return typeHandler; |
|||
} |
|||
|
|||
protected Criterion(String condition) { |
|||
super(); |
|||
this.condition = condition; |
|||
this.typeHandler = null; |
|||
this.noValue = true; |
|||
} |
|||
|
|||
protected Criterion(String condition, Object value, String typeHandler) { |
|||
super(); |
|||
this.condition = condition; |
|||
this.value = value; |
|||
this.typeHandler = typeHandler; |
|||
if (value instanceof List<?>) { |
|||
this.listValue = true; |
|||
} else { |
|||
this.singleValue = true; |
|||
} |
|||
} |
|||
|
|||
protected Criterion(String condition, Object value) { |
|||
this(condition, value, null); |
|||
} |
|||
|
|||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { |
|||
super(); |
|||
this.condition = condition; |
|||
this.value = value; |
|||
this.secondValue = secondValue; |
|||
this.typeHandler = typeHandler; |
|||
this.betweenValue = true; |
|||
} |
|||
|
|||
protected Criterion(String condition, Object value, Object secondValue) { |
|||
this(condition, value, secondValue, null); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.ccsens.mt.bean.vo; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
@Data |
|||
public class VideoVo { |
|||
@Data |
|||
@ApiModel("查看选手上传的视频的信息") |
|||
public static class GetVideoInfo{ |
|||
@ApiModelProperty("选手上传视频记录id") |
|||
private Long videoId; |
|||
@ApiModelProperty("文件id") |
|||
private Long fileId; |
|||
// @ApiModelProperty("视频地址")
|
|||
// private String videoUrl;
|
|||
@ApiModelProperty("上传时间") |
|||
private Long uploadTime; |
|||
} |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.ccsens.mt.persist.mapper; |
|||
|
|||
import com.ccsens.mt.bean.po.CompeteVideo; |
|||
import com.ccsens.mt.bean.po.CompeteVideoExample; |
|||
import java.util.List; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
public interface CompeteVideoMapper { |
|||
long countByExample(CompeteVideoExample example); |
|||
|
|||
int deleteByExample(CompeteVideoExample example); |
|||
|
|||
int deleteByPrimaryKey(Long id); |
|||
|
|||
int insert(CompeteVideo record); |
|||
|
|||
int insertSelective(CompeteVideo record); |
|||
|
|||
List<CompeteVideo> selectByExample(CompeteVideoExample example); |
|||
|
|||
CompeteVideo selectByPrimaryKey(Long id); |
|||
|
|||
int updateByExampleSelective(@Param("record") CompeteVideo record, @Param("example") CompeteVideoExample example); |
|||
|
|||
int updateByExample(@Param("record") CompeteVideo record, @Param("example") CompeteVideoExample example); |
|||
|
|||
int updateByPrimaryKeySelective(CompeteVideo record); |
|||
|
|||
int updateByPrimaryKey(CompeteVideo record); |
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.ccsens.mt.service; |
|||
|
|||
import com.ccsens.mt.bean.dto.VideoDto; |
|||
import com.ccsens.mt.bean.vo.VideoVo; |
|||
import com.ccsens.util.bean.dto.QueryDto; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
public interface IVideoService { |
|||
/** |
|||
* 查看某个用户上传的比赛视频信息 |
|||
* @param params 比赛id和选手id |
|||
* @return 返回上传到视频文件信息 |
|||
*/ |
|||
List<VideoVo.GetVideoInfo> getVideoByPlayerId(QueryDto<VideoDto.GetVideo> params); |
|||
|
|||
/** |
|||
* 选手或团队上传视频 |
|||
* @param params 选手id或团队id |
|||
* @return 返回上传的文件信息 |
|||
*/ |
|||
List<VideoVo.GetVideoInfo> uploadVideo(QueryDto<VideoDto.UploadVideo> params); |
|||
} |
@ -0,0 +1,87 @@ |
|||
package com.ccsens.mt.service; |
|||
|
|||
|
|||
import cn.hutool.core.collection.CollectionUtil; |
|||
import cn.hutool.core.lang.Snowflake; |
|||
import com.ccsens.mt.bean.dto.VideoDto; |
|||
import com.ccsens.mt.bean.po.CompeteVideo; |
|||
import com.ccsens.mt.bean.po.CompeteVideoExample; |
|||
import com.ccsens.mt.bean.vo.VideoVo; |
|||
import com.ccsens.mt.persist.mapper.CompeteVideoMapper; |
|||
import com.ccsens.util.bean.dto.QueryDto; |
|||
|
|||
import javax.annotation.Resource; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
public class VideoService implements IVideoService{ |
|||
@Resource |
|||
private Snowflake snowflake; |
|||
@Resource |
|||
private CompeteVideoMapper competeVideoMapper; |
|||
|
|||
/** |
|||
* 查看某个用户上传的比赛视频信息 |
|||
* @param params 比赛id和选手id |
|||
* @return 返回上传到视频文件信息 |
|||
*/ |
|||
@Override |
|||
public List<VideoVo.GetVideoInfo> getVideoByPlayerId(QueryDto<VideoDto.GetVideo> params) { |
|||
VideoDto.GetVideo getVideo = params.getParam(); |
|||
List<VideoVo.GetVideoInfo> getVideoInfoList = new ArrayList<>(); |
|||
CompeteVideoExample videoExample = new CompeteVideoExample(); |
|||
videoExample.createCriteria().andCompeteCodeEqualTo(getVideo.getCompeteCode()).andCompeteTimeIdEqualTo(getVideo.getCompeteTimeId()) |
|||
.andPlayerIdEqualTo(getVideo.getPlayerId()); |
|||
List<CompeteVideo> competeVideoList = competeVideoMapper.selectByExample(videoExample); |
|||
if(CollectionUtil.isNotEmpty(competeVideoList)){ |
|||
competeVideoList.forEach(competeVideo -> { |
|||
VideoVo.GetVideoInfo getVideoInfo = new VideoVo.GetVideoInfo(); |
|||
getVideoInfo.setFileId(competeVideo.getFileId()); |
|||
getVideoInfo.setVideoId(competeVideo.getId()); |
|||
getVideoInfo.setUploadTime(competeVideo.getTime()); |
|||
getVideoInfoList.add(getVideoInfo); |
|||
}); |
|||
} |
|||
return getVideoInfoList; |
|||
} |
|||
|
|||
/** |
|||
* 选手上传比赛视频信息 |
|||
* @param params 选手id或团队id |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public List<VideoVo.GetVideoInfo> uploadVideo(QueryDto<VideoDto.UploadVideo> params) { |
|||
VideoDto.UploadVideo uploadVideo = params.getParam(); |
|||
//将视频信息储存数据库
|
|||
CompeteVideo competeVideo = new CompeteVideo(); |
|||
competeVideo.setId(snowflake.nextId()); |
|||
competeVideo.setCompeteCode(uploadVideo.getCompeteCode()); |
|||
competeVideo.setCompeteTimeId(uploadVideo.getCompeteTimeId()); |
|||
competeVideo.setTeam(uploadVideo.getTeam()); |
|||
competeVideo.setPlayerId(uploadVideo.getPlayerId()); |
|||
competeVideo.setFileId(uploadVideo.getVideoFileId()); |
|||
competeVideo.setUploadUserId(params.getUserId()); |
|||
competeVideo.setTime(System.currentTimeMillis()); |
|||
competeVideoMapper.insertSelective(competeVideo); |
|||
//返回
|
|||
List<VideoVo.GetVideoInfo> getVideoInfoList = new ArrayList<>(); |
|||
CompeteVideoExample videoExample = new CompeteVideoExample(); |
|||
videoExample.createCriteria().andCompeteCodeEqualTo(uploadVideo.getCompeteCode()).andCompeteTimeIdEqualTo(uploadVideo.getCompeteTimeId()) |
|||
.andPlayerIdEqualTo(uploadVideo.getPlayerId()); |
|||
List<CompeteVideo> competeVideoList = competeVideoMapper.selectByExample(videoExample); |
|||
if(CollectionUtil.isNotEmpty(competeVideoList)){ |
|||
competeVideoList.forEach(video -> { |
|||
VideoVo.GetVideoInfo getVideoInfo = new VideoVo.GetVideoInfo(); |
|||
getVideoInfo.setFileId(video.getFileId()); |
|||
getVideoInfo.setVideoId(video.getId()); |
|||
getVideoInfo.setUploadTime(video.getTime()); |
|||
getVideoInfoList.add(getVideoInfo); |
|||
}); |
|||
} |
|||
return getVideoInfoList; |
|||
} |
|||
} |
@ -0,0 +1,323 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ccsens.mt.persist.mapper.CompeteVideoMapper"> |
|||
<resultMap id="BaseResultMap" type="com.ccsens.mt.bean.po.CompeteVideo"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="compete_time_id" jdbcType="BIGINT" property="competeTimeId" /> |
|||
<result column="compete_code" jdbcType="VARCHAR" property="competeCode" /> |
|||
<result column="team" jdbcType="TINYINT" property="team" /> |
|||
<result column="player_id" jdbcType="BIGINT" property="playerId" /> |
|||
<result column="file_id" jdbcType="BIGINT" property="fileId" /> |
|||
<result column="video_url" jdbcType="VARCHAR" property="videoUrl" /> |
|||
<result column="time" jdbcType="BIGINT" property="time" /> |
|||
<result column="upload_user_id" jdbcType="BIGINT" property="uploadUserId" /> |
|||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|||
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|||
</resultMap> |
|||
<sql id="Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Update_By_Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Base_Column_List"> |
|||
id, compete_time_id, compete_code, team, player_id, file_id, video_url, time, upload_user_id, |
|||
created_at, updated_at, rec_status |
|||
</sql> |
|||
<select id="selectByExample" parameterType="com.ccsens.mt.bean.po.CompeteVideoExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_compete_video |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
<if test="orderByClause != null"> |
|||
order by ${orderByClause} |
|||
</if> |
|||
</select> |
|||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from t_compete_video |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_compete_video |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="com.ccsens.mt.bean.po.CompeteVideoExample"> |
|||
delete from t_compete_video |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="com.ccsens.mt.bean.po.CompeteVideo"> |
|||
insert into t_compete_video (id, compete_time_id, compete_code, |
|||
team, player_id, file_id, |
|||
video_url, time, upload_user_id, |
|||
created_at, updated_at, rec_status |
|||
) |
|||
values (#{id,jdbcType=BIGINT}, #{competeTimeId,jdbcType=BIGINT}, #{competeCode,jdbcType=VARCHAR}, |
|||
#{team,jdbcType=TINYINT}, #{playerId,jdbcType=BIGINT}, #{fileId,jdbcType=BIGINT}, |
|||
#{videoUrl,jdbcType=VARCHAR}, #{time,jdbcType=BIGINT}, #{uploadUserId,jdbcType=BIGINT}, |
|||
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} |
|||
) |
|||
</insert> |
|||
<insert id="insertSelective" parameterType="com.ccsens.mt.bean.po.CompeteVideo"> |
|||
insert into t_compete_video |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="competeTimeId != null"> |
|||
compete_time_id, |
|||
</if> |
|||
<if test="competeCode != null"> |
|||
compete_code, |
|||
</if> |
|||
<if test="team != null"> |
|||
team, |
|||
</if> |
|||
<if test="playerId != null"> |
|||
player_id, |
|||
</if> |
|||
<if test="fileId != null"> |
|||
file_id, |
|||
</if> |
|||
<if test="videoUrl != null"> |
|||
video_url, |
|||
</if> |
|||
<if test="time != null"> |
|||
time, |
|||
</if> |
|||
<if test="uploadUserId != null"> |
|||
upload_user_id, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="competeTimeId != null"> |
|||
#{competeTimeId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="competeCode != null"> |
|||
#{competeCode,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="team != null"> |
|||
#{team,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="playerId != null"> |
|||
#{playerId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="fileId != null"> |
|||
#{fileId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="videoUrl != null"> |
|||
#{videoUrl,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="time != null"> |
|||
#{time,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="uploadUserId != null"> |
|||
#{uploadUserId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
#{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
#{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
#{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="com.ccsens.mt.bean.po.CompeteVideoExample" resultType="java.lang.Long"> |
|||
select count(*) from t_compete_video |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_compete_video |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.competeTimeId != null"> |
|||
compete_time_id = #{record.competeTimeId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.competeCode != null"> |
|||
compete_code = #{record.competeCode,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.team != null"> |
|||
team = #{record.team,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="record.playerId != null"> |
|||
player_id = #{record.playerId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.fileId != null"> |
|||
file_id = #{record.fileId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.videoUrl != null"> |
|||
video_url = #{record.videoUrl,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.time != null"> |
|||
time = #{record.time,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.uploadUserId != null"> |
|||
upload_user_id = #{record.uploadUserId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.createdAt != null"> |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.updatedAt != null"> |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.recStatus != null"> |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
update t_compete_video |
|||
set id = #{record.id,jdbcType=BIGINT}, |
|||
compete_time_id = #{record.competeTimeId,jdbcType=BIGINT}, |
|||
compete_code = #{record.competeCode,jdbcType=VARCHAR}, |
|||
team = #{record.team,jdbcType=TINYINT}, |
|||
player_id = #{record.playerId,jdbcType=BIGINT}, |
|||
file_id = #{record.fileId,jdbcType=BIGINT}, |
|||
video_url = #{record.videoUrl,jdbcType=VARCHAR}, |
|||
time = #{record.time,jdbcType=BIGINT}, |
|||
upload_user_id = #{record.uploadUserId,jdbcType=BIGINT}, |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.mt.bean.po.CompeteVideo"> |
|||
update t_compete_video |
|||
<set> |
|||
<if test="competeTimeId != null"> |
|||
compete_time_id = #{competeTimeId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="competeCode != null"> |
|||
compete_code = #{competeCode,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="team != null"> |
|||
team = #{team,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="playerId != null"> |
|||
player_id = #{playerId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="fileId != null"> |
|||
file_id = #{fileId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="videoUrl != null"> |
|||
video_url = #{videoUrl,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="time != null"> |
|||
time = #{time,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="uploadUserId != null"> |
|||
upload_user_id = #{uploadUserId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status = #{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="com.ccsens.mt.bean.po.CompeteVideo"> |
|||
update t_compete_video |
|||
set compete_time_id = #{competeTimeId,jdbcType=BIGINT}, |
|||
compete_code = #{competeCode,jdbcType=VARCHAR}, |
|||
team = #{team,jdbcType=TINYINT}, |
|||
player_id = #{playerId,jdbcType=BIGINT}, |
|||
file_id = #{fileId,jdbcType=BIGINT}, |
|||
video_url = #{videoUrl,jdbcType=VARCHAR}, |
|||
time = #{time,jdbcType=BIGINT}, |
|||
upload_user_id = #{uploadUserId,jdbcType=BIGINT}, |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{recStatus,jdbcType=TINYINT} |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
</mapper> |
@ -1,4 +1,4 @@ |
|||
spring: |
|||
profiles: |
|||
active: dev |
|||
include: util-dev,common |
|||
active: test |
|||
include: util-test,common |
|||
|
Loading…
Reference in new issue