Commit b5d5f243 by liyaoting

first

0 parents
Showing 28 changed files with 1936 additions and 0 deletions
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.6.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>cn.bxe</groupId>
<artifactId>update-video</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>update-video</name>
<description>update-video</description>
<properties>
<java.version>8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>8.0.31</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>cn.zhxu</groupId>
<artifactId>okhttps</artifactId>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>cn.zhxu</groupId>
<artifactId>okhttps-fastjson</artifactId>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>cn.zhxu</groupId>
<artifactId>okhttps-gson</artifactId>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>2.0.22</version>
</dependency>
<!-- mybatis-plus-->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.4.2</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ws.schild</groupId>
<artifactId>jave-core</artifactId>
<version>2.4.6</version>
</dependency>
<!-- window64位 ffmpeg -->
<dependency>
<groupId>ws.schild</groupId>
<artifactId>jave-native-win64</artifactId>
<version>2.4.6</version>
</dependency>
<!-- linux64位 ffmpeg -->
<dependency>
<groupId>ws.schild</groupId>
<artifactId>jave-native-linux64</artifactId>
<version>2.4.6</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
package cn.bxe.updatevideo.mapper;
import cn.bxe.updatevideo.model.TbxXrBook;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 小睿书籍 Mapper 接口
* </p>
*
* @author ting
* @since 2023-01-17
*/
public interface TbxXrBookMapper extends BaseMapper<TbxXrBook> {
}
package cn.bxe.updatevideo.mapper;
import cn.bxe.updatevideo.model.TbxXrChapter;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 小睿书籍内类目章节 Mapper 接口
* </p>
*
* @author ting
* @since 2023-01-17
*/
public interface TbxXrChapterMapper extends BaseMapper<TbxXrChapter> {
}
package cn.bxe.updatevideo.mapper;
import cn.bxe.updatevideo.model.TbxXrModule;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 小睿书籍章节类目可用类目模块 Mapper 接口
* </p>
*
* @author ting
* @since 2023-01-17
*/
public interface TbxXrModuleMapper extends BaseMapper<TbxXrModule> {
}
package cn.bxe.updatevideo.mapper;
import cn.bxe.updatevideo.model.TbxXrVideo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 小睿章节模块视频 Mapper 接口
* </p>
*
* @author ting
* @since 2023-01-17
*/
public interface TbxXrVideoMapper extends BaseMapper<TbxXrVideo> {
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.bxe.updatevideo.mapper.TbxXrBookMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.bxe.updatevideo.mapper.TbxXrChapterMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.bxe.updatevideo.mapper.TbxXrModuleMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.bxe.updatevideo.mapper.TbxXrVideoMapper">
</mapper>
package cn.bxe.updatevideo.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
/**
* <p>
* 小睿书籍
* </p>
*
* @author ting
* @since 2023-01-17
*/
@TableName("tbx_xr_book")
public class TbxXrBook implements Serializable {
@TableId(type = IdType.ASSIGN_ID)
private Long id;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
private static final long serialVersionUID = 1L;
/**
* 书籍ID
*/
private Integer textbookId;
/**
* 书名
*/
private String bookName;
/**
* 年级
*/
private String gradeCode;
/**
* 科目
*/
private String subject;
/**
* 教材版本
*/
private String textbookVersion;
/**
* 学期
*/
private Integer term;
/**
* 记录状态@10,正常|30,删除状态
*/
private Integer status;
/**
* 创建时间
*/
private Long createTime;
public Integer getTextbookId() {
return textbookId;
}
public void setTextbookId(Integer textbookId) {
this.textbookId = textbookId;
}
public String getBookName() {
return bookName;
}
public void setBookName(String bookName) {
this.bookName = bookName;
}
public String getGradeCode() {
return gradeCode;
}
public void setGradeCode(String gradeCode) {
this.gradeCode = gradeCode;
}
public String getSubject() {
return subject;
}
public void setSubject(String subject) {
this.subject = subject;
}
public String getTextbookVersion() {
return textbookVersion;
}
public void setTextbookVersion(String textbookVersion) {
this.textbookVersion = textbookVersion;
}
public Integer getTerm() {
return term;
}
public void setTerm(Integer term) {
this.term = term;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Long getCreateTime() {
return createTime;
}
public void setCreateTime(Long createTime) {
this.createTime = createTime;
}
@Override
public String toString() {
return "TbxXrBook{" +
"textbookId=" + textbookId +
", bookName='" + bookName + '\'' +
", gradeCode='" + gradeCode + '\'' +
", subject='" + subject + '\'' +
", textbookVersion='" + textbookVersion + '\'' +
", term=" + term +
", status=" + status +
", createTime=" + createTime +
'}';
}
}
package cn.bxe.updatevideo.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
/**
* <p>
* 小睿书籍内类目章节
* </p>
*
* @author ting
* @since 2023-01-17
*/
public class TbxXrChapter implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private Long id;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
/**
* 等级
*/
private Integer level;
/**
* 类目id
*/
private Integer chapterId;
/**
* 书籍ID
*/
private Integer textbookId;
/**
* 类目章节父ID
*/
private Integer parentId;
/**
* 章节名
*/
private String chapterName;
/**
* 排序
*/
private Integer sortIndex;
/**
* 子章节
*/
private String childrenJson;
/**
* 记录状态@10,正常|30,删除状态
*/
private Integer status;
/**
* 创建时间
*/
private Long createTime;
public Integer getLevel() {
return level;
}
public void setLevel(Integer level) {
this.level = level;
}
public Integer getChapterId() {
return chapterId;
}
public void setChapterId(Integer chapterId) {
this.chapterId = chapterId;
}
public Integer getTextbookId() {
return textbookId;
}
public void setTextbookId(Integer textbookId) {
this.textbookId = textbookId;
}
public Integer getParentId() {
return parentId;
}
public void setParentId(Integer parentId) {
this.parentId = parentId;
}
public String getChapterName() {
return chapterName;
}
public void setChapterName(String chapterName) {
this.chapterName = chapterName;
}
public Integer getSortIndex() {
return sortIndex;
}
public void setSortIndex(Integer sortIndex) {
this.sortIndex = sortIndex;
}
public String getChildrenJson() {
return childrenJson;
}
public void setChildrenJson(String childrenJson) {
this.childrenJson = childrenJson;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Long getCreateTime() {
return createTime;
}
public void setCreateTime(Long createTime) {
this.createTime = createTime;
}
}
package cn.bxe.updatevideo.model;
import java.io.Serializable;
import java.util.Objects;
/**
* <p>
* 小睿书籍章节类目可用类目模块
* </p>
*
* @author ting
* @since 2023-01-17
*/
public class TbxXrModule implements Serializable {
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
TbxXrModule that = (TbxXrModule) o;
return Objects.equals(chapterId, that.chapterId) && Objects.equals(moduleId, that.moduleId) && Objects.equals(textbookId, that.textbookId);
}
@Override
public int hashCode() {
return Objects.hash(chapterId, moduleId, textbookId);
}
private static final long serialVersionUID = 1L;
/**
* 类目id
*/
private Integer chapterId;
/**
* 模块ID
*/
private Integer moduleId;
/**
* 书籍ID
*/
private Integer textbookId;
/**
* 分类名
*/
private String categoryName;
/**
* 分类详情
*/
private String categoryDesc;
/**
* 模块列表json
*/
private String moduleList;
/**
* 记录状态@10,正常|30,删除状态
*/
private Integer status;
/**
* 创建时间
*/
private Long createTime;
public Integer getChapterId() {
return chapterId;
}
public void setChapterId(Integer chapterId) {
this.chapterId = chapterId;
}
public Integer getModuleId() {
return moduleId;
}
public void setModuleId(Integer moduleId) {
this.moduleId = moduleId;
}
public Integer getTextbookId() {
return textbookId;
}
public void setTextbookId(Integer textbookId) {
this.textbookId = textbookId;
}
public String getCategoryName() {
return categoryName;
}
public void setCategoryName(String categoryName) {
this.categoryName = categoryName;
}
public String getCategoryDesc() {
return categoryDesc;
}
public void setCategoryDesc(String categoryDesc) {
this.categoryDesc = categoryDesc;
}
public String getModuleList() {
return moduleList;
}
public void setModuleList(String moduleList) {
this.moduleList = moduleList;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Long getCreateTime() {
return createTime;
}
public void setCreateTime(Long createTime) {
this.createTime = createTime;
}
@Override
public String toString() {
return "TbxXrModule{" +
"chapterId=" + chapterId +
", moduleId=" + moduleId +
", textbookId=" + textbookId +
", categoryName='" + categoryName + '\'' +
", categoryDesc='" + categoryDesc + '\'' +
", moduleList='" + moduleList + '\'' +
", status=" + status +
", createTime=" + createTime +
'}';
}
}
package cn.bxe.updatevideo.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.lang.reflect.Type;
import java.util.Objects;
/**
* <p>
* 小睿章节模块视频
* </p>
*
* @author ting
* @since 2023-01-17
*/
public class TbxXrVideo extends Model<TbxXrVideo> implements Serializable{
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private Long id;
/**
* 视频id
*/
private Integer videoId;
/**
* 类目id
*/
private Integer chapterId;
/**
* 模块ID
*/
private Integer moduleId;
/**
* 视频名
*/
private String videoName;
/**
* 视频链接
*/
private String url;
/**
* 视频时长
*/
private String timeDuration;
/**
* 记录状态@10,正常|30,删除状态
*/
private Integer status;
/**
* 创建时间
*/
private Long createTime;
/**
* 视频封面链接
*/
private String coverUrl;
public TbxXrVideo() {
}
public Integer getVideoId() {
return videoId;
}
public void setVideoId(Integer videoId) {
this.videoId = videoId;
}
public Integer getChapterId() {
return chapterId;
}
public void setChapterId(Integer chapterId) {
this.chapterId = chapterId;
}
public Integer getModuleId() {
return moduleId;
}
public void setModuleId(Integer moduleId) {
this.moduleId = moduleId;
}
public String getVideoName() {
return videoName;
}
public void setVideoName(String videoName) {
this.videoName = videoName;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getTimeDuration() {
return timeDuration;
}
public void setTimeDuration(String timeDuration) {
this.timeDuration = timeDuration;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Long getCreateTime() {
return createTime;
}
public void setCreateTime(Long createTime) {
this.createTime = createTime;
}
public String getCoverUrl() {
return coverUrl;
}
public void setCoverUrl(String coverUrl) {
this.coverUrl = coverUrl;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
TbxXrVideo that = (TbxXrVideo) o;
return Objects.equals(videoId, that.videoId) && Objects.equals(chapterId, that.chapterId) && Objects.equals(moduleId, that.moduleId);
}
@Override
public int hashCode() {
return Objects.hash(videoId, chapterId, moduleId);
}
@Override
public String toString() {
return "TbxXrVideo{" +
"videoId=" + videoId +
", chapterId=" + chapterId +
", moduleId=" + moduleId +
", videoName='" + videoName + '\'' +
", url='" + url + '\'' +
", timeDuration='" + timeDuration + '\'' +
", status=" + status +
", createTime=" + createTime +
", coverUrl='" + coverUrl + '\'' +
'}';
}
}
package cn.bxe.updatevideo.model.original;
import java.util.List;
public class Chapter {
private Integer id;
private Integer textbookID;
private int parentID;
private Integer level;
private String chapterName;
private int sortIndex;
private Integer freeStatus;
private boolean lastStudyFlag;
private boolean expand;
private boolean vip;
private String children;
@Override
public String toString() {
return "Chapter{" +
"id=" + id +
", textbookID=" + textbookID +
", parentID=" + parentID +
", level=" + level +
", chapterName='" + chapterName + '\'' +
", sortIndex=" + sortIndex +
", freeStatus=" + freeStatus +
", lastStudyFlag=" + lastStudyFlag +
", expand=" + expand +
", vip=" + vip +
", children=" + children +
'}';
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getTextbookID() {
return textbookID;
}
public void setTextbookID(Integer textbookID) {
this.textbookID = textbookID;
}
public int getParentID() {
return parentID;
}
public void setParentID(int parentID) {
this.parentID = parentID;
}
public Integer getLevel() {
return level;
}
public void setLevel(Integer level) {
this.level = level;
}
public String getChapterName() {
return chapterName;
}
public void setChapterName(String chapterName) {
this.chapterName = chapterName;
}
public int getSortIndex() {
return sortIndex;
}
public void setSortIndex(int sortIndex) {
this.sortIndex = sortIndex;
}
public Integer getFreeStatus() {
return freeStatus;
}
public void setFreeStatus(Integer freeStatus) {
this.freeStatus = freeStatus;
}
public boolean isLastStudyFlag() {
return lastStudyFlag;
}
public void setLastStudyFlag(boolean lastStudyFlag) {
this.lastStudyFlag = lastStudyFlag;
}
public boolean isExpand() {
return expand;
}
public void setExpand(boolean expand) {
this.expand = expand;
}
public boolean isVip() {
return vip;
}
public void setVip(boolean vip) {
this.vip = vip;
}
public String getChildren() {
return children;
}
public void setChildren(String children) {
this.children = children;
}
}
// Module.java
package cn.bxe.updatevideo.model.original;
import java.util.List;
public class Module {
private long id;
private long textbookID;
private String categoryName;
private String categoryDesc;
private long categoryID;
private String moduleName;
private long moduleType;
private String moduleURL;
private long count;
private long freeStatus;
private String moduleDesc;
private boolean unlock;
private List<Module> moduleList;
public long getTextbookID() {
return textbookID;
}
public void setTextbookID(long value) {
this.textbookID = value;
}
public String getCategoryName() {
return categoryName;
}
public void setCategoryName(String value) {
this.categoryName = value;
}
public String getCategoryDesc() {
return categoryDesc;
}
public void setCategoryDesc(String value) {
this.categoryDesc = value;
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public long getCategoryID() {
return categoryID;
}
public void setCategoryID(long categoryID) {
this.categoryID = categoryID;
}
public String getModuleName() {
return moduleName;
}
public void setModuleName(String moduleName) {
this.moduleName = moduleName;
}
public long getModuleType() {
return moduleType;
}
public void setModuleType(long moduleType) {
this.moduleType = moduleType;
}
public String getModuleURL() {
return moduleURL;
}
public void setModuleURL(String moduleURL) {
this.moduleURL = moduleURL;
}
public long getCount() {
return count;
}
public void setCount(long count) {
this.count = count;
}
public long getFreeStatus() {
return freeStatus;
}
public void setFreeStatus(long freeStatus) {
this.freeStatus = freeStatus;
}
public String getModuleDesc() {
return moduleDesc;
}
public void setModuleDesc(String moduleDesc) {
this.moduleDesc = moduleDesc;
}
public boolean isUnlock() {
return unlock;
}
public void setUnlock(boolean unlock) {
this.unlock = unlock;
}
public List<Module> getModuleList() {
return moduleList;
}
public void setModuleList(List<Module> moduleList) {
this.moduleList = moduleList;
}
@Override
public String toString() {
return "Module{" +
"id=" + id +
", textbookID=" + textbookID +
", categoryName='" + categoryName + '\'' +
", categoryDesc='" + categoryDesc + '\'' +
", moduleList=" + moduleList +
'}';
}
}
\ No newline at end of file
package cn.bxe.updatevideo.model.original;
import java.util.Arrays;
public class Textbook {
private long id;
private String textbookCover;
private String grade;
private String gradeName;
private String subject;
private String subjectName;
private String textbookVersion;
private String textbookVersionName;
private String schoolYear;
private String schoolYearName;
private String volumeType;
private String volumeName;
private long bookID;
private String bookName;
private long status;
private boolean isAnalysis;
private long sectionNum;
private String resourceURL;
private String bookIDS;
private String[] posters;
private String wordsModuleID;
private String resourceName;
private String resourceIdentity;
private long sequence;
private long planStatus;
private String planName;
private String appID;
private String url;
private long lastPageNumber;
private boolean isBuy;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getTextbookCover() {
return textbookCover;
}
public void setTextbookCover(String textbookCover) {
this.textbookCover = textbookCover;
}
public String getGrade() {
return grade;
}
public void setGrade(String grade) {
this.grade = grade;
}
public String getGradeName() {
return gradeName;
}
public void setGradeName(String gradeName) {
this.gradeName = gradeName;
}
public String getSubject() {
return subject;
}
public void setSubject(String subject) {
this.subject = subject;
}
public String getSubjectName() {
return subjectName;
}
public void setSubjectName(String subjectName) {
this.subjectName = subjectName;
}
public String getTextbookVersion() {
return textbookVersion;
}
public void setTextbookVersion(String textbookVersion) {
this.textbookVersion = textbookVersion;
}
public String getTextbookVersionName() {
return textbookVersionName;
}
public void setTextbookVersionName(String textbookVersionName) {
this.textbookVersionName = textbookVersionName;
}
public String getSchoolYear() {
return schoolYear;
}
public void setSchoolYear(String schoolYear) {
this.schoolYear = schoolYear;
}
public String getSchoolYearName() {
return schoolYearName;
}
public void setSchoolYearName(String schoolYearName) {
this.schoolYearName = schoolYearName;
}
public String getVolumeType() {
return volumeType;
}
public void setVolumeType(String volumeType) {
this.volumeType = volumeType;
}
public String getVolumeName() {
return volumeName;
}
public void setVolumeName(String volumeName) {
this.volumeName = volumeName;
}
public long getBookID() {
return bookID;
}
public void setBookID(long bookID) {
this.bookID = bookID;
}
public String getBookName() {
return bookName;
}
public void setBookName(String bookName) {
this.bookName = bookName;
}
public long getStatus() {
return status;
}
public void setStatus(long status) {
this.status = status;
}
public boolean isAnalysis() {
return isAnalysis;
}
public void setAnalysis(boolean analysis) {
isAnalysis = analysis;
}
public long getSectionNum() {
return sectionNum;
}
public void setSectionNum(long sectionNum) {
this.sectionNum = sectionNum;
}
public String getResourceURL() {
return resourceURL;
}
public void setResourceURL(String resourceURL) {
this.resourceURL = resourceURL;
}
public String getBookIDS() {
return bookIDS;
}
public void setBookIDS(String bookIDS) {
this.bookIDS = bookIDS;
}
public String[] getPosters() {
return posters;
}
public void setPosters(String[] posters) {
this.posters = posters;
}
public String getWordsModuleID() {
return wordsModuleID;
}
public void setWordsModuleID(String wordsModuleID) {
this.wordsModuleID = wordsModuleID;
}
public String getResourceName() {
return resourceName;
}
public void setResourceName(String resourceName) {
this.resourceName = resourceName;
}
public String getResourceIdentity() {
return resourceIdentity;
}
public void setResourceIdentity(String resourceIdentity) {
this.resourceIdentity = resourceIdentity;
}
public long getSequence() {
return sequence;
}
public void setSequence(long sequence) {
this.sequence = sequence;
}
public long getPlanStatus() {
return planStatus;
}
public void setPlanStatus(long planStatus) {
this.planStatus = planStatus;
}
public String getPlanName() {
return planName;
}
public void setPlanName(String planName) {
this.planName = planName;
}
public String getAppID() {
return appID;
}
public void setAppID(String appID) {
this.appID = appID;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public long getLastPageNumber() {
return lastPageNumber;
}
public void setLastPageNumber(long lastPageNumber) {
this.lastPageNumber = lastPageNumber;
}
public boolean isBuy() {
return isBuy;
}
public void setBuy(boolean buy) {
isBuy = buy;
}
@Override
public String toString() {
return "Textbook{" +
"id=" + id +
", textbookCover='" + textbookCover + '\'' +
", grade='" + grade + '\'' +
", gradeName='" + gradeName + '\'' +
", subject='" + subject + '\'' +
", subjectName='" + subjectName + '\'' +
", textbookVersion='" + textbookVersion + '\'' +
", textbookVersionName='" + textbookVersionName + '\'' +
", schoolYear='" + schoolYear + '\'' +
", schoolYearName='" + schoolYearName + '\'' +
", volumeType='" + volumeType + '\'' +
", volumeName='" + volumeName + '\'' +
", bookID=" + bookID +
", bookName='" + bookName + '\'' +
", status=" + status +
", isAnalysis=" + isAnalysis +
", sectionNum=" + sectionNum +
", resourceURL='" + resourceURL + '\'' +
", bookIDS='" + bookIDS + '\'' +
", posters=" + Arrays.toString(posters) +
", wordsModuleID='" + wordsModuleID + '\'' +
", resourceName='" + resourceName + '\'' +
", resourceIdentity='" + resourceIdentity + '\'' +
", sequence=" + sequence +
", planStatus=" + planStatus +
", planName='" + planName + '\'' +
", appID='" + appID + '\'' +
", url='" + url + '\'' +
", lastPageNumber=" + lastPageNumber +
", isBuy=" + isBuy +
'}';
}
}
package cn.bxe.updatevideo.model.original;
public class Video {
private Integer id;
private Integer chapterID;
private Integer moduleID;
private String videoName;
private String url;
private String timeDuration;
private Integer sortIndex;
@Override
public String toString() {
return "Video{" +
"id=" + id +
", chapterID=" + chapterID +
", moduleID=" + moduleID +
", videoName='" + videoName + '\'' +
", url='" + url + '\'' +
", timeDuration='" + timeDuration + '\'' +
", sortIndex=" + sortIndex +
'}';
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getChapterID() {
return chapterID;
}
public void setChapterID(Integer chapterID) {
this.chapterID = chapterID;
}
public Integer getModuleID() {
return moduleID;
}
public void setModuleID(Integer moduleID) {
this.moduleID = moduleID;
}
public String getVideoName() {
return videoName;
}
public void setVideoName(String videoName) {
this.videoName = videoName;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getTimeDuration() {
return timeDuration;
}
public void setTimeDuration(String timeDuration) {
this.timeDuration = timeDuration;
}
public Integer getSortIndex() {
return sortIndex;
}
public void setSortIndex(Integer sortIndex) {
this.sortIndex = sortIndex;
}
}
package cn.bxe.updatevideo.service.impl;
import cn.bxe.updatevideo.model.TbxXrBook;
import cn.bxe.updatevideo.mapper.TbxXrBookMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 小睿书籍 服务实现类
* </p>
*
* @author ting
* @since 2023-01-17
*/
@Service
public class TbxXrBookServiceImpl extends ServiceImpl<TbxXrBookMapper, TbxXrBook>{
}
package cn.bxe.updatevideo.service.impl;
import cn.bxe.updatevideo.model.TbxXrChapter;
import cn.bxe.updatevideo.mapper.TbxXrChapterMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 小睿书籍内类目章节 服务实现类
* </p>
*
* @author ting
* @since 2023-01-17
*/
@Service
public class TbxXrChapterServiceImpl extends ServiceImpl<TbxXrChapterMapper, TbxXrChapter> {
}
package cn.bxe.updatevideo.service.impl;
import cn.bxe.updatevideo.model.TbxXrModule;
import cn.bxe.updatevideo.mapper.TbxXrModuleMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 小睿书籍章节类目可用类目模块 服务实现类
* </p>
*
* @author ting
* @since 2023-01-17
*/
@Service
public class TbxXrModuleServiceImpl extends ServiceImpl<TbxXrModuleMapper, TbxXrModule>{
}
package cn.bxe.updatevideo.service.impl;
import cn.bxe.updatevideo.model.TbxXrVideo;
import cn.bxe.updatevideo.mapper.TbxXrVideoMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 小睿章节模块视频 服务实现类
* </p>
*
* @author ting
* @since 2023-01-17
*/
@Service
public class TbxXrVideoServiceImpl extends ServiceImpl<TbxXrVideoMapper, TbxXrVideo> {
}
package cn.bxe.updatevideo.util;
import com.alibaba.fastjson.JSONObject;
import java.util.List;
import java.util.Map;
/**
* json工具类
* @author yonson
*/
public class JsonUtil {
/**
* 对像转化为json字符串
* @param obj
* @return
*/
public static String tranObjectToJsonStr(Object obj){
return JSONObject.toJSONString(obj);
}
/**
* json字符串转化为对像
* @param jsonStr
* @return
* @return
*/
public static <T extends Object> T tranJsonStrToObject(String jsonStr,Class<T> clazz){
return (T)JSONObject.parseObject(jsonStr,clazz);
}
/**
* json字符串转化为列表
* @param jsonStr
* @param clazz
* @return
*/
public static <T extends Object> List<T> tranJsonStrToArray(String jsonStr,Class<T> clazz){
return JSONObject.parseArray(jsonStr, clazz);
}
public static JSONObject tranJsonStrToJSONObject(String jsonStr){
return JSONObject.parseObject(jsonStr);
}
public static Map tranJsonToMap(String jsonStr){
try {
Map mapObj = JSONObject.parseObject(jsonStr, Map.class);
//for (Object map: mapObj.entrySet()){
// System.out.println(((Map.Entry)map).getKey()+" "+((Map.Entry)map).getValue());
//}
return mapObj;
}catch (Exception e){
e.printStackTrace();
}
return null;
}
/**
*
* @param jsonStr
* @param keyField
* @return
*/
public static String tranJsonToMapAndGetKValue(String jsonStr,String keyField){
try {
Map mapObj = tranJsonToMap(jsonStr);
if(mapObj!=null && mapObj.containsKey(keyField)) {
return String.valueOf(mapObj.get(keyField));
}
else
return "";
}catch (Exception e){
e.printStackTrace();
}
return "";
}
}
package cn.bxe.updatevideo.util;
import java.util.HashMap;
public class VersionUtil {
public static HashMap<String,String> SUBJECT_MAP = new HashMap<>();
public static HashMap<String,String> GRADE_MAP = new HashMap<>();
public static HashMap<String,String> VERSION_MAP = new HashMap<>();
public static HashMap<String,Integer> SCHOOL_YEAR_MAP = new HashMap<>();
static{
//科目
SUBJECT_MAP.put("GEOGRAPHY","dili");
SUBJECT_MAP.put("CHEMISTRY","huaxue");
SUBJECT_MAP.put("PHYSICS","wuli");
SUBJECT_MAP.put("BIOLOGY","shengwu");
SUBJECT_MAP.put("HISTORY","lishi");
SUBJECT_MAP.put("MORALITY","daode");
SUBJECT_MAP.put("MATHEMATICS","shuxue");
SUBJECT_MAP.put("CHINESE","yuwen");
SUBJECT_MAP.put("ENGLISH","yingyu");
//年级
GRADE_MAP.put("FIRST_GRADE","1");
GRADE_MAP.put("SECOND_GRADE","2");
GRADE_MAP.put("THIRD_GRADE","3");
GRADE_MAP.put("FOURTH_GRADE","4");
GRADE_MAP.put("FIFTH_GRADE","5");
GRADE_MAP.put("SIXTH_GRADE","6");
GRADE_MAP.put("GRADE_ONE","7");
GRADE_MAP.put("GRADE_TWO","8");
GRADE_MAP.put("GRADE_THREE","9");
GRADE_MAP.put("SENIOR_ONE","10");
//书籍版本
VERSION_MAP.put("CHINA","zhongtu");
VERSION_MAP.put("LUKE","luke");
VERSION_MAP.put("BEISHIDA","beishida");
VERSION_MAP.put("PEP","renjiao");
VERSION_MAP.put("YUEJIAOHUKE","yuejiaohuke");
VERSION_MAP.put("YUE_RENMIN","yuerenmin");
VERSION_MAP.put("XIANG_JIAO","xiangjiao");
VERSION_MAP.put("YUEJIAOKEXUE","yuejiaokexue");
VERSION_MAP.put("JIANGSU_EDUCATION_PRESS","sujiaoban");
VERSION_MAP.put("YUE_JIAO","yuejiao");
VERSION_MAP.put("JIJIAO_EDITION","jijiao");
VERSION_MAP.put("XINAN_SHIDA","xishida");
VERSION_MAP.put("BUBIAN","bubian");
VERSION_MAP.put("HUJIAOBAN","hujiao");
VERSION_MAP.put("RENJIAO_PEP","renjiaopep");
VERSION_MAP.put("RENJIAO_XINQIDIAN","renjiaoxinqidian");
VERSION_MAP.put("WAI_YAN","waiyan");
VERSION_MAP.put("XIANG_SHAO","xiangshao");
VERSION_MAP.put("RENJIAOJINGTONG","renjiaojingtong");
//学年
SCHOOL_YEAR_MAP.put("ALL_BOOKS",5);
SCHOOL_YEAR_MAP.put("LAST_SEMESTER",1);
SCHOOL_YEAR_MAP.put("NEXT_SEMESTER",2);
}
}
package ws.schild.jave;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
public class FfmpegFileInfo {
private static final Log LOG = LogFactory.getLog(FfmpegFileInfo.class);
private static final Pattern SIZE_PATTERN = Pattern.compile("(\\d+)x(\\d+)", 2);
private static final Pattern FRAME_RATE_PATTERN = Pattern.compile("([\\d.]+)\\s+(?:fps|tbr)", 2);
private static final Pattern BIT_RATE_PATTERN = Pattern.compile("(\\d+)\\s+kb/s", 2);
private static final Pattern SAMPLING_RATE_PATTERN = Pattern.compile("(\\d+)\\s+Hz", 2);
private static final Pattern CHANNELS_PATTERN = Pattern.compile("(mono|stereo|quad)", 2);
private final FFMPEGLocator locator;
private File inputFile;
public FfmpegFileInfo() {
this.locator = new DefaultFFMPEGLocator();
this.inputFile = new File("");
}
public File getFile() {
return this.inputFile;
}
public void setFile(File file) {
this.inputFile = file;
}
public FfmpegFileInfo(File input, FFMPEGLocator locator) {
this.locator = locator;
this.inputFile = input;
}
public MultimediaInfo getInfo(String url) throws InputFormatException, EncoderException {
FFMPEGExecutor ffmpeg = this.locator.createExecutor();
ffmpeg.addArgument("-i");
ffmpeg.addArgument(url);
try {
ffmpeg.execute();
} catch (IOException var9) {
throw new EncoderException(var9);
}
MultimediaInfo var3;
try {
RBufferedReader reader = new RBufferedReader(new InputStreamReader(ffmpeg.getErrorStream()));
var3 = this.parseMultimediaInfo(this.inputFile, reader);
} finally {
ffmpeg.destroy();
}
return var3;
}
private MultimediaInfo parseMultimediaInfo(File source, RBufferedReader reader) throws InputFormatException, EncoderException {
Pattern p1 = Pattern.compile("^\\s*Input #0, (\\w+).+$\\s*", 2);
Pattern p2 = Pattern.compile("^\\s*Duration: (\\d\\d):(\\d\\d):(\\d\\d)\\.(\\d\\d).*$", 2);
Pattern p3 = Pattern.compile("^\\s*Stream #\\S+: ((?:Audio)|(?:Video)|(?:Data)): (.*)\\s*$", 2);
Pattern p4 = Pattern.compile("^\\s*Metadata:", 2);
MultimediaInfo info = null;
try {
int step = 0;
while(true) {
String line = reader.readLine();
LOG.debug("Output line: " + line);
if (line == null) {
break;
}
String type;
String token;
Matcher m;
switch (step) {
case 0:
token = source.getAbsolutePath() + ": ";
if (line.startsWith(token)) {
String message = line.substring(token.length());
throw new InputFormatException(message);
}
m = p1.matcher(line);
if (m.matches()) {
type = m.group(1);
info = new MultimediaInfo();
info.setFormat(type);
++step;
}
break;
case 1:
m = p2.matcher(line);
if (m.matches()) {
long hours = (long)Integer.parseInt(m.group(1));
long minutes = (long)Integer.parseInt(m.group(2));
long seconds = (long)Integer.parseInt(m.group(3));
long dec = (long)Integer.parseInt(m.group(4));
long duration = dec * 10L + seconds * 1000L + minutes * 60L * 1000L + hours * 60L * 60L * 1000L;
info.setDuration(duration);
++step;
}
break;
case 2:
m = p3.matcher(line);
p4.matcher(line);
if (m.matches()) {
type = m.group(1);
String specs = m.group(2);
StringTokenizer st;
int i;
boolean parsed;
Matcher m2;
int bitRate;
if (!"Video".equalsIgnoreCase(type)) {
if ("Audio".equalsIgnoreCase(type)) {
AudioInfo audio = new AudioInfo();
st = new StringTokenizer(specs, ",");
i = 0;
for(; st.hasMoreTokens(); ++i) {
token = st.nextToken().trim();
if (i == 0) {
audio.setDecoder(token);
} else {
parsed = false;
m2 = SAMPLING_RATE_PATTERN.matcher(token);
if (!parsed && m2.find()) {
bitRate = Integer.parseInt(m2.group(1));
audio.setSamplingRate(bitRate);
parsed = true;
}
m2 = CHANNELS_PATTERN.matcher(token);
if (!parsed && m2.find()) {
String ms = m2.group(1);
if ("mono".equalsIgnoreCase(ms)) {
audio.setChannels(1);
} else if ("stereo".equalsIgnoreCase(ms)) {
audio.setChannels(2);
} else if ("quad".equalsIgnoreCase(ms)) {
audio.setChannels(4);
}
parsed = true;
}
m2 = BIT_RATE_PATTERN.matcher(token);
if (!parsed && m2.find()) {
bitRate = Integer.parseInt(m2.group(1));
audio.setBitRate(bitRate * 1000);
parsed = true;
}
}
}
info.setAudio(audio);
}
} else {
VideoInfo video = new VideoInfo();
st = new StringTokenizer(specs, ",");
for(i = 0; st.hasMoreTokens(); ++i) {
token = st.nextToken().trim();
if (i == 0) {
video.setDecoder(token);
} else {
parsed = false;
m2 = SIZE_PATTERN.matcher(token);
if (!parsed && m2.find()) {
bitRate = Integer.parseInt(m2.group(1));
int height = Integer.parseInt(m2.group(2));
video.setSize(new VideoSize(bitRate, height));
parsed = true;
}
m2 = FRAME_RATE_PATTERN.matcher(token);
if (!parsed && m2.find()) {
try {
float frameRate = Float.parseFloat(m2.group(1));
video.setFrameRate(frameRate);
} catch (NumberFormatException var23) {
LOG.info("Invalid frame rate value: " + m2.group(1), var23);
}
parsed = true;
}
m2 = BIT_RATE_PATTERN.matcher(token);
if (!parsed && m2.find()) {
bitRate = Integer.parseInt(m2.group(1));
video.setBitRate(bitRate * 1000);
parsed = true;
}
}
}
info.setVideo(video);
}
}
}
if (line.startsWith("frame=")) {
reader.reinsertLine(line);
break;
}
}
} catch (IOException var24) {
throw new EncoderException(var24);
}
if (info == null) {
throw new InputFormatException();
} else {
return info;
}
}
}
spring:
datasource:
#测试环境数据库
url: jdbc:mysql://10.22.0.2/wbyb_tbx_0?useUnicode=true&useSSL=false&characterEncoding=utf8
username: banxiaoer
password: wbyb@2018
driver-class-name: com.mysql.cj.jdbc.Driver
\ No newline at end of file
package cn.bxe.updatevideo;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class UpdateVideoApplicationTests {
@Test
void contextLoads() {
}
}
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!