diff --git a/README.md b/README.md index 1ddc11b2a1ba3cfce224226e5492756b2a019336..e4e065e21400d5bdca2d0ecb96f0a0e22198e0fd 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,9 @@ ##### 配置工程(roncoo-education-config):[码云地址](https://gitee.com/roncoocom/roncoo-education-config) | [Github地址](https://github.com/roncoo/roncoo-education-config) ### 使用文档 +##### [项目介绍](https://blog.roncoo.com/article/1105321762337357826) ##### [部署文档](https://blog.roncoo.com/article/1103554925858197505) +##### [常见问题](https://blog.roncoo.com/article/1105309620724858882) ### 演示地址 ##### 前端演示地址:[领课教育](http://edu.os.roncoo.com/) diff --git a/doc/images/01.jpg b/doc/images/01.jpg deleted file mode 100644 index 05a5e7a5b1321c1240d7527e804c948f919fe147..0000000000000000000000000000000000000000 Binary files a/doc/images/01.jpg and /dev/null differ diff --git a/doc/images/course.png b/doc/images/course.png deleted file mode 100644 index 314b97164017f90a01b01c6cb7a141e492d0e9bc..0000000000000000000000000000000000000000 Binary files a/doc/images/course.png and /dev/null differ diff --git a/doc/images/course_callback.png b/doc/images/course_callback.png deleted file mode 100644 index bb05c88586b917e3939186e2eb2cdf0821b1cac7..0000000000000000000000000000000000000000 Binary files a/doc/images/course_callback.png and /dev/null differ diff --git a/doc/images/img_01.png b/doc/images/img_01.png deleted file mode 100644 index 84d54b142b10e57bb3c089c22d2cfe5ed1777f88..0000000000000000000000000000000000000000 Binary files a/doc/images/img_01.png and /dev/null differ diff --git a/doc/images/img_02.png b/doc/images/img_02.png deleted file mode 100644 index e7b9776e3ae0459e42dc3ac28a88dc7afe884201..0000000000000000000000000000000000000000 Binary files a/doc/images/img_02.png and /dev/null differ diff --git a/doc/images/lombok1.png b/doc/images/lombok1.png deleted file mode 100644 index b5535a13971f0c1a07c972aa1b504edb529167a4..0000000000000000000000000000000000000000 Binary files a/doc/images/lombok1.png and /dev/null differ diff --git a/doc/images/pay.png b/doc/images/pay.png deleted file mode 100644 index 201db094a361b068ace6d01b2d75cd01a1613eae..0000000000000000000000000000000000000000 Binary files a/doc/images/pay.png and /dev/null differ diff --git a/doc/images/pay_callback.png b/doc/images/pay_callback.png deleted file mode 100644 index 6ce39f99488b752a1d8277b51850d28be4405c89..0000000000000000000000000000000000000000 Binary files a/doc/images/pay_callback.png and /dev/null differ diff --git a/doc/lombok.jar b/doc/lombok.jar deleted file mode 100644 index fa552f01b8c23002d3a21a08f1c6e4be982e4c8d..0000000000000000000000000000000000000000 Binary files a/doc/lombok.jar and /dev/null differ diff --git a/roncoo-education-course/roncoo-education-course-service/src/main/java/com/roncoo/education/course/service/biz/ApiUploadBiz.java b/roncoo-education-course/roncoo-education-course-service/src/main/java/com/roncoo/education/course/service/biz/ApiUploadBiz.java index 95118f61f7b9d921efb878f230c9bf06ebdb489f..7a72a66548326458bf1929833e0e6796b43a4450 100644 --- a/roncoo-education-course/roncoo-education-course-service/src/main/java/com/roncoo/education/course/service/biz/ApiUploadBiz.java +++ b/roncoo-education-course/roncoo-education-course-service/src/main/java/com/roncoo/education/course/service/biz/ApiUploadBiz.java @@ -12,7 +12,9 @@ import org.springframework.stereotype.Component; import org.springframework.web.multipart.MultipartFile; import com.roncoo.education.course.service.dao.CourseVideoDao; +import com.roncoo.education.course.service.dao.FileStorageDao; import com.roncoo.education.course.service.dao.impl.mapper.entity.CourseVideo; +import com.roncoo.education.course.service.dao.impl.mapper.entity.FileStorage; import com.roncoo.education.system.common.bean.vo.SysVO; import com.roncoo.education.system.feign.IBossSys; import com.roncoo.education.util.aliyun.Aliyun; @@ -20,6 +22,8 @@ import com.roncoo.education.util.aliyun.AliyunUtil; import com.roncoo.education.util.base.BaseBiz; import com.roncoo.education.util.base.Result; import com.roncoo.education.util.config.SystemUtil; +import com.roncoo.education.util.enums.FileStorageTypeEnum; +import com.roncoo.education.util.enums.FileTypeEnum; import com.roncoo.education.util.enums.PlatformEnum; import com.roncoo.education.util.enums.VideoStatusEnum; import com.roncoo.education.util.polyv.PolyvUtil; @@ -40,6 +44,8 @@ public class ApiUploadBiz extends BaseBiz { @Autowired private CourseVideoDao courseVideoDao; + @Autowired + private FileStorageDao fileStorageDao; @Autowired private IBossSys bossSys; @@ -156,7 +162,35 @@ public class ApiUploadBiz extends BaseBiz { * @author wuyun */ public Result uploadPic(MultipartFile picFile) { - if (ObjectUtil.isNotNull(picFile) && !picFile.isEmpty()) { + if (ObjectUtil.isNotNull(picFile)) { + // 获取系统配置信息 + SysVO sys = bossSys.getSys(); + if (ObjectUtil.isNull(sys)) { + Result.error("未配置系统配置表"); + } + Long fileNo = IdWorker.getId(); + // 1、上传到本地 + if (sys.getFileType().equals(FileTypeEnum.LOCAL.getCode())) { + File pic = new File(SystemUtil.PIC_STORAGE_PATH + fileNo.toString() + "." + StrUtil.getSuffix(picFile.getOriginalFilename())); + try { + // 判断文件目录是否存在,不存在就创建文件目录 + if (!pic.getParentFile().exists()) { + pic.getParentFile().mkdirs();// 创建父级文件路径 + } + picFile.transferTo(pic); + FileStorage fileStorage = new FileStorage(); + fileStorage.setFileName(picFile.getOriginalFilename()); + fileStorage.setFileNo(fileNo); + fileStorage.setFileSize(picFile.getSize()); + fileStorage.setFileType(FileStorageTypeEnum.PICTURE.getCode()); + fileStorage.setFileUrl(pic.toString()); + fileStorageDao.save(fileStorage); + return Result.success(pic.toString()); + } catch (Exception e) { + logger.error("上传到本地失败", e); + return Result.error("上传文件出错,请重新上传"); + } + } return Result.success(AliyunUtil.uploadPic(PlatformEnum.COURSE, picFile, BeanUtil.copyProperties(bossSys.getSys(), Aliyun.class))); } return Result.error("请选择上传的图片"); @@ -168,7 +202,35 @@ public class ApiUploadBiz extends BaseBiz { * @author wuyun */ public Result uploadDoc(MultipartFile docFile) { - if (ObjectUtil.isNotNull(docFile) && !docFile.isEmpty()) { + if (ObjectUtil.isNotNull(docFile)) { + // 获取系统配置信息 + SysVO sys = bossSys.getSys(); + if (ObjectUtil.isNull(sys)) { + Result.error("未配置系统配置表"); + } + Long fileNo = IdWorker.getId(); + // 1、上传到本地 + if (sys.getFileType().equals(FileTypeEnum.LOCAL.getCode())) { + File pic = new File(SystemUtil.DOC_STORAGE_PATH + fileNo.toString() + "." + StrUtil.getSuffix(docFile.getOriginalFilename())); + try { + // 判断文件目录是否存在,不存在就创建文件目录 + if (!pic.getParentFile().exists()) { + pic.getParentFile().mkdirs();// 创建父级文件路径 + } + docFile.transferTo(pic); + FileStorage fileStorage = new FileStorage(); + fileStorage.setFileName(docFile.getOriginalFilename()); + fileStorage.setFileNo(fileNo); + fileStorage.setFileSize(docFile.getSize()); + fileStorage.setFileType(FileStorageTypeEnum.DOC.getCode()); + fileStorage.setFileUrl(pic.toString()); + fileStorageDao.save(fileStorage); + return Result.success(pic.toString()); + } catch (Exception e) { + logger.error("上传到本地失败", e); + return Result.error("上传文件出错,请重新上传"); + } + } return Result.success(AliyunUtil.uploadDoc(PlatformEnum.COURSE, docFile, BeanUtil.copyProperties(bossSys.getSys(), Aliyun.class))); } return Result.error("请选择上传的文件"); diff --git a/roncoo-education-course/roncoo-education-course-service/src/main/java/com/roncoo/education/course/service/dao/FileStorageDao.java b/roncoo-education-course/roncoo-education-course-service/src/main/java/com/roncoo/education/course/service/dao/FileStorageDao.java new file mode 100644 index 0000000000000000000000000000000000000000..c38733a1b6a8c470a8fc72a91fba9307573fd9b5 --- /dev/null +++ b/roncoo-education-course/roncoo-education-course-service/src/main/java/com/roncoo/education/course/service/dao/FileStorageDao.java @@ -0,0 +1,17 @@ +package com.roncoo.education.course.service.dao; + +import com.roncoo.education.course.service.dao.impl.mapper.entity.FileStorage; +import com.roncoo.education.course.service.dao.impl.mapper.entity.FileStorageExample; +import com.roncoo.education.util.base.Page; + +public interface FileStorageDao { + int save(FileStorage record); + + int deleteById(Long id); + + int updateById(FileStorage record); + + FileStorage getById(Long id); + + Page listForPage(int pageCurrent, int pageSize, FileStorageExample example); +} \ No newline at end of file diff --git a/roncoo-education-course/roncoo-education-course-service/src/main/java/com/roncoo/education/course/service/dao/impl/FileStorageDaoImpl.java b/roncoo-education-course/roncoo-education-course-service/src/main/java/com/roncoo/education/course/service/dao/impl/FileStorageDaoImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..34798ddfe91f4b33865ce2a850656f394027367a --- /dev/null +++ b/roncoo-education-course/roncoo-education-course-service/src/main/java/com/roncoo/education/course/service/dao/impl/FileStorageDaoImpl.java @@ -0,0 +1,44 @@ +package com.roncoo.education.course.service.dao.impl; + +import com.roncoo.education.course.service.dao.FileStorageDao; +import com.roncoo.education.course.service.dao.impl.mapper.FileStorageMapper; +import com.roncoo.education.course.service.dao.impl.mapper.entity.FileStorage; +import com.roncoo.education.course.service.dao.impl.mapper.entity.FileStorageExample; +import com.roncoo.education.util.base.Page; +import com.roncoo.education.util.base.PageUtil; +import com.roncoo.education.util.tools.IdWorker; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Repository; + +@Repository +public class FileStorageDaoImpl implements FileStorageDao { + @Autowired + private FileStorageMapper fileStorageMapper; + + public int save(FileStorage record) { + record.setId(IdWorker.getId()); + return this.fileStorageMapper.insertSelective(record); + } + + public int deleteById(Long id) { + return this.fileStorageMapper.deleteByPrimaryKey(id); + } + + public int updateById(FileStorage record) { + return this.fileStorageMapper.updateByPrimaryKeySelective(record); + } + + public FileStorage getById(Long id) { + return this.fileStorageMapper.selectByPrimaryKey(id); + } + + public Page listForPage(int pageCurrent, int pageSize, FileStorageExample example) { + int count = this.fileStorageMapper.countByExample(example); + pageSize = PageUtil.checkPageSize(pageSize); + pageCurrent = PageUtil.checkPageCurrent(count, pageSize, pageCurrent); + int totalPage = PageUtil.countTotalPage(count, pageSize); + example.setLimitStart(PageUtil.countOffset(pageCurrent, pageSize)); + example.setPageSize(pageSize); + return new Page(count, totalPage, pageCurrent, pageSize, this.fileStorageMapper.selectByExample(example)); + } +} \ No newline at end of file diff --git a/roncoo-education-course/roncoo-education-course-service/src/main/java/com/roncoo/education/course/service/dao/impl/mapper/FileStorageMapper.java b/roncoo-education-course/roncoo-education-course-service/src/main/java/com/roncoo/education/course/service/dao/impl/mapper/FileStorageMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..074edadb84d919c5e97376fe5d8b4486a45551f8 --- /dev/null +++ b/roncoo-education-course/roncoo-education-course-service/src/main/java/com/roncoo/education/course/service/dao/impl/mapper/FileStorageMapper.java @@ -0,0 +1,32 @@ +package com.roncoo.education.course.service.dao.impl.mapper; + +import com.roncoo.education.course.service.dao.impl.mapper.entity.FileStorage; +import com.roncoo.education.course.service.dao.impl.mapper.entity.FileStorageExample; +import java.util.List; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +@Mapper +public interface FileStorageMapper { + int countByExample(FileStorageExample example); + + int deleteByExample(FileStorageExample example); + + int deleteByPrimaryKey(Long id); + + int insert(FileStorage record); + + int insertSelective(FileStorage record); + + List selectByExample(FileStorageExample example); + + FileStorage selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") FileStorage record, @Param("example") FileStorageExample example); + + int updateByExample(@Param("record") FileStorage record, @Param("example") FileStorageExample example); + + int updateByPrimaryKeySelective(FileStorage record); + + int updateByPrimaryKey(FileStorage record); +} \ No newline at end of file diff --git a/roncoo-education-course/roncoo-education-course-service/src/main/java/com/roncoo/education/course/service/dao/impl/mapper/entity/FileStorage.java b/roncoo-education-course/roncoo-education-course-service/src/main/java/com/roncoo/education/course/service/dao/impl/mapper/entity/FileStorage.java new file mode 100644 index 0000000000000000000000000000000000000000..42622d63d2e5148263bdb095eb1c019330344b6a --- /dev/null +++ b/roncoo-education-course/roncoo-education-course-service/src/main/java/com/roncoo/education/course/service/dao/impl/mapper/entity/FileStorage.java @@ -0,0 +1,96 @@ +package com.roncoo.education.course.service.dao.impl.mapper.entity; + +import java.io.Serializable; +import java.util.Date; + +public class FileStorage implements Serializable { + private Long id; + + private Date gmtCreate; + + private Long fileNo; + + private String fileName; + + private String fileUrl; + + private Integer fileType; + + private Long fileSize; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Date getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public Long getFileNo() { + return fileNo; + } + + public void setFileNo(Long fileNo) { + this.fileNo = fileNo; + } + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName == null ? null : fileName.trim(); + } + + public String getFileUrl() { + return fileUrl; + } + + public void setFileUrl(String fileUrl) { + this.fileUrl = fileUrl == null ? null : fileUrl.trim(); + } + + public Integer getFileType() { + return fileType; + } + + public void setFileType(Integer fileType) { + this.fileType = fileType; + } + + public Long getFileSize() { + return fileSize; + } + + public void setFileSize(Long fileSize) { + this.fileSize = fileSize; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", gmtCreate=").append(gmtCreate); + sb.append(", fileNo=").append(fileNo); + sb.append(", fileName=").append(fileName); + sb.append(", fileUrl=").append(fileUrl); + sb.append(", fileType=").append(fileType); + sb.append(", fileSize=").append(fileSize); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/roncoo-education-course/roncoo-education-course-service/src/main/java/com/roncoo/education/course/service/dao/impl/mapper/entity/FileStorageExample.java b/roncoo-education-course/roncoo-education-course-service/src/main/java/com/roncoo/education/course/service/dao/impl/mapper/entity/FileStorageExample.java new file mode 100644 index 0000000000000000000000000000000000000000..df60d9da89353e075fa79899d1b96f5114b1bb7c --- /dev/null +++ b/roncoo-education-course/roncoo-education-course-service/src/main/java/com/roncoo/education/course/service/dao/impl/mapper/entity/FileStorageExample.java @@ -0,0 +1,661 @@ +package com.roncoo.education.course.service.dao.impl.mapper.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class FileStorageExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + protected int limitStart = -1; + + protected int pageSize = -1; + + public FileStorageExample() { + 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; + } + + public void setLimitStart(int limitStart) { + this.limitStart=limitStart; + } + + public int getLimitStart() { + return limitStart; + } + + public void setPageSize(int pageSize) { + this.pageSize=pageSize; + } + + public int getPageSize() { + return pageSize; + } + + 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(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List 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(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andGmtCreateIsNull() { + addCriterion("gmt_create is null"); + return (Criteria) this; + } + + public Criteria andGmtCreateIsNotNull() { + addCriterion("gmt_create is not null"); + return (Criteria) this; + } + + public Criteria andGmtCreateEqualTo(Date value) { + addCriterion("gmt_create =", value, "gmtCreate"); + return (Criteria) this; + } + + public Criteria andGmtCreateNotEqualTo(Date value) { + addCriterion("gmt_create <>", value, "gmtCreate"); + return (Criteria) this; + } + + public Criteria andGmtCreateGreaterThan(Date value) { + addCriterion("gmt_create >", value, "gmtCreate"); + return (Criteria) this; + } + + public Criteria andGmtCreateGreaterThanOrEqualTo(Date value) { + addCriterion("gmt_create >=", value, "gmtCreate"); + return (Criteria) this; + } + + public Criteria andGmtCreateLessThan(Date value) { + addCriterion("gmt_create <", value, "gmtCreate"); + return (Criteria) this; + } + + public Criteria andGmtCreateLessThanOrEqualTo(Date value) { + addCriterion("gmt_create <=", value, "gmtCreate"); + return (Criteria) this; + } + + public Criteria andGmtCreateIn(List values) { + addCriterion("gmt_create in", values, "gmtCreate"); + return (Criteria) this; + } + + public Criteria andGmtCreateNotIn(List values) { + addCriterion("gmt_create not in", values, "gmtCreate"); + return (Criteria) this; + } + + public Criteria andGmtCreateBetween(Date value1, Date value2) { + addCriterion("gmt_create between", value1, value2, "gmtCreate"); + return (Criteria) this; + } + + public Criteria andGmtCreateNotBetween(Date value1, Date value2) { + addCriterion("gmt_create not between", value1, value2, "gmtCreate"); + return (Criteria) this; + } + + public Criteria andFileNoIsNull() { + addCriterion("file_no is null"); + return (Criteria) this; + } + + public Criteria andFileNoIsNotNull() { + addCriterion("file_no is not null"); + return (Criteria) this; + } + + public Criteria andFileNoEqualTo(Long value) { + addCriterion("file_no =", value, "fileNo"); + return (Criteria) this; + } + + public Criteria andFileNoNotEqualTo(Long value) { + addCriterion("file_no <>", value, "fileNo"); + return (Criteria) this; + } + + public Criteria andFileNoGreaterThan(Long value) { + addCriterion("file_no >", value, "fileNo"); + return (Criteria) this; + } + + public Criteria andFileNoGreaterThanOrEqualTo(Long value) { + addCriterion("file_no >=", value, "fileNo"); + return (Criteria) this; + } + + public Criteria andFileNoLessThan(Long value) { + addCriterion("file_no <", value, "fileNo"); + return (Criteria) this; + } + + public Criteria andFileNoLessThanOrEqualTo(Long value) { + addCriterion("file_no <=", value, "fileNo"); + return (Criteria) this; + } + + public Criteria andFileNoIn(List values) { + addCriterion("file_no in", values, "fileNo"); + return (Criteria) this; + } + + public Criteria andFileNoNotIn(List values) { + addCriterion("file_no not in", values, "fileNo"); + return (Criteria) this; + } + + public Criteria andFileNoBetween(Long value1, Long value2) { + addCriterion("file_no between", value1, value2, "fileNo"); + return (Criteria) this; + } + + public Criteria andFileNoNotBetween(Long value1, Long value2) { + addCriterion("file_no not between", value1, value2, "fileNo"); + return (Criteria) this; + } + + public Criteria andFileNameIsNull() { + addCriterion("file_name is null"); + return (Criteria) this; + } + + public Criteria andFileNameIsNotNull() { + addCriterion("file_name is not null"); + return (Criteria) this; + } + + public Criteria andFileNameEqualTo(String value) { + addCriterion("file_name =", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameNotEqualTo(String value) { + addCriterion("file_name <>", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameGreaterThan(String value) { + addCriterion("file_name >", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameGreaterThanOrEqualTo(String value) { + addCriterion("file_name >=", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameLessThan(String value) { + addCriterion("file_name <", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameLessThanOrEqualTo(String value) { + addCriterion("file_name <=", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameLike(String value) { + addCriterion("file_name like", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameNotLike(String value) { + addCriterion("file_name not like", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameIn(List values) { + addCriterion("file_name in", values, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameNotIn(List values) { + addCriterion("file_name not in", values, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameBetween(String value1, String value2) { + addCriterion("file_name between", value1, value2, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameNotBetween(String value1, String value2) { + addCriterion("file_name not between", value1, value2, "fileName"); + return (Criteria) this; + } + + public Criteria andFileUrlIsNull() { + addCriterion("file_url is null"); + return (Criteria) this; + } + + public Criteria andFileUrlIsNotNull() { + addCriterion("file_url is not null"); + return (Criteria) this; + } + + public Criteria andFileUrlEqualTo(String value) { + addCriterion("file_url =", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlNotEqualTo(String value) { + addCriterion("file_url <>", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlGreaterThan(String value) { + addCriterion("file_url >", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlGreaterThanOrEqualTo(String value) { + addCriterion("file_url >=", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlLessThan(String value) { + addCriterion("file_url <", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlLessThanOrEqualTo(String value) { + addCriterion("file_url <=", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlLike(String value) { + addCriterion("file_url like", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlNotLike(String value) { + addCriterion("file_url not like", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlIn(List values) { + addCriterion("file_url in", values, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlNotIn(List values) { + addCriterion("file_url not in", values, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlBetween(String value1, String value2) { + addCriterion("file_url between", value1, value2, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlNotBetween(String value1, String value2) { + addCriterion("file_url not between", value1, value2, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileTypeIsNull() { + addCriterion("file_type is null"); + return (Criteria) this; + } + + public Criteria andFileTypeIsNotNull() { + addCriterion("file_type is not null"); + return (Criteria) this; + } + + public Criteria andFileTypeEqualTo(Integer value) { + addCriterion("file_type =", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeNotEqualTo(Integer value) { + addCriterion("file_type <>", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeGreaterThan(Integer value) { + addCriterion("file_type >", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("file_type >=", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeLessThan(Integer value) { + addCriterion("file_type <", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeLessThanOrEqualTo(Integer value) { + addCriterion("file_type <=", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeIn(List values) { + addCriterion("file_type in", values, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeNotIn(List values) { + addCriterion("file_type not in", values, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeBetween(Integer value1, Integer value2) { + addCriterion("file_type between", value1, value2, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeNotBetween(Integer value1, Integer value2) { + addCriterion("file_type not between", value1, value2, "fileType"); + return (Criteria) this; + } + + public Criteria andFileSizeIsNull() { + addCriterion("file_size is null"); + return (Criteria) this; + } + + public Criteria andFileSizeIsNotNull() { + addCriterion("file_size is not null"); + return (Criteria) this; + } + + public Criteria andFileSizeEqualTo(Long value) { + addCriterion("file_size =", value, "fileSize"); + return (Criteria) this; + } + + public Criteria andFileSizeNotEqualTo(Long value) { + addCriterion("file_size <>", value, "fileSize"); + return (Criteria) this; + } + + public Criteria andFileSizeGreaterThan(Long value) { + addCriterion("file_size >", value, "fileSize"); + return (Criteria) this; + } + + public Criteria andFileSizeGreaterThanOrEqualTo(Long value) { + addCriterion("file_size >=", value, "fileSize"); + return (Criteria) this; + } + + public Criteria andFileSizeLessThan(Long value) { + addCriterion("file_size <", value, "fileSize"); + return (Criteria) this; + } + + public Criteria andFileSizeLessThanOrEqualTo(Long value) { + addCriterion("file_size <=", value, "fileSize"); + return (Criteria) this; + } + + public Criteria andFileSizeIn(List values) { + addCriterion("file_size in", values, "fileSize"); + return (Criteria) this; + } + + public Criteria andFileSizeNotIn(List values) { + addCriterion("file_size not in", values, "fileSize"); + return (Criteria) this; + } + + public Criteria andFileSizeBetween(Long value1, Long value2) { + addCriterion("file_size between", value1, value2, "fileSize"); + return (Criteria) this; + } + + public Criteria andFileSizeNotBetween(Long value1, Long value2) { + addCriterion("file_size not between", value1, value2, "fileSize"); + 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/roncoo-education-course/roncoo-education-course-service/src/main/resources/mybatis/FileStorageMapper.xml b/roncoo-education-course/roncoo-education-course-service/src/main/resources/mybatis/FileStorageMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..b5e87301ecb940cdbfecd00c87cda26a0a7ee19b --- /dev/null +++ b/roncoo-education-course/roncoo-education-course-service/src/main/resources/mybatis/FileStorageMapper.xml @@ -0,0 +1,246 @@ + + + + + + + + + + + + + + + + + + + + + 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, gmt_create, file_no, file_name, file_url, file_type, file_size + + + + + delete from file_storage + where id = #{id,jdbcType=BIGINT} + + + delete from file_storage + + + + + + insert into file_storage (id, gmt_create, file_no, + file_name, file_url, file_type, + file_size) + values (#{id,jdbcType=BIGINT}, #{gmtCreate,jdbcType=TIMESTAMP}, #{fileNo,jdbcType=BIGINT}, + #{fileName,jdbcType=VARCHAR}, #{fileUrl,jdbcType=VARCHAR}, #{fileType,jdbcType=TINYINT}, + #{fileSize,jdbcType=BIGINT}) + + + insert into file_storage + + + id, + + + gmt_create, + + + file_no, + + + file_name, + + + file_url, + + + file_type, + + + file_size, + + + + + #{id,jdbcType=BIGINT}, + + + #{gmtCreate,jdbcType=TIMESTAMP}, + + + #{fileNo,jdbcType=BIGINT}, + + + #{fileName,jdbcType=VARCHAR}, + + + #{fileUrl,jdbcType=VARCHAR}, + + + #{fileType,jdbcType=TINYINT}, + + + #{fileSize,jdbcType=BIGINT}, + + + + + + update file_storage + + + id = #{record.id,jdbcType=BIGINT}, + + + gmt_create = #{record.gmtCreate,jdbcType=TIMESTAMP}, + + + file_no = #{record.fileNo,jdbcType=BIGINT}, + + + file_name = #{record.fileName,jdbcType=VARCHAR}, + + + file_url = #{record.fileUrl,jdbcType=VARCHAR}, + + + file_type = #{record.fileType,jdbcType=TINYINT}, + + + file_size = #{record.fileSize,jdbcType=BIGINT}, + + + + + + + + update file_storage + set id = #{record.id,jdbcType=BIGINT}, + gmt_create = #{record.gmtCreate,jdbcType=TIMESTAMP}, + file_no = #{record.fileNo,jdbcType=BIGINT}, + file_name = #{record.fileName,jdbcType=VARCHAR}, + file_url = #{record.fileUrl,jdbcType=VARCHAR}, + file_type = #{record.fileType,jdbcType=TINYINT}, + file_size = #{record.fileSize,jdbcType=BIGINT} + + + + + + update file_storage + + + gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, + + + file_no = #{fileNo,jdbcType=BIGINT}, + + + file_name = #{fileName,jdbcType=VARCHAR}, + + + file_url = #{fileUrl,jdbcType=VARCHAR}, + + + file_type = #{fileType,jdbcType=TINYINT}, + + + file_size = #{fileSize,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update file_storage + set gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, + file_no = #{fileNo,jdbcType=BIGINT}, + file_name = #{fileName,jdbcType=VARCHAR}, + file_url = #{fileUrl,jdbcType=VARCHAR}, + file_type = #{fileType,jdbcType=TINYINT}, + file_size = #{fileSize,jdbcType=BIGINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/roncoo-education-system/roncoo-education-system-common/src/main/java/com/roncoo/education/system/common/bean/qo/SysQO.java b/roncoo-education-system/roncoo-education-system-common/src/main/java/com/roncoo/education/system/common/bean/qo/SysQO.java index 323714c52f57af0332c7c3a953dbd9336c4e389e..b2bae9bc42aec452ee2b05e039ac80e8745a06e8 100644 --- a/roncoo-education-system/roncoo-education-system-common/src/main/java/com/roncoo/education/system/common/bean/qo/SysQO.java +++ b/roncoo-education-system/roncoo-education-system-common/src/main/java/com/roncoo/education/system/common/bean/qo/SysQO.java @@ -97,10 +97,6 @@ public class SysQO implements Serializable { * oss_bucket */ private String aliyunOssBucket; - /** - * oas_vault - */ - private String aliyunOasVault; /** * pay_url */ diff --git a/roncoo-education-system/roncoo-education-system-common/src/main/java/com/roncoo/education/system/common/bean/vo/SysVO.java b/roncoo-education-system/roncoo-education-system-common/src/main/java/com/roncoo/education/system/common/bean/vo/SysVO.java index 361bbbc8ea85fc15e07f6460c02a1bdb2ccb7a10..f7c97ec0f03f261b73b3b6ed60a6409fe02f2ba7 100644 --- a/roncoo-education-system/roncoo-education-system-common/src/main/java/com/roncoo/education/system/common/bean/vo/SysVO.java +++ b/roncoo-education-system/roncoo-education-system-common/src/main/java/com/roncoo/education/system/common/bean/vo/SysVO.java @@ -89,10 +89,6 @@ public class SysVO implements Serializable { * oss_bucket */ private String aliyunOssBucket; - /** - * oas_vault - */ - private String aliyunOasVault; /** * pay_url */ diff --git a/roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/dao/impl/mapper/entity/Sys.java b/roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/dao/impl/mapper/entity/Sys.java index 9eb52735ff8c4133461f23ba88eeec23a4dbf3ae..381c670de1bd079b5a4b5ada07118740352b060d 100644 --- a/roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/dao/impl/mapper/entity/Sys.java +++ b/roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/dao/impl/mapper/entity/Sys.java @@ -34,8 +34,6 @@ public class Sys implements Serializable { private String aliyunOssBucket; - private String aliyunOasVault; - private Integer payType; private String payUrl; @@ -172,14 +170,6 @@ public class Sys implements Serializable { this.aliyunOssBucket = aliyunOssBucket == null ? null : aliyunOssBucket.trim(); } - public String getAliyunOasVault() { - return aliyunOasVault; - } - - public void setAliyunOasVault(String aliyunOasVault) { - this.aliyunOasVault = aliyunOasVault == null ? null : aliyunOasVault.trim(); - } - public Integer getPayType() { return payType; } @@ -257,7 +247,6 @@ public class Sys implements Serializable { sb.append(", aliyunAccessKeySecret=").append(aliyunAccessKeySecret); sb.append(", aliyunOssUrl=").append(aliyunOssUrl); sb.append(", aliyunOssBucket=").append(aliyunOssBucket); - sb.append(", aliyunOasVault=").append(aliyunOasVault); sb.append(", payType=").append(payType); sb.append(", payUrl=").append(payUrl); sb.append(", payKey=").append(payKey); diff --git a/roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/dao/impl/mapper/entity/SysExample.java b/roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/dao/impl/mapper/entity/SysExample.java index e66cebad5f28c1ec8444014573c7ee2d15025787..aa09e63ee3fc444fe179da657ade60d6ff38b7ff 100644 --- a/roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/dao/impl/mapper/entity/SysExample.java +++ b/roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/dao/impl/mapper/entity/SysExample.java @@ -1105,76 +1105,6 @@ public class SysExample { return (Criteria) this; } - public Criteria andAliyunOasVaultIsNull() { - addCriterion("aliyun_oas_vault is null"); - return (Criteria) this; - } - - public Criteria andAliyunOasVaultIsNotNull() { - addCriterion("aliyun_oas_vault is not null"); - return (Criteria) this; - } - - public Criteria andAliyunOasVaultEqualTo(String value) { - addCriterion("aliyun_oas_vault =", value, "aliyunOasVault"); - return (Criteria) this; - } - - public Criteria andAliyunOasVaultNotEqualTo(String value) { - addCriterion("aliyun_oas_vault <>", value, "aliyunOasVault"); - return (Criteria) this; - } - - public Criteria andAliyunOasVaultGreaterThan(String value) { - addCriterion("aliyun_oas_vault >", value, "aliyunOasVault"); - return (Criteria) this; - } - - public Criteria andAliyunOasVaultGreaterThanOrEqualTo(String value) { - addCriterion("aliyun_oas_vault >=", value, "aliyunOasVault"); - return (Criteria) this; - } - - public Criteria andAliyunOasVaultLessThan(String value) { - addCriterion("aliyun_oas_vault <", value, "aliyunOasVault"); - return (Criteria) this; - } - - public Criteria andAliyunOasVaultLessThanOrEqualTo(String value) { - addCriterion("aliyun_oas_vault <=", value, "aliyunOasVault"); - return (Criteria) this; - } - - public Criteria andAliyunOasVaultLike(String value) { - addCriterion("aliyun_oas_vault like", value, "aliyunOasVault"); - return (Criteria) this; - } - - public Criteria andAliyunOasVaultNotLike(String value) { - addCriterion("aliyun_oas_vault not like", value, "aliyunOasVault"); - return (Criteria) this; - } - - public Criteria andAliyunOasVaultIn(List values) { - addCriterion("aliyun_oas_vault in", values, "aliyunOasVault"); - return (Criteria) this; - } - - public Criteria andAliyunOasVaultNotIn(List values) { - addCriterion("aliyun_oas_vault not in", values, "aliyunOasVault"); - return (Criteria) this; - } - - public Criteria andAliyunOasVaultBetween(String value1, String value2) { - addCriterion("aliyun_oas_vault between", value1, value2, "aliyunOasVault"); - return (Criteria) this; - } - - public Criteria andAliyunOasVaultNotBetween(String value1, String value2) { - addCriterion("aliyun_oas_vault not between", value1, value2, "aliyunOasVault"); - return (Criteria) this; - } - public Criteria andPayTypeIsNull() { addCriterion("pay_type is null"); return (Criteria) this; diff --git a/roncoo-education-system/roncoo-education-system-service/src/main/resources/mybatis/SysMapper.xml b/roncoo-education-system/roncoo-education-system-service/src/main/resources/mybatis/SysMapper.xml index 33e7027d44d700bdfb666d6593d6b63a87168ec4..8bc1fac62ae1f2c54e5254306b3821d5ed12fbc0 100644 --- a/roncoo-education-system/roncoo-education-system-service/src/main/resources/mybatis/SysMapper.xml +++ b/roncoo-education-system/roncoo-education-system-service/src/main/resources/mybatis/SysMapper.xml @@ -17,7 +17,6 @@ - @@ -87,8 +86,8 @@ id, gmt_create, gmt_modified, status_id, sort, video_type, polyv_useid, polyv_writetoken, polyv_readtoken, polyv_secretkey, file_type, aliyun_access_key_id, aliyun_access_key_secret, - aliyun_oss_url, aliyun_oss_bucket, aliyun_oas_vault, pay_type, pay_url, pay_key, - pay_secret, notify_url, sms_code, sign_name + aliyun_oss_url, aliyun_oss_bucket, pay_type, pay_url, pay_key, pay_secret, notify_url, + sms_code, sign_name +
- -            - - + + +

- -
-
-
- - + + +
@@ -49,37 +46,31 @@ <#else> +
- -            - - -
-
- - -            - - + + +

- - -
-
-
- - + + +         + +

- - + + +         + +

@@ -100,22 +91,16 @@
- -
-
-
+ - +

- - -
-
-
- - + + + +
<#else> @@ -135,20 +120,16 @@
- -            - - + + +

- -
-
-
- - + + +
@@ -168,27 +149,24 @@
- -            - - -
-
-
- - + + +

- - + + + +

- - + + + +
-
@@ -207,22 +185,16 @@
- -
-
-
+ - -
-
-
- - +

- - + + + +