insert 修改神厨和大健康视频发布时匹配填充模式
| | |
| | | |
| | | |
| | | /** 视频长度(秒) */ |
| | | // @NotNull(message = "视频长度不能为空", groups = {Add.class, Update.class}) |
| | | @NotNull(message = "视频长度不能为空", groups = {Add.class, Update.class}) |
| | | private Long videoDuration; |
| | | |
| | | /** 视频标题 */ |
| | | @NotBlank(message = "标题不能为空", groups = {Add.class, Update.class}) |
| | | private String title; |
| | | |
| | | @NotBlank(message = "视频填充模式不能为空",groups = {Add.class, Update.class}) |
| | | /** 视频填充模式 */ |
| | | private String videoFit; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotEmpty; |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.Size; |
| | | import java.util.List; |
| | | |
| | |
| | | |
| | | |
| | | /** 视频长度(秒) */ |
| | | // @NotNull(message = "视频长度不能为空", groups = {Add.class, Update.class}) |
| | | @NotNull(message = "视频长度不能为空", groups = {Add.class, Update.class}) |
| | | private Long videoDuration; |
| | | |
| | | /** 视频标题 */ |
| | |
| | | @Size(min = 1,max = 5, message = "标签列表不能为空",groups = {Add.class, Update.class}) |
| | | private List<String> checkKitchenType; |
| | | |
| | | @NotBlank(message = "视频填充模式不能为空",groups = {Add.class, Update.class}) |
| | | /** 视频填充模式 */ |
| | | private String videoFit; |
| | | |
| | | |
| | | |
| | |
| | | video.setAuthorId(UserContext.getCurrentUserId()); |
| | | video.setVideoType(VideoTypeEnum.HEALTH.getValue()); |
| | | //设置填充模式 保持比例,完整显示 |
| | | video.setVideoFit("contain"); |
| | | video.setVideoFit(form.getVideoFit()); |
| | | video.setVideoContentType(VideoContentTypeEnum.VIDEO.getValue()); |
| | | video.setStatus(VideoStatusEnum.PUBLISHED.getValue()); |
| | | baseMapper.insert(video); |
| | |
| | | video.setAuthorId(UserContext.getCurrentUserId()); |
| | | video.setVideoType(VideoTypeEnum.COOK.getValue()); |
| | | //设置填充模式 保持比例,完整显示 |
| | | video.setVideoFit("contain"); |
| | | video.setVideoFit(form.getVideoFit()); |
| | | video.setVideoContentType(VideoContentTypeEnum.VIDEO.getValue()); |
| | | video.setStatus(VideoStatusEnum.PUBLISHED.getValue()); |
| | | baseMapper.insert(video); |