diff --git a/src/main/java/com/yutou/nas/Services/IVideoToolsService.java b/src/main/java/com/yutou/nas/Services/IVideoToolsService.java new file mode 100644 index 0000000..9906d24 --- /dev/null +++ b/src/main/java/com/yutou/nas/Services/IVideoToolsService.java @@ -0,0 +1,8 @@ +package com.yutou.nas.Services; + +import java.io.File; + +public interface IVideoToolsService { + void scanVideo(); + // void outSubtitle(int id, String code, File file); +} diff --git a/src/main/java/com/yutou/nas/Services/impl/VideoToolsService.java b/src/main/java/com/yutou/nas/Services/impl/VideoToolsService.java new file mode 100644 index 0000000..2fb6d46 --- /dev/null +++ b/src/main/java/com/yutou/nas/Services/impl/VideoToolsService.java @@ -0,0 +1,220 @@ +package com.yutou.nas.Services.impl; + +import com.alibaba.fastjson.JSONObject; +import com.yutou.nas.Services.IVideoToolsService; +import com.yutou.nas.bangumi.BangumiTools; +import com.yutou.nas.interfaces.ObjectInterface; +import com.yutou.nas.mybatis.dao.VideoDataDao; +import com.yutou.nas.mybatis.dao.VideoInfoDao; +import com.yutou.nas.mybatis.dao.VideoSubtitlesDao; +import com.yutou.nas.mybatis.model.VideoData; +import com.yutou.nas.mybatis.model.VideoInfo; +import com.yutou.nas.mybatis.model.VideoInfoExample; +import com.yutou.nas.mybatis.model.VideoSubtitles; +import com.yutou.nas.utils.AppTools; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.io.File; +import java.util.*; + +@Service("VideoToolsService") +public class VideoToolsService implements IVideoToolsService { + + + @Resource + VideoInfoDao infoDao; + @Resource + VideoDataDao dataDao; + @Resource + VideoSubtitlesDao subtitlesDao; + + @Override + public void scanVideo() { + scanVideoDir(new File("Z:\\download\\anim\\打了300年的史莱姆,不知不觉就练到了满级")); + scanVideo(new File("Z:\\download\\anim\\打了300年的史莱姆,不知不觉就练到了满级")); + List videoInfos = videoDirInfo(new File("Z:\\download\\anim\\打了300年的史莱姆,不知不觉就练到了满级")); + for (VideoInfo videoInfo : videoInfos) { + System.out.println(videoInfo.getTitleCn()); + } + System.out.println("输入新番信息:"); + String name = "一弦定音!第二季"; + for (VideoInfo videoInfo : videoInfos) { + if (videoInfo.getId() == 292969) { + VideoInfoExample example = new VideoInfoExample(); + example.createCriteria().andTitleCnEqualTo("打了300年的史莱姆,不知不觉就练到了满级"); + VideoInfo info = infoDao.selectByExample(example).get(0); + videoInfo.setId(info.getId()); + videoInfo.setPath(info.getPath()); + infoDao.updateByPrimaryKey(videoInfo); + } + if (videoInfo.getId() == 270060) { + VideoInfoExample example = new VideoInfoExample(); + example.createCriteria().andTitleCnEqualTo("s2"); + VideoInfo info = infoDao.selectByExample(example).get(0); + videoInfo.setId(info.getId()); + videoInfo.setPath(info.getPath()); + infoDao.updateByPrimaryKey(videoInfo); + } + } + } + + public void scanVideoDir(File dirPath) { + int dirCount = 0; + for (File file : dirPath.listFiles()) { + if (file.isDirectory()) { + VideoInfo info = new VideoInfo(); + info.setTitleCn(file.getName()); + info.setPath(file.getAbsolutePath()); + infoDao.insert(info); + dirCount++; + } + } + if (dirCount != dirPath.listFiles().length) { + VideoInfo info = new VideoInfo(); + info.setTitleCn(dirPath.getName()); + info.setPath(dirPath.getAbsolutePath()); + infoDao.insert(info); + } + } + + public void scanVideo(File dir) { + for (File file : dir.listFiles()) { + if (file.isDirectory()) { + scanVideo(file); + } else { + if (file.getName().endsWith(".mp4") + || file.getName().endsWith("mkv") + ) { + VideoInfoExample example = new VideoInfoExample(); + example.createCriteria().andPathEqualTo(dir.getAbsolutePath()); + videoInfo(infoDao.selectByExample(example).get(0).getId(), file); + } + } + } + } + + private void videoInfo(int vid, File file) { + AppTools.exec("ffmpeg -i \"" + file.getAbsolutePath() + "\"", new ObjectInterface() { + @Override + public void out(String data) { + super.out(data); + String[] ffmpegData = data.split("\n"); + Map map = new LinkedHashMap<>(); + for (String ffmpegDatum : ffmpegData) { + if (ffmpegDatum.trim().startsWith("Stream #")) { + String[] metadata = ffmpegDatum.split(": "); + map.put(metadata[0].trim() + "_" + metadata[1], metadata[2]); + } + if (ffmpegDatum.trim().startsWith("Duration: ")) { + map.put("Duration", ffmpegDatum.replace("Duration: ", "").trim().split("\\,")[0]); + } + } + //System.out.println(data); + VideoData videoData = new VideoData(); + videoData.setVid(vid); + videoData.setPath(file.getAbsolutePath()); + videoData.setFiletitle(file.getName()); + videoData.setIsplay(0); + videoData.setLastplaytime("00:00:00"); + for (String key : map.keySet()) { + System.out.println("vid = " + vid + " file = " + file.getName() + " key = " + key + " value = " + map.get(key)); + if (key.endsWith("Video")) { + videoData.setVideodata(map.get(key)); + } + if (key.endsWith("Audio")) { + videoData.setSounddata(map.get(key)); + } + if ("Duration".equals(key)) { + videoData.setVideotimer(map.get(key)); + } + } + dataDao.insert(videoData); + for (String key : map.keySet()) { + if (key.endsWith("Subtitle")) { + String code = key.replace("Stream #", "").split("\\(")[0]; + String title = key.replace("Stream #" + code, "") + .split("_Subtitle")[0] + .replace("(", "") + .replace(")", ""); + new SubtitleTrack().outFFMpegSubtitle(videoData.getId(), code, title, file); + } + } + + } + }, false, false); + } + + public class SubtitleTrack { + private void outFFMpegSubtitle(int id, String code, String title, File file) { + if (new File(file.getAbsolutePath() + "." + title + ".srt").exists()) { + new File(file.getAbsolutePath() + "." + title + ".srt").deleteOnExit(); + } + new Thread(new Runnable() { + @Override + public void run() { + String exec = "ffmpeg -i \"" + file.getAbsolutePath() + "\" -vn -an -map " + code + " \"" + file.getAbsolutePath() + "." + title + ".srt\""; + System.out.println("exec = " + exec); + AppTools.exec(exec + "\n", new ObjectInterface() { + @Override + public void out(String data) { + super.out(data); + System.out.println("保存字幕文件:" + title); + VideoSubtitles subtitles = new VideoSubtitles(); + subtitles.setVid(id); + subtitles.setPath(file.getAbsolutePath() + "." + title + ".srt"); + subtitles.setSubtitle(title); + subtitlesDao.insert(subtitles); + } + }, false, false); + + } + }).start(); + } + public void selectFile(int id,String code,File sub){ + + } + } + + + private List videoDirInfo(File file) { + List videoInfos = new ArrayList<>(); + JSONObject main = BangumiTools.search(file.getName()); + if (main.getInteger("results") > 0) { + List list = main.getJSONArray("list").toJavaList(JSONObject.class); + Collections.reverse(list); + for (JSONObject item : list) { + VideoInfo info = new VideoInfo(); + info.setId(item.getInteger("id")); + info.setTitleCn(item.getString("name_cn")); + info.setTitleJp(item.getString("name")); + info.setAirData(item.getString("air_date")); + info.setAirWeekday(item.getInteger("air_weekday") + ""); + info.setBangumiRating(Double.valueOf(item.getJSONObject("rating").getFloat("score"))); + info.setBangumiUrl(item.getString("url")); + info.setEpsCount(item.getInteger("eps") + ""); + info.setEpsNow("0"); + if (item.containsKey("crt")) { + info.setCrts(item.getJSONArray("crt").toJSONString()); + } + if (item.containsKey("staff")) { + info.setStaffs(item.getJSONArray("staff").toJSONString()); + } + info.setImage(item.getJSONObject("images").getString("large")); + info.setInfo(item.getString("summary")); + info.setPath(file.getAbsolutePath()); + videoInfos.add(info); + } + } + return videoInfos; + } + + public static void main(String[] args) { + // videoInfo(0,new File("Z:\\download\\anim\\小林家的龙女仆S\\[NC-Raws] 小林家的龙女仆S - 01 [B-Global][WEB-DL][2160p][AVC AAC][CHS_CHT_ENG_TH_SRT][MKV].mkv")); + //videoDirInfo(new File("Z:\\download\\anim\\小林家的龙女仆S\\")); + /* List list = videoDirInfo(new File("Z:\\download\\anim\\小林家的龙女仆S\\")); + for (VideoInfo videoInfo : list) { + System.out.println(videoInfo.getTitle()); + }*/ + } +} diff --git a/src/main/java/com/yutou/nas/interfaces/ObjectInterface.java b/src/main/java/com/yutou/nas/interfaces/ObjectInterface.java new file mode 100644 index 0000000..013ef8b --- /dev/null +++ b/src/main/java/com/yutou/nas/interfaces/ObjectInterface.java @@ -0,0 +1,5 @@ +package com.yutou.nas.interfaces; + +public abstract class ObjectInterface { + public void out(String data){}; +} diff --git a/src/main/java/com/yutou/nas/mybatis/dao/VideoDataDao.java b/src/main/java/com/yutou/nas/mybatis/dao/VideoDataDao.java new file mode 100644 index 0000000..6e31511 --- /dev/null +++ b/src/main/java/com/yutou/nas/mybatis/dao/VideoDataDao.java @@ -0,0 +1,33 @@ +package com.yutou.nas.mybatis.dao; + +import com.yutou.nas.mybatis.model.VideoData; +import com.yutou.nas.mybatis.model.VideoDataExample; +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +@Mapper +public interface VideoDataDao { + long countByExample(VideoDataExample example); + + int deleteByExample(VideoDataExample example); + + int deleteByPrimaryKey(Integer id); + + int insert(VideoData record); + + int insertSelective(VideoData record); + + List selectByExample(VideoDataExample example); + + VideoData selectByPrimaryKey(Integer id); + + int updateByExampleSelective(@Param("record") VideoData record, @Param("example") VideoDataExample example); + + int updateByExample(@Param("record") VideoData record, @Param("example") VideoDataExample example); + + int updateByPrimaryKeySelective(VideoData record); + + int updateByPrimaryKey(VideoData record); +} \ No newline at end of file diff --git a/src/main/java/com/yutou/nas/mybatis/dao/VideoInfoDao.java b/src/main/java/com/yutou/nas/mybatis/dao/VideoInfoDao.java new file mode 100644 index 0000000..dbf7607 --- /dev/null +++ b/src/main/java/com/yutou/nas/mybatis/dao/VideoInfoDao.java @@ -0,0 +1,32 @@ +package com.yutou.nas.mybatis.dao; + +import com.yutou.nas.mybatis.model.VideoInfo; +import com.yutou.nas.mybatis.model.VideoInfoExample; +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +@Mapper +public interface VideoInfoDao { + long countByExample(VideoInfoExample example); + + int deleteByExample(VideoInfoExample example); + + int deleteByPrimaryKey(Integer id); + + int insert(VideoInfo record); + + int insertSelective(VideoInfo record); + + List selectByExample(VideoInfoExample example); + + VideoInfo selectByPrimaryKey(Integer id); + + int updateByExampleSelective(@Param("record") VideoInfo record, @Param("example") VideoInfoExample example); + + int updateByExample(@Param("record") VideoInfo record, @Param("example") VideoInfoExample example); + + int updateByPrimaryKeySelective(VideoInfo record); + + int updateByPrimaryKey(VideoInfo record); +} \ No newline at end of file diff --git a/src/main/java/com/yutou/nas/mybatis/dao/VideoSubtitlesDao.java b/src/main/java/com/yutou/nas/mybatis/dao/VideoSubtitlesDao.java new file mode 100644 index 0000000..2535f2b --- /dev/null +++ b/src/main/java/com/yutou/nas/mybatis/dao/VideoSubtitlesDao.java @@ -0,0 +1,32 @@ +package com.yutou.nas.mybatis.dao; + +import com.yutou.nas.mybatis.model.VideoSubtitles; +import com.yutou.nas.mybatis.model.VideoSubtitlesExample; +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +@Mapper +public interface VideoSubtitlesDao { + long countByExample(VideoSubtitlesExample example); + + int deleteByExample(VideoSubtitlesExample example); + + int deleteByPrimaryKey(Integer id); + + int insert(VideoSubtitles record); + + int insertSelective(VideoSubtitles record); + + List selectByExample(VideoSubtitlesExample example); + + VideoSubtitles selectByPrimaryKey(Integer id); + + int updateByExampleSelective(@Param("record") VideoSubtitles record, @Param("example") VideoSubtitlesExample example); + + int updateByExample(@Param("record") VideoSubtitles record, @Param("example") VideoSubtitlesExample example); + + int updateByPrimaryKeySelective(VideoSubtitles record); + + int updateByPrimaryKey(VideoSubtitles record); +} \ No newline at end of file diff --git a/src/main/java/com/yutou/nas/mybatis/model/VideoData.java b/src/main/java/com/yutou/nas/mybatis/model/VideoData.java new file mode 100644 index 0000000..86dbfef --- /dev/null +++ b/src/main/java/com/yutou/nas/mybatis/model/VideoData.java @@ -0,0 +1,31 @@ +package com.yutou.nas.mybatis.model; + +import java.io.Serializable; +import lombok.Data; + +/** + * video_data + * @author + */ +@Data +public class VideoData implements Serializable { + private Integer id; + + private Integer vid; + + private String filetitle; + + private String path; + + private String videotimer; + + private String videodata; + + private String sounddata; + + private Integer isplay; + + private String lastplaytime; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/com/yutou/nas/mybatis/model/VideoDataExample.java b/src/main/java/com/yutou/nas/mybatis/model/VideoDataExample.java new file mode 100644 index 0000000..e430b44 --- /dev/null +++ b/src/main/java/com/yutou/nas/mybatis/model/VideoDataExample.java @@ -0,0 +1,801 @@ +package com.yutou.nas.mybatis.model; + +import java.util.ArrayList; +import java.util.List; + +public class VideoDataExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public VideoDataExample() { + oredCriteria = new ArrayList<>(); + } + + 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 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 criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List 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(Integer value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Integer value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Integer value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Integer value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Integer value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Integer value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Integer value1, Integer value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Integer value1, Integer value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andVidIsNull() { + addCriterion("vid is null"); + return (Criteria) this; + } + + public Criteria andVidIsNotNull() { + addCriterion("vid is not null"); + return (Criteria) this; + } + + public Criteria andVidEqualTo(Integer value) { + addCriterion("vid =", value, "vid"); + return (Criteria) this; + } + + public Criteria andVidNotEqualTo(Integer value) { + addCriterion("vid <>", value, "vid"); + return (Criteria) this; + } + + public Criteria andVidGreaterThan(Integer value) { + addCriterion("vid >", value, "vid"); + return (Criteria) this; + } + + public Criteria andVidGreaterThanOrEqualTo(Integer value) { + addCriterion("vid >=", value, "vid"); + return (Criteria) this; + } + + public Criteria andVidLessThan(Integer value) { + addCriterion("vid <", value, "vid"); + return (Criteria) this; + } + + public Criteria andVidLessThanOrEqualTo(Integer value) { + addCriterion("vid <=", value, "vid"); + return (Criteria) this; + } + + public Criteria andVidIn(List values) { + addCriterion("vid in", values, "vid"); + return (Criteria) this; + } + + public Criteria andVidNotIn(List values) { + addCriterion("vid not in", values, "vid"); + return (Criteria) this; + } + + public Criteria andVidBetween(Integer value1, Integer value2) { + addCriterion("vid between", value1, value2, "vid"); + return (Criteria) this; + } + + public Criteria andVidNotBetween(Integer value1, Integer value2) { + addCriterion("vid not between", value1, value2, "vid"); + return (Criteria) this; + } + + public Criteria andFiletitleIsNull() { + addCriterion("fileTitle is null"); + return (Criteria) this; + } + + public Criteria andFiletitleIsNotNull() { + addCriterion("fileTitle is not null"); + return (Criteria) this; + } + + public Criteria andFiletitleEqualTo(String value) { + addCriterion("fileTitle =", value, "filetitle"); + return (Criteria) this; + } + + public Criteria andFiletitleNotEqualTo(String value) { + addCriterion("fileTitle <>", value, "filetitle"); + return (Criteria) this; + } + + public Criteria andFiletitleGreaterThan(String value) { + addCriterion("fileTitle >", value, "filetitle"); + return (Criteria) this; + } + + public Criteria andFiletitleGreaterThanOrEqualTo(String value) { + addCriterion("fileTitle >=", value, "filetitle"); + return (Criteria) this; + } + + public Criteria andFiletitleLessThan(String value) { + addCriterion("fileTitle <", value, "filetitle"); + return (Criteria) this; + } + + public Criteria andFiletitleLessThanOrEqualTo(String value) { + addCriterion("fileTitle <=", value, "filetitle"); + return (Criteria) this; + } + + public Criteria andFiletitleLike(String value) { + addCriterion("fileTitle like", value, "filetitle"); + return (Criteria) this; + } + + public Criteria andFiletitleNotLike(String value) { + addCriterion("fileTitle not like", value, "filetitle"); + return (Criteria) this; + } + + public Criteria andFiletitleIn(List values) { + addCriterion("fileTitle in", values, "filetitle"); + return (Criteria) this; + } + + public Criteria andFiletitleNotIn(List values) { + addCriterion("fileTitle not in", values, "filetitle"); + return (Criteria) this; + } + + public Criteria andFiletitleBetween(String value1, String value2) { + addCriterion("fileTitle between", value1, value2, "filetitle"); + return (Criteria) this; + } + + public Criteria andFiletitleNotBetween(String value1, String value2) { + addCriterion("fileTitle not between", value1, value2, "filetitle"); + return (Criteria) this; + } + + public Criteria andPathIsNull() { + addCriterion("`path` is null"); + return (Criteria) this; + } + + public Criteria andPathIsNotNull() { + addCriterion("`path` is not null"); + return (Criteria) this; + } + + public Criteria andPathEqualTo(String value) { + addCriterion("`path` =", value, "path"); + return (Criteria) this; + } + + public Criteria andPathNotEqualTo(String value) { + addCriterion("`path` <>", value, "path"); + return (Criteria) this; + } + + public Criteria andPathGreaterThan(String value) { + addCriterion("`path` >", value, "path"); + return (Criteria) this; + } + + public Criteria andPathGreaterThanOrEqualTo(String value) { + addCriterion("`path` >=", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLessThan(String value) { + addCriterion("`path` <", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLessThanOrEqualTo(String value) { + addCriterion("`path` <=", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLike(String value) { + addCriterion("`path` like", value, "path"); + return (Criteria) this; + } + + public Criteria andPathNotLike(String value) { + addCriterion("`path` not like", value, "path"); + return (Criteria) this; + } + + public Criteria andPathIn(List values) { + addCriterion("`path` in", values, "path"); + return (Criteria) this; + } + + public Criteria andPathNotIn(List values) { + addCriterion("`path` not in", values, "path"); + return (Criteria) this; + } + + public Criteria andPathBetween(String value1, String value2) { + addCriterion("`path` between", value1, value2, "path"); + return (Criteria) this; + } + + public Criteria andPathNotBetween(String value1, String value2) { + addCriterion("`path` not between", value1, value2, "path"); + return (Criteria) this; + } + + public Criteria andVideotimerIsNull() { + addCriterion("videoTimer is null"); + return (Criteria) this; + } + + public Criteria andVideotimerIsNotNull() { + addCriterion("videoTimer is not null"); + return (Criteria) this; + } + + public Criteria andVideotimerEqualTo(String value) { + addCriterion("videoTimer =", value, "videotimer"); + return (Criteria) this; + } + + public Criteria andVideotimerNotEqualTo(String value) { + addCriterion("videoTimer <>", value, "videotimer"); + return (Criteria) this; + } + + public Criteria andVideotimerGreaterThan(String value) { + addCriterion("videoTimer >", value, "videotimer"); + return (Criteria) this; + } + + public Criteria andVideotimerGreaterThanOrEqualTo(String value) { + addCriterion("videoTimer >=", value, "videotimer"); + return (Criteria) this; + } + + public Criteria andVideotimerLessThan(String value) { + addCriterion("videoTimer <", value, "videotimer"); + return (Criteria) this; + } + + public Criteria andVideotimerLessThanOrEqualTo(String value) { + addCriterion("videoTimer <=", value, "videotimer"); + return (Criteria) this; + } + + public Criteria andVideotimerLike(String value) { + addCriterion("videoTimer like", value, "videotimer"); + return (Criteria) this; + } + + public Criteria andVideotimerNotLike(String value) { + addCriterion("videoTimer not like", value, "videotimer"); + return (Criteria) this; + } + + public Criteria andVideotimerIn(List values) { + addCriterion("videoTimer in", values, "videotimer"); + return (Criteria) this; + } + + public Criteria andVideotimerNotIn(List values) { + addCriterion("videoTimer not in", values, "videotimer"); + return (Criteria) this; + } + + public Criteria andVideotimerBetween(String value1, String value2) { + addCriterion("videoTimer between", value1, value2, "videotimer"); + return (Criteria) this; + } + + public Criteria andVideotimerNotBetween(String value1, String value2) { + addCriterion("videoTimer not between", value1, value2, "videotimer"); + return (Criteria) this; + } + + public Criteria andVideodataIsNull() { + addCriterion("videoData is null"); + return (Criteria) this; + } + + public Criteria andVideodataIsNotNull() { + addCriterion("videoData is not null"); + return (Criteria) this; + } + + public Criteria andVideodataEqualTo(String value) { + addCriterion("videoData =", value, "videodata"); + return (Criteria) this; + } + + public Criteria andVideodataNotEqualTo(String value) { + addCriterion("videoData <>", value, "videodata"); + return (Criteria) this; + } + + public Criteria andVideodataGreaterThan(String value) { + addCriterion("videoData >", value, "videodata"); + return (Criteria) this; + } + + public Criteria andVideodataGreaterThanOrEqualTo(String value) { + addCriterion("videoData >=", value, "videodata"); + return (Criteria) this; + } + + public Criteria andVideodataLessThan(String value) { + addCriterion("videoData <", value, "videodata"); + return (Criteria) this; + } + + public Criteria andVideodataLessThanOrEqualTo(String value) { + addCriterion("videoData <=", value, "videodata"); + return (Criteria) this; + } + + public Criteria andVideodataLike(String value) { + addCriterion("videoData like", value, "videodata"); + return (Criteria) this; + } + + public Criteria andVideodataNotLike(String value) { + addCriterion("videoData not like", value, "videodata"); + return (Criteria) this; + } + + public Criteria andVideodataIn(List values) { + addCriterion("videoData in", values, "videodata"); + return (Criteria) this; + } + + public Criteria andVideodataNotIn(List values) { + addCriterion("videoData not in", values, "videodata"); + return (Criteria) this; + } + + public Criteria andVideodataBetween(String value1, String value2) { + addCriterion("videoData between", value1, value2, "videodata"); + return (Criteria) this; + } + + public Criteria andVideodataNotBetween(String value1, String value2) { + addCriterion("videoData not between", value1, value2, "videodata"); + return (Criteria) this; + } + + public Criteria andSounddataIsNull() { + addCriterion("soundData is null"); + return (Criteria) this; + } + + public Criteria andSounddataIsNotNull() { + addCriterion("soundData is not null"); + return (Criteria) this; + } + + public Criteria andSounddataEqualTo(String value) { + addCriterion("soundData =", value, "sounddata"); + return (Criteria) this; + } + + public Criteria andSounddataNotEqualTo(String value) { + addCriterion("soundData <>", value, "sounddata"); + return (Criteria) this; + } + + public Criteria andSounddataGreaterThan(String value) { + addCriterion("soundData >", value, "sounddata"); + return (Criteria) this; + } + + public Criteria andSounddataGreaterThanOrEqualTo(String value) { + addCriterion("soundData >=", value, "sounddata"); + return (Criteria) this; + } + + public Criteria andSounddataLessThan(String value) { + addCriterion("soundData <", value, "sounddata"); + return (Criteria) this; + } + + public Criteria andSounddataLessThanOrEqualTo(String value) { + addCriterion("soundData <=", value, "sounddata"); + return (Criteria) this; + } + + public Criteria andSounddataLike(String value) { + addCriterion("soundData like", value, "sounddata"); + return (Criteria) this; + } + + public Criteria andSounddataNotLike(String value) { + addCriterion("soundData not like", value, "sounddata"); + return (Criteria) this; + } + + public Criteria andSounddataIn(List values) { + addCriterion("soundData in", values, "sounddata"); + return (Criteria) this; + } + + public Criteria andSounddataNotIn(List values) { + addCriterion("soundData not in", values, "sounddata"); + return (Criteria) this; + } + + public Criteria andSounddataBetween(String value1, String value2) { + addCriterion("soundData between", value1, value2, "sounddata"); + return (Criteria) this; + } + + public Criteria andSounddataNotBetween(String value1, String value2) { + addCriterion("soundData not between", value1, value2, "sounddata"); + return (Criteria) this; + } + + public Criteria andIsplayIsNull() { + addCriterion("isPlay is null"); + return (Criteria) this; + } + + public Criteria andIsplayIsNotNull() { + addCriterion("isPlay is not null"); + return (Criteria) this; + } + + public Criteria andIsplayEqualTo(Integer value) { + addCriterion("isPlay =", value, "isplay"); + return (Criteria) this; + } + + public Criteria andIsplayNotEqualTo(Integer value) { + addCriterion("isPlay <>", value, "isplay"); + return (Criteria) this; + } + + public Criteria andIsplayGreaterThan(Integer value) { + addCriterion("isPlay >", value, "isplay"); + return (Criteria) this; + } + + public Criteria andIsplayGreaterThanOrEqualTo(Integer value) { + addCriterion("isPlay >=", value, "isplay"); + return (Criteria) this; + } + + public Criteria andIsplayLessThan(Integer value) { + addCriterion("isPlay <", value, "isplay"); + return (Criteria) this; + } + + public Criteria andIsplayLessThanOrEqualTo(Integer value) { + addCriterion("isPlay <=", value, "isplay"); + return (Criteria) this; + } + + public Criteria andIsplayIn(List values) { + addCriterion("isPlay in", values, "isplay"); + return (Criteria) this; + } + + public Criteria andIsplayNotIn(List values) { + addCriterion("isPlay not in", values, "isplay"); + return (Criteria) this; + } + + public Criteria andIsplayBetween(Integer value1, Integer value2) { + addCriterion("isPlay between", value1, value2, "isplay"); + return (Criteria) this; + } + + public Criteria andIsplayNotBetween(Integer value1, Integer value2) { + addCriterion("isPlay not between", value1, value2, "isplay"); + return (Criteria) this; + } + + public Criteria andLastplaytimeIsNull() { + addCriterion("lastPlayTime is null"); + return (Criteria) this; + } + + public Criteria andLastplaytimeIsNotNull() { + addCriterion("lastPlayTime is not null"); + return (Criteria) this; + } + + public Criteria andLastplaytimeEqualTo(String value) { + addCriterion("lastPlayTime =", value, "lastplaytime"); + return (Criteria) this; + } + + public Criteria andLastplaytimeNotEqualTo(String value) { + addCriterion("lastPlayTime <>", value, "lastplaytime"); + return (Criteria) this; + } + + public Criteria andLastplaytimeGreaterThan(String value) { + addCriterion("lastPlayTime >", value, "lastplaytime"); + return (Criteria) this; + } + + public Criteria andLastplaytimeGreaterThanOrEqualTo(String value) { + addCriterion("lastPlayTime >=", value, "lastplaytime"); + return (Criteria) this; + } + + public Criteria andLastplaytimeLessThan(String value) { + addCriterion("lastPlayTime <", value, "lastplaytime"); + return (Criteria) this; + } + + public Criteria andLastplaytimeLessThanOrEqualTo(String value) { + addCriterion("lastPlayTime <=", value, "lastplaytime"); + return (Criteria) this; + } + + public Criteria andLastplaytimeLike(String value) { + addCriterion("lastPlayTime like", value, "lastplaytime"); + return (Criteria) this; + } + + public Criteria andLastplaytimeNotLike(String value) { + addCriterion("lastPlayTime not like", value, "lastplaytime"); + return (Criteria) this; + } + + public Criteria andLastplaytimeIn(List values) { + addCriterion("lastPlayTime in", values, "lastplaytime"); + return (Criteria) this; + } + + public Criteria andLastplaytimeNotIn(List values) { + addCriterion("lastPlayTime not in", values, "lastplaytime"); + return (Criteria) this; + } + + public Criteria andLastplaytimeBetween(String value1, String value2) { + addCriterion("lastPlayTime between", value1, value2, "lastplaytime"); + return (Criteria) this; + } + + public Criteria andLastplaytimeNotBetween(String value1, String value2) { + addCriterion("lastPlayTime not between", value1, value2, "lastplaytime"); + 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); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/yutou/nas/mybatis/model/VideoInfo.java b/src/main/java/com/yutou/nas/mybatis/model/VideoInfo.java new file mode 100644 index 0000000..15ec39d --- /dev/null +++ b/src/main/java/com/yutou/nas/mybatis/model/VideoInfo.java @@ -0,0 +1,41 @@ +package com.yutou.nas.mybatis.model; + +import java.io.Serializable; +import lombok.Data; + +/** + * video_info + * @author + */ +@Data +public class VideoInfo implements Serializable { + private Integer id; + + private String titleCn; + + private String titleJp; + + private String airData; + + private String airWeekday; + + private String bangumiUrl; + + private Double bangumiRating; + + private String epsCount; + + private String epsNow; + + private String crts; + + private String staffs; + + private String image; + + private String info; + + private String path; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/com/yutou/nas/mybatis/model/VideoInfoExample.java b/src/main/java/com/yutou/nas/mybatis/model/VideoInfoExample.java new file mode 100644 index 0000000..423eb29 --- /dev/null +++ b/src/main/java/com/yutou/nas/mybatis/model/VideoInfoExample.java @@ -0,0 +1,1161 @@ +package com.yutou.nas.mybatis.model; + +import java.util.ArrayList; +import java.util.List; + +public class VideoInfoExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public VideoInfoExample() { + oredCriteria = new ArrayList<>(); + } + + 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 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 criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List 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(Integer value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Integer value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Integer value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Integer value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Integer value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Integer value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Integer value1, Integer value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Integer value1, Integer value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andTitleCnIsNull() { + addCriterion("title_cn is null"); + return (Criteria) this; + } + + public Criteria andTitleCnIsNotNull() { + addCriterion("title_cn is not null"); + return (Criteria) this; + } + + public Criteria andTitleCnEqualTo(String value) { + addCriterion("title_cn =", value, "titleCn"); + return (Criteria) this; + } + + public Criteria andTitleCnNotEqualTo(String value) { + addCriterion("title_cn <>", value, "titleCn"); + return (Criteria) this; + } + + public Criteria andTitleCnGreaterThan(String value) { + addCriterion("title_cn >", value, "titleCn"); + return (Criteria) this; + } + + public Criteria andTitleCnGreaterThanOrEqualTo(String value) { + addCriterion("title_cn >=", value, "titleCn"); + return (Criteria) this; + } + + public Criteria andTitleCnLessThan(String value) { + addCriterion("title_cn <", value, "titleCn"); + return (Criteria) this; + } + + public Criteria andTitleCnLessThanOrEqualTo(String value) { + addCriterion("title_cn <=", value, "titleCn"); + return (Criteria) this; + } + + public Criteria andTitleCnLike(String value) { + addCriterion("title_cn like", value, "titleCn"); + return (Criteria) this; + } + + public Criteria andTitleCnNotLike(String value) { + addCriterion("title_cn not like", value, "titleCn"); + return (Criteria) this; + } + + public Criteria andTitleCnIn(List values) { + addCriterion("title_cn in", values, "titleCn"); + return (Criteria) this; + } + + public Criteria andTitleCnNotIn(List values) { + addCriterion("title_cn not in", values, "titleCn"); + return (Criteria) this; + } + + public Criteria andTitleCnBetween(String value1, String value2) { + addCriterion("title_cn between", value1, value2, "titleCn"); + return (Criteria) this; + } + + public Criteria andTitleCnNotBetween(String value1, String value2) { + addCriterion("title_cn not between", value1, value2, "titleCn"); + return (Criteria) this; + } + + public Criteria andTitleJpIsNull() { + addCriterion("title_jp is null"); + return (Criteria) this; + } + + public Criteria andTitleJpIsNotNull() { + addCriterion("title_jp is not null"); + return (Criteria) this; + } + + public Criteria andTitleJpEqualTo(String value) { + addCriterion("title_jp =", value, "titleJp"); + return (Criteria) this; + } + + public Criteria andTitleJpNotEqualTo(String value) { + addCriterion("title_jp <>", value, "titleJp"); + return (Criteria) this; + } + + public Criteria andTitleJpGreaterThan(String value) { + addCriterion("title_jp >", value, "titleJp"); + return (Criteria) this; + } + + public Criteria andTitleJpGreaterThanOrEqualTo(String value) { + addCriterion("title_jp >=", value, "titleJp"); + return (Criteria) this; + } + + public Criteria andTitleJpLessThan(String value) { + addCriterion("title_jp <", value, "titleJp"); + return (Criteria) this; + } + + public Criteria andTitleJpLessThanOrEqualTo(String value) { + addCriterion("title_jp <=", value, "titleJp"); + return (Criteria) this; + } + + public Criteria andTitleJpLike(String value) { + addCriterion("title_jp like", value, "titleJp"); + return (Criteria) this; + } + + public Criteria andTitleJpNotLike(String value) { + addCriterion("title_jp not like", value, "titleJp"); + return (Criteria) this; + } + + public Criteria andTitleJpIn(List values) { + addCriterion("title_jp in", values, "titleJp"); + return (Criteria) this; + } + + public Criteria andTitleJpNotIn(List values) { + addCriterion("title_jp not in", values, "titleJp"); + return (Criteria) this; + } + + public Criteria andTitleJpBetween(String value1, String value2) { + addCriterion("title_jp between", value1, value2, "titleJp"); + return (Criteria) this; + } + + public Criteria andTitleJpNotBetween(String value1, String value2) { + addCriterion("title_jp not between", value1, value2, "titleJp"); + return (Criteria) this; + } + + public Criteria andAirDataIsNull() { + addCriterion("air_data is null"); + return (Criteria) this; + } + + public Criteria andAirDataIsNotNull() { + addCriterion("air_data is not null"); + return (Criteria) this; + } + + public Criteria andAirDataEqualTo(String value) { + addCriterion("air_data =", value, "airData"); + return (Criteria) this; + } + + public Criteria andAirDataNotEqualTo(String value) { + addCriterion("air_data <>", value, "airData"); + return (Criteria) this; + } + + public Criteria andAirDataGreaterThan(String value) { + addCriterion("air_data >", value, "airData"); + return (Criteria) this; + } + + public Criteria andAirDataGreaterThanOrEqualTo(String value) { + addCriterion("air_data >=", value, "airData"); + return (Criteria) this; + } + + public Criteria andAirDataLessThan(String value) { + addCriterion("air_data <", value, "airData"); + return (Criteria) this; + } + + public Criteria andAirDataLessThanOrEqualTo(String value) { + addCriterion("air_data <=", value, "airData"); + return (Criteria) this; + } + + public Criteria andAirDataLike(String value) { + addCriterion("air_data like", value, "airData"); + return (Criteria) this; + } + + public Criteria andAirDataNotLike(String value) { + addCriterion("air_data not like", value, "airData"); + return (Criteria) this; + } + + public Criteria andAirDataIn(List values) { + addCriterion("air_data in", values, "airData"); + return (Criteria) this; + } + + public Criteria andAirDataNotIn(List values) { + addCriterion("air_data not in", values, "airData"); + return (Criteria) this; + } + + public Criteria andAirDataBetween(String value1, String value2) { + addCriterion("air_data between", value1, value2, "airData"); + return (Criteria) this; + } + + public Criteria andAirDataNotBetween(String value1, String value2) { + addCriterion("air_data not between", value1, value2, "airData"); + return (Criteria) this; + } + + public Criteria andAirWeekdayIsNull() { + addCriterion("air_weekday is null"); + return (Criteria) this; + } + + public Criteria andAirWeekdayIsNotNull() { + addCriterion("air_weekday is not null"); + return (Criteria) this; + } + + public Criteria andAirWeekdayEqualTo(String value) { + addCriterion("air_weekday =", value, "airWeekday"); + return (Criteria) this; + } + + public Criteria andAirWeekdayNotEqualTo(String value) { + addCriterion("air_weekday <>", value, "airWeekday"); + return (Criteria) this; + } + + public Criteria andAirWeekdayGreaterThan(String value) { + addCriterion("air_weekday >", value, "airWeekday"); + return (Criteria) this; + } + + public Criteria andAirWeekdayGreaterThanOrEqualTo(String value) { + addCriterion("air_weekday >=", value, "airWeekday"); + return (Criteria) this; + } + + public Criteria andAirWeekdayLessThan(String value) { + addCriterion("air_weekday <", value, "airWeekday"); + return (Criteria) this; + } + + public Criteria andAirWeekdayLessThanOrEqualTo(String value) { + addCriterion("air_weekday <=", value, "airWeekday"); + return (Criteria) this; + } + + public Criteria andAirWeekdayLike(String value) { + addCriterion("air_weekday like", value, "airWeekday"); + return (Criteria) this; + } + + public Criteria andAirWeekdayNotLike(String value) { + addCriterion("air_weekday not like", value, "airWeekday"); + return (Criteria) this; + } + + public Criteria andAirWeekdayIn(List values) { + addCriterion("air_weekday in", values, "airWeekday"); + return (Criteria) this; + } + + public Criteria andAirWeekdayNotIn(List values) { + addCriterion("air_weekday not in", values, "airWeekday"); + return (Criteria) this; + } + + public Criteria andAirWeekdayBetween(String value1, String value2) { + addCriterion("air_weekday between", value1, value2, "airWeekday"); + return (Criteria) this; + } + + public Criteria andAirWeekdayNotBetween(String value1, String value2) { + addCriterion("air_weekday not between", value1, value2, "airWeekday"); + return (Criteria) this; + } + + public Criteria andBangumiUrlIsNull() { + addCriterion("bangumi_url is null"); + return (Criteria) this; + } + + public Criteria andBangumiUrlIsNotNull() { + addCriterion("bangumi_url is not null"); + return (Criteria) this; + } + + public Criteria andBangumiUrlEqualTo(String value) { + addCriterion("bangumi_url =", value, "bangumiUrl"); + return (Criteria) this; + } + + public Criteria andBangumiUrlNotEqualTo(String value) { + addCriterion("bangumi_url <>", value, "bangumiUrl"); + return (Criteria) this; + } + + public Criteria andBangumiUrlGreaterThan(String value) { + addCriterion("bangumi_url >", value, "bangumiUrl"); + return (Criteria) this; + } + + public Criteria andBangumiUrlGreaterThanOrEqualTo(String value) { + addCriterion("bangumi_url >=", value, "bangumiUrl"); + return (Criteria) this; + } + + public Criteria andBangumiUrlLessThan(String value) { + addCriterion("bangumi_url <", value, "bangumiUrl"); + return (Criteria) this; + } + + public Criteria andBangumiUrlLessThanOrEqualTo(String value) { + addCriterion("bangumi_url <=", value, "bangumiUrl"); + return (Criteria) this; + } + + public Criteria andBangumiUrlLike(String value) { + addCriterion("bangumi_url like", value, "bangumiUrl"); + return (Criteria) this; + } + + public Criteria andBangumiUrlNotLike(String value) { + addCriterion("bangumi_url not like", value, "bangumiUrl"); + return (Criteria) this; + } + + public Criteria andBangumiUrlIn(List values) { + addCriterion("bangumi_url in", values, "bangumiUrl"); + return (Criteria) this; + } + + public Criteria andBangumiUrlNotIn(List values) { + addCriterion("bangumi_url not in", values, "bangumiUrl"); + return (Criteria) this; + } + + public Criteria andBangumiUrlBetween(String value1, String value2) { + addCriterion("bangumi_url between", value1, value2, "bangumiUrl"); + return (Criteria) this; + } + + public Criteria andBangumiUrlNotBetween(String value1, String value2) { + addCriterion("bangumi_url not between", value1, value2, "bangumiUrl"); + return (Criteria) this; + } + + public Criteria andBangumiRatingIsNull() { + addCriterion("bangumi_rating is null"); + return (Criteria) this; + } + + public Criteria andBangumiRatingIsNotNull() { + addCriterion("bangumi_rating is not null"); + return (Criteria) this; + } + + public Criteria andBangumiRatingEqualTo(Double value) { + addCriterion("bangumi_rating =", value, "bangumiRating"); + return (Criteria) this; + } + + public Criteria andBangumiRatingNotEqualTo(Double value) { + addCriterion("bangumi_rating <>", value, "bangumiRating"); + return (Criteria) this; + } + + public Criteria andBangumiRatingGreaterThan(Double value) { + addCriterion("bangumi_rating >", value, "bangumiRating"); + return (Criteria) this; + } + + public Criteria andBangumiRatingGreaterThanOrEqualTo(Double value) { + addCriterion("bangumi_rating >=", value, "bangumiRating"); + return (Criteria) this; + } + + public Criteria andBangumiRatingLessThan(Double value) { + addCriterion("bangumi_rating <", value, "bangumiRating"); + return (Criteria) this; + } + + public Criteria andBangumiRatingLessThanOrEqualTo(Double value) { + addCriterion("bangumi_rating <=", value, "bangumiRating"); + return (Criteria) this; + } + + public Criteria andBangumiRatingIn(List values) { + addCriterion("bangumi_rating in", values, "bangumiRating"); + return (Criteria) this; + } + + public Criteria andBangumiRatingNotIn(List values) { + addCriterion("bangumi_rating not in", values, "bangumiRating"); + return (Criteria) this; + } + + public Criteria andBangumiRatingBetween(Double value1, Double value2) { + addCriterion("bangumi_rating between", value1, value2, "bangumiRating"); + return (Criteria) this; + } + + public Criteria andBangumiRatingNotBetween(Double value1, Double value2) { + addCriterion("bangumi_rating not between", value1, value2, "bangumiRating"); + return (Criteria) this; + } + + public Criteria andEpsCountIsNull() { + addCriterion("eps_count is null"); + return (Criteria) this; + } + + public Criteria andEpsCountIsNotNull() { + addCriterion("eps_count is not null"); + return (Criteria) this; + } + + public Criteria andEpsCountEqualTo(String value) { + addCriterion("eps_count =", value, "epsCount"); + return (Criteria) this; + } + + public Criteria andEpsCountNotEqualTo(String value) { + addCriterion("eps_count <>", value, "epsCount"); + return (Criteria) this; + } + + public Criteria andEpsCountGreaterThan(String value) { + addCriterion("eps_count >", value, "epsCount"); + return (Criteria) this; + } + + public Criteria andEpsCountGreaterThanOrEqualTo(String value) { + addCriterion("eps_count >=", value, "epsCount"); + return (Criteria) this; + } + + public Criteria andEpsCountLessThan(String value) { + addCriterion("eps_count <", value, "epsCount"); + return (Criteria) this; + } + + public Criteria andEpsCountLessThanOrEqualTo(String value) { + addCriterion("eps_count <=", value, "epsCount"); + return (Criteria) this; + } + + public Criteria andEpsCountLike(String value) { + addCriterion("eps_count like", value, "epsCount"); + return (Criteria) this; + } + + public Criteria andEpsCountNotLike(String value) { + addCriterion("eps_count not like", value, "epsCount"); + return (Criteria) this; + } + + public Criteria andEpsCountIn(List values) { + addCriterion("eps_count in", values, "epsCount"); + return (Criteria) this; + } + + public Criteria andEpsCountNotIn(List values) { + addCriterion("eps_count not in", values, "epsCount"); + return (Criteria) this; + } + + public Criteria andEpsCountBetween(String value1, String value2) { + addCriterion("eps_count between", value1, value2, "epsCount"); + return (Criteria) this; + } + + public Criteria andEpsCountNotBetween(String value1, String value2) { + addCriterion("eps_count not between", value1, value2, "epsCount"); + return (Criteria) this; + } + + public Criteria andEpsNowIsNull() { + addCriterion("eps_now is null"); + return (Criteria) this; + } + + public Criteria andEpsNowIsNotNull() { + addCriterion("eps_now is not null"); + return (Criteria) this; + } + + public Criteria andEpsNowEqualTo(String value) { + addCriterion("eps_now =", value, "epsNow"); + return (Criteria) this; + } + + public Criteria andEpsNowNotEqualTo(String value) { + addCriterion("eps_now <>", value, "epsNow"); + return (Criteria) this; + } + + public Criteria andEpsNowGreaterThan(String value) { + addCriterion("eps_now >", value, "epsNow"); + return (Criteria) this; + } + + public Criteria andEpsNowGreaterThanOrEqualTo(String value) { + addCriterion("eps_now >=", value, "epsNow"); + return (Criteria) this; + } + + public Criteria andEpsNowLessThan(String value) { + addCriterion("eps_now <", value, "epsNow"); + return (Criteria) this; + } + + public Criteria andEpsNowLessThanOrEqualTo(String value) { + addCriterion("eps_now <=", value, "epsNow"); + return (Criteria) this; + } + + public Criteria andEpsNowLike(String value) { + addCriterion("eps_now like", value, "epsNow"); + return (Criteria) this; + } + + public Criteria andEpsNowNotLike(String value) { + addCriterion("eps_now not like", value, "epsNow"); + return (Criteria) this; + } + + public Criteria andEpsNowIn(List values) { + addCriterion("eps_now in", values, "epsNow"); + return (Criteria) this; + } + + public Criteria andEpsNowNotIn(List values) { + addCriterion("eps_now not in", values, "epsNow"); + return (Criteria) this; + } + + public Criteria andEpsNowBetween(String value1, String value2) { + addCriterion("eps_now between", value1, value2, "epsNow"); + return (Criteria) this; + } + + public Criteria andEpsNowNotBetween(String value1, String value2) { + addCriterion("eps_now not between", value1, value2, "epsNow"); + return (Criteria) this; + } + + public Criteria andCrtsIsNull() { + addCriterion("crts is null"); + return (Criteria) this; + } + + public Criteria andCrtsIsNotNull() { + addCriterion("crts is not null"); + return (Criteria) this; + } + + public Criteria andCrtsEqualTo(String value) { + addCriterion("crts =", value, "crts"); + return (Criteria) this; + } + + public Criteria andCrtsNotEqualTo(String value) { + addCriterion("crts <>", value, "crts"); + return (Criteria) this; + } + + public Criteria andCrtsGreaterThan(String value) { + addCriterion("crts >", value, "crts"); + return (Criteria) this; + } + + public Criteria andCrtsGreaterThanOrEqualTo(String value) { + addCriterion("crts >=", value, "crts"); + return (Criteria) this; + } + + public Criteria andCrtsLessThan(String value) { + addCriterion("crts <", value, "crts"); + return (Criteria) this; + } + + public Criteria andCrtsLessThanOrEqualTo(String value) { + addCriterion("crts <=", value, "crts"); + return (Criteria) this; + } + + public Criteria andCrtsLike(String value) { + addCriterion("crts like", value, "crts"); + return (Criteria) this; + } + + public Criteria andCrtsNotLike(String value) { + addCriterion("crts not like", value, "crts"); + return (Criteria) this; + } + + public Criteria andCrtsIn(List values) { + addCriterion("crts in", values, "crts"); + return (Criteria) this; + } + + public Criteria andCrtsNotIn(List values) { + addCriterion("crts not in", values, "crts"); + return (Criteria) this; + } + + public Criteria andCrtsBetween(String value1, String value2) { + addCriterion("crts between", value1, value2, "crts"); + return (Criteria) this; + } + + public Criteria andCrtsNotBetween(String value1, String value2) { + addCriterion("crts not between", value1, value2, "crts"); + return (Criteria) this; + } + + public Criteria andStaffsIsNull() { + addCriterion("staffs is null"); + return (Criteria) this; + } + + public Criteria andStaffsIsNotNull() { + addCriterion("staffs is not null"); + return (Criteria) this; + } + + public Criteria andStaffsEqualTo(String value) { + addCriterion("staffs =", value, "staffs"); + return (Criteria) this; + } + + public Criteria andStaffsNotEqualTo(String value) { + addCriterion("staffs <>", value, "staffs"); + return (Criteria) this; + } + + public Criteria andStaffsGreaterThan(String value) { + addCriterion("staffs >", value, "staffs"); + return (Criteria) this; + } + + public Criteria andStaffsGreaterThanOrEqualTo(String value) { + addCriterion("staffs >=", value, "staffs"); + return (Criteria) this; + } + + public Criteria andStaffsLessThan(String value) { + addCriterion("staffs <", value, "staffs"); + return (Criteria) this; + } + + public Criteria andStaffsLessThanOrEqualTo(String value) { + addCriterion("staffs <=", value, "staffs"); + return (Criteria) this; + } + + public Criteria andStaffsLike(String value) { + addCriterion("staffs like", value, "staffs"); + return (Criteria) this; + } + + public Criteria andStaffsNotLike(String value) { + addCriterion("staffs not like", value, "staffs"); + return (Criteria) this; + } + + public Criteria andStaffsIn(List values) { + addCriterion("staffs in", values, "staffs"); + return (Criteria) this; + } + + public Criteria andStaffsNotIn(List values) { + addCriterion("staffs not in", values, "staffs"); + return (Criteria) this; + } + + public Criteria andStaffsBetween(String value1, String value2) { + addCriterion("staffs between", value1, value2, "staffs"); + return (Criteria) this; + } + + public Criteria andStaffsNotBetween(String value1, String value2) { + addCriterion("staffs not between", value1, value2, "staffs"); + return (Criteria) this; + } + + public Criteria andImageIsNull() { + addCriterion("image is null"); + return (Criteria) this; + } + + public Criteria andImageIsNotNull() { + addCriterion("image is not null"); + return (Criteria) this; + } + + public Criteria andImageEqualTo(String value) { + addCriterion("image =", value, "image"); + return (Criteria) this; + } + + public Criteria andImageNotEqualTo(String value) { + addCriterion("image <>", value, "image"); + return (Criteria) this; + } + + public Criteria andImageGreaterThan(String value) { + addCriterion("image >", value, "image"); + return (Criteria) this; + } + + public Criteria andImageGreaterThanOrEqualTo(String value) { + addCriterion("image >=", value, "image"); + return (Criteria) this; + } + + public Criteria andImageLessThan(String value) { + addCriterion("image <", value, "image"); + return (Criteria) this; + } + + public Criteria andImageLessThanOrEqualTo(String value) { + addCriterion("image <=", value, "image"); + return (Criteria) this; + } + + public Criteria andImageLike(String value) { + addCriterion("image like", value, "image"); + return (Criteria) this; + } + + public Criteria andImageNotLike(String value) { + addCriterion("image not like", value, "image"); + return (Criteria) this; + } + + public Criteria andImageIn(List values) { + addCriterion("image in", values, "image"); + return (Criteria) this; + } + + public Criteria andImageNotIn(List values) { + addCriterion("image not in", values, "image"); + return (Criteria) this; + } + + public Criteria andImageBetween(String value1, String value2) { + addCriterion("image between", value1, value2, "image"); + return (Criteria) this; + } + + public Criteria andImageNotBetween(String value1, String value2) { + addCriterion("image not between", value1, value2, "image"); + return (Criteria) this; + } + + public Criteria andInfoIsNull() { + addCriterion("info is null"); + return (Criteria) this; + } + + public Criteria andInfoIsNotNull() { + addCriterion("info is not null"); + return (Criteria) this; + } + + public Criteria andInfoEqualTo(String value) { + addCriterion("info =", value, "info"); + return (Criteria) this; + } + + public Criteria andInfoNotEqualTo(String value) { + addCriterion("info <>", value, "info"); + return (Criteria) this; + } + + public Criteria andInfoGreaterThan(String value) { + addCriterion("info >", value, "info"); + return (Criteria) this; + } + + public Criteria andInfoGreaterThanOrEqualTo(String value) { + addCriterion("info >=", value, "info"); + return (Criteria) this; + } + + public Criteria andInfoLessThan(String value) { + addCriterion("info <", value, "info"); + return (Criteria) this; + } + + public Criteria andInfoLessThanOrEqualTo(String value) { + addCriterion("info <=", value, "info"); + return (Criteria) this; + } + + public Criteria andInfoLike(String value) { + addCriterion("info like", value, "info"); + return (Criteria) this; + } + + public Criteria andInfoNotLike(String value) { + addCriterion("info not like", value, "info"); + return (Criteria) this; + } + + public Criteria andInfoIn(List values) { + addCriterion("info in", values, "info"); + return (Criteria) this; + } + + public Criteria andInfoNotIn(List values) { + addCriterion("info not in", values, "info"); + return (Criteria) this; + } + + public Criteria andInfoBetween(String value1, String value2) { + addCriterion("info between", value1, value2, "info"); + return (Criteria) this; + } + + public Criteria andInfoNotBetween(String value1, String value2) { + addCriterion("info not between", value1, value2, "info"); + return (Criteria) this; + } + + public Criteria andPathIsNull() { + addCriterion("`path` is null"); + return (Criteria) this; + } + + public Criteria andPathIsNotNull() { + addCriterion("`path` is not null"); + return (Criteria) this; + } + + public Criteria andPathEqualTo(String value) { + addCriterion("`path` =", value, "path"); + return (Criteria) this; + } + + public Criteria andPathNotEqualTo(String value) { + addCriterion("`path` <>", value, "path"); + return (Criteria) this; + } + + public Criteria andPathGreaterThan(String value) { + addCriterion("`path` >", value, "path"); + return (Criteria) this; + } + + public Criteria andPathGreaterThanOrEqualTo(String value) { + addCriterion("`path` >=", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLessThan(String value) { + addCriterion("`path` <", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLessThanOrEqualTo(String value) { + addCriterion("`path` <=", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLike(String value) { + addCriterion("`path` like", value, "path"); + return (Criteria) this; + } + + public Criteria andPathNotLike(String value) { + addCriterion("`path` not like", value, "path"); + return (Criteria) this; + } + + public Criteria andPathIn(List values) { + addCriterion("`path` in", values, "path"); + return (Criteria) this; + } + + public Criteria andPathNotIn(List values) { + addCriterion("`path` not in", values, "path"); + return (Criteria) this; + } + + public Criteria andPathBetween(String value1, String value2) { + addCriterion("`path` between", value1, value2, "path"); + return (Criteria) this; + } + + public Criteria andPathNotBetween(String value1, String value2) { + addCriterion("`path` not between", value1, value2, "path"); + 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); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/yutou/nas/mybatis/model/VideoSubtitles.java b/src/main/java/com/yutou/nas/mybatis/model/VideoSubtitles.java new file mode 100644 index 0000000..88d90b0 --- /dev/null +++ b/src/main/java/com/yutou/nas/mybatis/model/VideoSubtitles.java @@ -0,0 +1,21 @@ +package com.yutou.nas.mybatis.model; + +import java.io.Serializable; +import lombok.Data; + +/** + * video_subtitles + * @author + */ +@Data +public class VideoSubtitles implements Serializable { + private Integer id; + + private Integer vid; + + private String subtitle; + + private String path; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/com/yutou/nas/mybatis/model/VideoSubtitlesExample.java b/src/main/java/com/yutou/nas/mybatis/model/VideoSubtitlesExample.java new file mode 100644 index 0000000..d534f1c --- /dev/null +++ b/src/main/java/com/yutou/nas/mybatis/model/VideoSubtitlesExample.java @@ -0,0 +1,461 @@ +package com.yutou.nas.mybatis.model; + +import java.util.ArrayList; +import java.util.List; + +public class VideoSubtitlesExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public VideoSubtitlesExample() { + oredCriteria = new ArrayList<>(); + } + + 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 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 criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List 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(Integer value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Integer value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Integer value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Integer value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Integer value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Integer value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Integer value1, Integer value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Integer value1, Integer value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andVidIsNull() { + addCriterion("vid is null"); + return (Criteria) this; + } + + public Criteria andVidIsNotNull() { + addCriterion("vid is not null"); + return (Criteria) this; + } + + public Criteria andVidEqualTo(Integer value) { + addCriterion("vid =", value, "vid"); + return (Criteria) this; + } + + public Criteria andVidNotEqualTo(Integer value) { + addCriterion("vid <>", value, "vid"); + return (Criteria) this; + } + + public Criteria andVidGreaterThan(Integer value) { + addCriterion("vid >", value, "vid"); + return (Criteria) this; + } + + public Criteria andVidGreaterThanOrEqualTo(Integer value) { + addCriterion("vid >=", value, "vid"); + return (Criteria) this; + } + + public Criteria andVidLessThan(Integer value) { + addCriterion("vid <", value, "vid"); + return (Criteria) this; + } + + public Criteria andVidLessThanOrEqualTo(Integer value) { + addCriterion("vid <=", value, "vid"); + return (Criteria) this; + } + + public Criteria andVidIn(List values) { + addCriterion("vid in", values, "vid"); + return (Criteria) this; + } + + public Criteria andVidNotIn(List values) { + addCriterion("vid not in", values, "vid"); + return (Criteria) this; + } + + public Criteria andVidBetween(Integer value1, Integer value2) { + addCriterion("vid between", value1, value2, "vid"); + return (Criteria) this; + } + + public Criteria andVidNotBetween(Integer value1, Integer value2) { + addCriterion("vid not between", value1, value2, "vid"); + return (Criteria) this; + } + + public Criteria andSubtitleIsNull() { + addCriterion("subTitle is null"); + return (Criteria) this; + } + + public Criteria andSubtitleIsNotNull() { + addCriterion("subTitle is not null"); + return (Criteria) this; + } + + public Criteria andSubtitleEqualTo(String value) { + addCriterion("subTitle =", value, "subtitle"); + return (Criteria) this; + } + + public Criteria andSubtitleNotEqualTo(String value) { + addCriterion("subTitle <>", value, "subtitle"); + return (Criteria) this; + } + + public Criteria andSubtitleGreaterThan(String value) { + addCriterion("subTitle >", value, "subtitle"); + return (Criteria) this; + } + + public Criteria andSubtitleGreaterThanOrEqualTo(String value) { + addCriterion("subTitle >=", value, "subtitle"); + return (Criteria) this; + } + + public Criteria andSubtitleLessThan(String value) { + addCriterion("subTitle <", value, "subtitle"); + return (Criteria) this; + } + + public Criteria andSubtitleLessThanOrEqualTo(String value) { + addCriterion("subTitle <=", value, "subtitle"); + return (Criteria) this; + } + + public Criteria andSubtitleLike(String value) { + addCriterion("subTitle like", value, "subtitle"); + return (Criteria) this; + } + + public Criteria andSubtitleNotLike(String value) { + addCriterion("subTitle not like", value, "subtitle"); + return (Criteria) this; + } + + public Criteria andSubtitleIn(List values) { + addCriterion("subTitle in", values, "subtitle"); + return (Criteria) this; + } + + public Criteria andSubtitleNotIn(List values) { + addCriterion("subTitle not in", values, "subtitle"); + return (Criteria) this; + } + + public Criteria andSubtitleBetween(String value1, String value2) { + addCriterion("subTitle between", value1, value2, "subtitle"); + return (Criteria) this; + } + + public Criteria andSubtitleNotBetween(String value1, String value2) { + addCriterion("subTitle not between", value1, value2, "subtitle"); + return (Criteria) this; + } + + public Criteria andPathIsNull() { + addCriterion("`path` is null"); + return (Criteria) this; + } + + public Criteria andPathIsNotNull() { + addCriterion("`path` is not null"); + return (Criteria) this; + } + + public Criteria andPathEqualTo(String value) { + addCriterion("`path` =", value, "path"); + return (Criteria) this; + } + + public Criteria andPathNotEqualTo(String value) { + addCriterion("`path` <>", value, "path"); + return (Criteria) this; + } + + public Criteria andPathGreaterThan(String value) { + addCriterion("`path` >", value, "path"); + return (Criteria) this; + } + + public Criteria andPathGreaterThanOrEqualTo(String value) { + addCriterion("`path` >=", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLessThan(String value) { + addCriterion("`path` <", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLessThanOrEqualTo(String value) { + addCriterion("`path` <=", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLike(String value) { + addCriterion("`path` like", value, "path"); + return (Criteria) this; + } + + public Criteria andPathNotLike(String value) { + addCriterion("`path` not like", value, "path"); + return (Criteria) this; + } + + public Criteria andPathIn(List values) { + addCriterion("`path` in", values, "path"); + return (Criteria) this; + } + + public Criteria andPathNotIn(List values) { + addCriterion("`path` not in", values, "path"); + return (Criteria) this; + } + + public Criteria andPathBetween(String value1, String value2) { + addCriterion("`path` between", value1, value2, "path"); + return (Criteria) this; + } + + public Criteria andPathNotBetween(String value1, String value2) { + addCriterion("`path` not between", value1, value2, "path"); + 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); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/yutou/nas/other/tools.java b/src/main/java/com/yutou/nas/other/tools.java index adcdd4c..b78e86f 100644 --- a/src/main/java/com/yutou/nas/other/tools.java +++ b/src/main/java/com/yutou/nas/other/tools.java @@ -3,6 +3,7 @@ package com.yutou.nas.other; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.yutou.nas.NasApplication; +import com.yutou.nas.Services.IVideoToolsService; import com.yutou.nas.utils.AppTools; import com.yutou.nas.utils.DepotManager; import com.yutou.nas.utils.RedisTools; @@ -19,6 +20,7 @@ import org.springframework.util.ObjectUtils; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; +import javax.annotation.Resource; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -135,15 +137,18 @@ public class tools { DepotManager.scan(); return "ok"; } + @Resource + IVideoToolsService videoToolsService; @ResponseBody @RequestMapping("/public/test.do") public String test(){ - List list= AppTools.scanClass("com.yutou.nas",Controller.class); + /* List list= AppTools.scanClass("com.yutou.nas",Controller.class); System.out.println("list size = "+list.size()); for (Class aClass : list) { System.out.println(aClass.getName()); System.out.println(aClass.getAnnotation(RequestMapping.class)); - } + }*/ + videoToolsService.scanVideo(); return "ok"; } diff --git a/src/main/java/com/yutou/nas/utils/AppTools.java b/src/main/java/com/yutou/nas/utils/AppTools.java index dce7359..31ec205 100644 --- a/src/main/java/com/yutou/nas/utils/AppTools.java +++ b/src/main/java/com/yutou/nas/utils/AppTools.java @@ -1,5 +1,6 @@ package com.yutou.nas.utils; +import com.yutou.nas.interfaces.ObjectInterface; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider; import org.springframework.core.annotation.AnnotationUtils; @@ -20,7 +21,7 @@ public class AppTools { return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()); } - public static void exec(String exec) { + public static void exec(String exec, ObjectInterface objectInterface, boolean isOutQQBot, boolean isInput) { try { Process process; if (AppTools.isRuntimeSystemOfWindow()) { @@ -38,10 +39,15 @@ public class AppTools { } ); } - processOut(process.getInputStream()); - processOut(process.getErrorStream()); + if (isInput) { + processOut(process.getInputStream(), objectInterface, isOutQQBot); + processOut(process.getErrorStream()); + } else { + processOut(process.getErrorStream(), objectInterface, isOutQQBot); + processOut(process.getInputStream()); + } process.destroy(); - }catch (Exception e){ + } catch (Exception e) { e.printStackTrace(); } } @@ -82,17 +88,17 @@ public class AppTools { return classList; } - public static List getUrls(String packageName,String className){ - List list= AppTools.scanClass(packageName, Controller.class); - List urls=new ArrayList<>(); + public static List getUrls(String packageName, String className) { + List list = AppTools.scanClass(packageName, Controller.class); + List urls = new ArrayList<>(); for (Class aClass : list) { - if(className!=null&&!aClass.getSimpleName().equals(className)){ + if (className != null && !aClass.getSimpleName().equals(className)) { continue; } - Method[] methods= aClass.getDeclaredMethods(); + Method[] methods = aClass.getDeclaredMethods(); for (Method method : methods) { - RequestMapping ls=method.getAnnotation(RequestMapping.class); - if(ls!=null) { + RequestMapping ls = method.getAnnotation(RequestMapping.class); + if (ls != null) { urls.add(ls.value()[0]); } } diff --git a/src/main/java/com/yutou/nas/utils/HttpTools.java b/src/main/java/com/yutou/nas/utils/HttpTools.java index 4af0d06..567e0a8 100644 --- a/src/main/java/com/yutou/nas/utils/HttpTools.java +++ b/src/main/java/com/yutou/nas/utils/HttpTools.java @@ -5,18 +5,32 @@ import com.yutou.nas.interfaces.DownloadInterface; import com.yutou.nas.utils.Interfaces.NetworkInterface; import com.yutou.nas.utils.StringUtils; +import javax.net.ssl.HttpsURLConnection; import java.io.*; import java.net.HttpURLConnection; import java.net.URL; +import java.net.URLConnection; import java.net.URLEncoder; import java.util.Set; public class HttpTools { public static final String serverKey="zIrsh9TUZP2lfRW753PannG49E7VJvor"; - public static String get(String url) { + private static final int HttpRequestIndex=3; + + public static String get(String url){ + return new HttpTools().http_get(url,0); + } + public static void post(final String url, final byte[] body, final NetworkInterface networkInterface){ + new HttpTools().http_post(url, body,0, networkInterface); + } + public static File syncDownload(final String url, final String saveName){ + return new HttpTools().http_syncDownload(url, saveName); + } + public String http_get(String url,int index) { try { - HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection(); + HttpsURLConnection connection = (HttpsURLConnection) new URL(url).openConnection(); connection.setRequestProperty("User-Agent", getExtUa()); + connection.connect(); BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream())); StringBuilder str = new StringBuilder(); String tmp; @@ -27,12 +41,16 @@ public class HttpTools { connection.disconnect(); return str.toString(); } catch (Exception e) { + if(index " + str); - QQBotManager.getInstance().sendMessage(str.toString()); + if(objectInterface!=null){ + objectInterface.out(str.toString()); + } + // com.yutou.nas.utils.Log.i("cmd > " + str); + if(isOutQQBot) { + QQBotManager.getInstance().sendMessage(str.toString()); + } } public static void main(String[] args) { RedisTools.pullMsg("msg", "abc"); diff --git a/src/main/resources/mappers/VideoDataDao.xml b/src/main/resources/mappers/VideoDataDao.xml new file mode 100644 index 0000000..7bd7768 --- /dev/null +++ b/src/main/resources/mappers/VideoDataDao.xml @@ -0,0 +1,268 @@ + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, vid, fileTitle, `path`, videoTimer, videoData, soundData, isPlay, lastPlayTime + + + + + delete from video_data + where id = #{id,jdbcType=INTEGER} + + + delete from video_data + + + + + + + insert into video_data (vid, fileTitle, `path`, + videoTimer, videoData, soundData, + isPlay, lastPlayTime) + values (#{vid,jdbcType=INTEGER}, #{filetitle,jdbcType=VARCHAR}, #{path,jdbcType=VARCHAR}, + #{videotimer,jdbcType=VARCHAR}, #{videodata,jdbcType=VARCHAR}, #{sounddata,jdbcType=VARCHAR}, + #{isplay,jdbcType=INTEGER}, #{lastplaytime,jdbcType=VARCHAR}) + + + insert into video_data + + + vid, + + + fileTitle, + + + `path`, + + + videoTimer, + + + videoData, + + + soundData, + + + isPlay, + + + lastPlayTime, + + + + + #{vid,jdbcType=INTEGER}, + + + #{filetitle,jdbcType=VARCHAR}, + + + #{path,jdbcType=VARCHAR}, + + + #{videotimer,jdbcType=VARCHAR}, + + + #{videodata,jdbcType=VARCHAR}, + + + #{sounddata,jdbcType=VARCHAR}, + + + #{isplay,jdbcType=INTEGER}, + + + #{lastplaytime,jdbcType=VARCHAR}, + + + + + + update video_data + + + id = #{record.id,jdbcType=INTEGER}, + + + vid = #{record.vid,jdbcType=INTEGER}, + + + fileTitle = #{record.filetitle,jdbcType=VARCHAR}, + + + `path` = #{record.path,jdbcType=VARCHAR}, + + + videoTimer = #{record.videotimer,jdbcType=VARCHAR}, + + + videoData = #{record.videodata,jdbcType=VARCHAR}, + + + soundData = #{record.sounddata,jdbcType=VARCHAR}, + + + isPlay = #{record.isplay,jdbcType=INTEGER}, + + + lastPlayTime = #{record.lastplaytime,jdbcType=VARCHAR}, + + + + + + + + update video_data + set id = #{record.id,jdbcType=INTEGER}, + vid = #{record.vid,jdbcType=INTEGER}, + fileTitle = #{record.filetitle,jdbcType=VARCHAR}, + `path` = #{record.path,jdbcType=VARCHAR}, + videoTimer = #{record.videotimer,jdbcType=VARCHAR}, + videoData = #{record.videodata,jdbcType=VARCHAR}, + soundData = #{record.sounddata,jdbcType=VARCHAR}, + isPlay = #{record.isplay,jdbcType=INTEGER}, + lastPlayTime = #{record.lastplaytime,jdbcType=VARCHAR} + + + + + + update video_data + + + vid = #{vid,jdbcType=INTEGER}, + + + fileTitle = #{filetitle,jdbcType=VARCHAR}, + + + `path` = #{path,jdbcType=VARCHAR}, + + + videoTimer = #{videotimer,jdbcType=VARCHAR}, + + + videoData = #{videodata,jdbcType=VARCHAR}, + + + soundData = #{sounddata,jdbcType=VARCHAR}, + + + isPlay = #{isplay,jdbcType=INTEGER}, + + + lastPlayTime = #{lastplaytime,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update video_data + set vid = #{vid,jdbcType=INTEGER}, + fileTitle = #{filetitle,jdbcType=VARCHAR}, + `path` = #{path,jdbcType=VARCHAR}, + videoTimer = #{videotimer,jdbcType=VARCHAR}, + videoData = #{videodata,jdbcType=VARCHAR}, + soundData = #{sounddata,jdbcType=VARCHAR}, + isPlay = #{isplay,jdbcType=INTEGER}, + lastPlayTime = #{lastplaytime,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mappers/VideoInfoDao.xml b/src/main/resources/mappers/VideoInfoDao.xml new file mode 100644 index 0000000..af9a525 --- /dev/null +++ b/src/main/resources/mappers/VideoInfoDao.xml @@ -0,0 +1,347 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, title_cn, title_jp, air_data, air_weekday, bangumi_url, bangumi_rating, eps_count, + eps_now, crts, staffs, image, info, `path` + + + + + delete from video_info + where id = #{id,jdbcType=INTEGER} + + + delete from video_info + + + + + + insert into video_info (title_cn, title_jp, air_data, + air_weekday, bangumi_url, bangumi_rating, + eps_count, eps_now, crts, + staffs, image, info, + `path`) + values (#{titleCn,jdbcType=VARCHAR}, #{titleJp,jdbcType=VARCHAR}, #{airData,jdbcType=VARCHAR}, + #{airWeekday,jdbcType=VARCHAR}, #{bangumiUrl,jdbcType=VARCHAR}, #{bangumiRating,jdbcType=FLOAT}, + #{epsCount,jdbcType=VARCHAR}, #{epsNow,jdbcType=VARCHAR}, #{crts,jdbcType=VARCHAR}, + #{staffs,jdbcType=VARCHAR}, #{image,jdbcType=VARCHAR}, #{info,jdbcType=VARCHAR}, + #{path,jdbcType=VARCHAR}) + + + insert into video_info + + + title_cn, + + + title_jp, + + + air_data, + + + air_weekday, + + + bangumi_url, + + + bangumi_rating, + + + eps_count, + + + eps_now, + + + crts, + + + staffs, + + + image, + + + info, + + + `path`, + + + + + #{titleCn,jdbcType=VARCHAR}, + + + #{titleJp,jdbcType=VARCHAR}, + + + #{airData,jdbcType=VARCHAR}, + + + #{airWeekday,jdbcType=VARCHAR}, + + + #{bangumiUrl,jdbcType=VARCHAR}, + + + #{bangumiRating,jdbcType=FLOAT}, + + + #{epsCount,jdbcType=VARCHAR}, + + + #{epsNow,jdbcType=VARCHAR}, + + + #{crts,jdbcType=VARCHAR}, + + + #{staffs,jdbcType=VARCHAR}, + + + #{image,jdbcType=VARCHAR}, + + + #{info,jdbcType=VARCHAR}, + + + #{path,jdbcType=VARCHAR}, + + + + + + update video_info + + + id = #{record.id,jdbcType=INTEGER}, + + + title_cn = #{record.titleCn,jdbcType=VARCHAR}, + + + title_jp = #{record.titleJp,jdbcType=VARCHAR}, + + + air_data = #{record.airData,jdbcType=VARCHAR}, + + + air_weekday = #{record.airWeekday,jdbcType=VARCHAR}, + + + bangumi_url = #{record.bangumiUrl,jdbcType=VARCHAR}, + + + bangumi_rating = #{record.bangumiRating,jdbcType=FLOAT}, + + + eps_count = #{record.epsCount,jdbcType=VARCHAR}, + + + eps_now = #{record.epsNow,jdbcType=VARCHAR}, + + + crts = #{record.crts,jdbcType=VARCHAR}, + + + staffs = #{record.staffs,jdbcType=VARCHAR}, + + + image = #{record.image,jdbcType=VARCHAR}, + + + info = #{record.info,jdbcType=VARCHAR}, + + + `path` = #{record.path,jdbcType=VARCHAR}, + + + + + + + + update video_info + set id = #{record.id,jdbcType=INTEGER}, + title_cn = #{record.titleCn,jdbcType=VARCHAR}, + title_jp = #{record.titleJp,jdbcType=VARCHAR}, + air_data = #{record.airData,jdbcType=VARCHAR}, + air_weekday = #{record.airWeekday,jdbcType=VARCHAR}, + bangumi_url = #{record.bangumiUrl,jdbcType=VARCHAR}, + bangumi_rating = #{record.bangumiRating,jdbcType=FLOAT}, + eps_count = #{record.epsCount,jdbcType=VARCHAR}, + eps_now = #{record.epsNow,jdbcType=VARCHAR}, + crts = #{record.crts,jdbcType=VARCHAR}, + staffs = #{record.staffs,jdbcType=VARCHAR}, + image = #{record.image,jdbcType=VARCHAR}, + info = #{record.info,jdbcType=VARCHAR}, + `path` = #{record.path,jdbcType=VARCHAR} + + + + + + update video_info + + + title_cn = #{titleCn,jdbcType=VARCHAR}, + + + title_jp = #{titleJp,jdbcType=VARCHAR}, + + + air_data = #{airData,jdbcType=VARCHAR}, + + + air_weekday = #{airWeekday,jdbcType=VARCHAR}, + + + bangumi_url = #{bangumiUrl,jdbcType=VARCHAR}, + + + bangumi_rating = #{bangumiRating,jdbcType=FLOAT}, + + + eps_count = #{epsCount,jdbcType=VARCHAR}, + + + eps_now = #{epsNow,jdbcType=VARCHAR}, + + + crts = #{crts,jdbcType=VARCHAR}, + + + staffs = #{staffs,jdbcType=VARCHAR}, + + + image = #{image,jdbcType=VARCHAR}, + + + info = #{info,jdbcType=VARCHAR}, + + + `path` = #{path,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update video_info + set title_cn = #{titleCn,jdbcType=VARCHAR}, + title_jp = #{titleJp,jdbcType=VARCHAR}, + air_data = #{airData,jdbcType=VARCHAR}, + air_weekday = #{airWeekday,jdbcType=VARCHAR}, + bangumi_url = #{bangumiUrl,jdbcType=VARCHAR}, + bangumi_rating = #{bangumiRating,jdbcType=FLOAT}, + eps_count = #{epsCount,jdbcType=VARCHAR}, + eps_now = #{epsNow,jdbcType=VARCHAR}, + crts = #{crts,jdbcType=VARCHAR}, + staffs = #{staffs,jdbcType=VARCHAR}, + image = #{image,jdbcType=VARCHAR}, + info = #{info,jdbcType=VARCHAR}, + `path` = #{path,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mappers/VideoSubtitlesDao.xml b/src/main/resources/mappers/VideoSubtitlesDao.xml new file mode 100644 index 0000000..550bcbf --- /dev/null +++ b/src/main/resources/mappers/VideoSubtitlesDao.xml @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, vid, subTitle, `path` + + + + + delete from video_subtitles + where id = #{id,jdbcType=INTEGER} + + + delete from video_subtitles + + + + + + insert into video_subtitles (vid, subTitle, `path` + ) + values (#{vid,jdbcType=INTEGER}, #{subtitle,jdbcType=VARCHAR}, #{path,jdbcType=VARCHAR} + ) + + + insert into video_subtitles + + + vid, + + + subTitle, + + + `path`, + + + + + #{vid,jdbcType=INTEGER}, + + + #{subtitle,jdbcType=VARCHAR}, + + + #{path,jdbcType=VARCHAR}, + + + + + + update video_subtitles + + + id = #{record.id,jdbcType=INTEGER}, + + + vid = #{record.vid,jdbcType=INTEGER}, + + + subTitle = #{record.subtitle,jdbcType=VARCHAR}, + + + `path` = #{record.path,jdbcType=VARCHAR}, + + + + + + + + update video_subtitles + set id = #{record.id,jdbcType=INTEGER}, + vid = #{record.vid,jdbcType=INTEGER}, + subTitle = #{record.subtitle,jdbcType=VARCHAR}, + `path` = #{record.path,jdbcType=VARCHAR} + + + + + + update video_subtitles + + + vid = #{vid,jdbcType=INTEGER}, + + + subTitle = #{subtitle,jdbcType=VARCHAR}, + + + `path` = #{path,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update video_subtitles + set vid = #{vid,jdbcType=INTEGER}, + subTitle = #{subtitle,jdbcType=VARCHAR}, + `path` = #{path,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/test/java/com/yutou/nas/NasApplicationTests.java b/src/test/java/com/yutou/nas/NasApplicationTests.java index 8465593..c3082d2 100644 --- a/src/test/java/com/yutou/nas/NasApplicationTests.java +++ b/src/test/java/com/yutou/nas/NasApplicationTests.java @@ -1,13 +1,24 @@ package com.yutou.nas; +import com.yutou.nas.Services.IVideoToolsService; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; +import javax.annotation.Resource; +import java.io.File; + @SpringBootTest class NasApplicationTests { + @Resource + IVideoToolsService toolsService; + @Test void contextLoads() { } - + @Test + void testOutSub(){ + toolsService.scanVideo(); +// toolsService.outSubtitle(0,"0:2",new File("Z:\\download\\anim\\小林家的龙女仆S\\[NC-Raws] 小林家的龙女仆S - 01 [B-Global][WEB-DL][2160p][AVC AAC][CHS_CHT_ENG_TH_SRT][MKV].mkv")); + } }