提交 fd825bc4 编写于 作者: 夏天飘过的风's avatar 夏天飘过的风

Merge branch 'dev' of https://github.com/roncoo/roncoo-education.git

Conflicts:
	doc/数据脚本-2.0.0.zip
......@@ -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/)
......
......@@ -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<String> 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<String> 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("请选择上传的文件");
......
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<FileStorage> listForPage(int pageCurrent, int pageSize, FileStorageExample example);
}
\ No newline at end of file
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<FileStorage> 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<FileStorage>(count, totalPage, pageCurrent, pageSize, this.fileStorageMapper.selectByExample(example));
}
}
\ No newline at end of file
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<FileStorage> 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
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
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.roncoo.education.course.service.dao.impl.mapper.FileStorageMapper" >
<resultMap id="BaseResultMap" type="com.roncoo.education.course.service.dao.impl.mapper.entity.FileStorage" >
<id column="id" property="id" jdbcType="BIGINT" />
<result column="gmt_create" property="gmtCreate" jdbcType="TIMESTAMP" />
<result column="file_no" property="fileNo" jdbcType="BIGINT" />
<result column="file_name" property="fileName" jdbcType="VARCHAR" />
<result column="file_url" property="fileUrl" jdbcType="VARCHAR" />
<result column="file_type" property="fileType" jdbcType="TINYINT" />
<result column="file_size" property="fileSize" jdbcType="BIGINT" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
id, gmt_create, file_no, file_name, file_url, file_type, file_size
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.roncoo.education.course.service.dao.impl.mapper.entity.FileStorageExample" >
select
<if test="distinct" >
distinct
</if>
<include refid="Base_Column_List" />
from file_storage
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
order by ${orderByClause}
</if>
<if test="limitStart >= 0" >
limit ${limitStart} , ${pageSize}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
select
<include refid="Base_Column_List" />
from file_storage
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
delete from file_storage
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.roncoo.education.course.service.dao.impl.mapper.entity.FileStorageExample" >
delete from file_storage
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.roncoo.education.course.service.dao.impl.mapper.entity.FileStorage" >
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>
<insert id="insertSelective" parameterType="com.roncoo.education.course.service.dao.impl.mapper.entity.FileStorage" >
insert into file_storage
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="gmtCreate != null" >
gmt_create,
</if>
<if test="fileNo != null" >
file_no,
</if>
<if test="fileName != null" >
file_name,
</if>
<if test="fileUrl != null" >
file_url,
</if>
<if test="fileType != null" >
file_type,
</if>
<if test="fileSize != null" >
file_size,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=BIGINT},
</if>
<if test="gmtCreate != null" >
#{gmtCreate,jdbcType=TIMESTAMP},
</if>
<if test="fileNo != null" >
#{fileNo,jdbcType=BIGINT},
</if>
<if test="fileName != null" >
#{fileName,jdbcType=VARCHAR},
</if>
<if test="fileUrl != null" >
#{fileUrl,jdbcType=VARCHAR},
</if>
<if test="fileType != null" >
#{fileType,jdbcType=TINYINT},
</if>
<if test="fileSize != null" >
#{fileSize,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.roncoo.education.course.service.dao.impl.mapper.entity.FileStorageExample" resultType="java.lang.Integer" >
select count(*) from file_storage
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
update file_storage
<set >
<if test="record.id != null" >
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.gmtCreate != null" >
gmt_create = #{record.gmtCreate,jdbcType=TIMESTAMP},
</if>
<if test="record.fileNo != null" >
file_no = #{record.fileNo,jdbcType=BIGINT},
</if>
<if test="record.fileName != null" >
file_name = #{record.fileName,jdbcType=VARCHAR},
</if>
<if test="record.fileUrl != null" >
file_url = #{record.fileUrl,jdbcType=VARCHAR},
</if>
<if test="record.fileType != null" >
file_type = #{record.fileType,jdbcType=TINYINT},
</if>
<if test="record.fileSize != null" >
file_size = #{record.fileSize,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
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}
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.roncoo.education.course.service.dao.impl.mapper.entity.FileStorage" >
update file_storage
<set >
<if test="gmtCreate != null" >
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
</if>
<if test="fileNo != null" >
file_no = #{fileNo,jdbcType=BIGINT},
</if>
<if test="fileName != null" >
file_name = #{fileName,jdbcType=VARCHAR},
</if>
<if test="fileUrl != null" >
file_url = #{fileUrl,jdbcType=VARCHAR},
</if>
<if test="fileType != null" >
file_type = #{fileType,jdbcType=TINYINT},
</if>
<if test="fileSize != null" >
file_size = #{fileSize,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.roncoo.education.course.service.dao.impl.mapper.entity.FileStorage" >
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}
</update>
</mapper>
\ No newline at end of file
......@@ -97,10 +97,6 @@ public class SysQO implements Serializable {
* oss_bucket
*/
private String aliyunOssBucket;
/**
* oas_vault
*/
private String aliyunOasVault;
/**
* pay_url
*/
......
......@@ -89,10 +89,6 @@ public class SysVO implements Serializable {
* oss_bucket
*/
private String aliyunOssBucket;
/**
* oas_vault
*/
private String aliyunOasVault;
/**
* pay_url
*/
......
......@@ -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);
......
......@@ -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<String> values) {
addCriterion("aliyun_oas_vault in", values, "aliyunOasVault");
return (Criteria) this;
}
public Criteria andAliyunOasVaultNotIn(List<String> 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;
......
......@@ -17,7 +17,6 @@
<result column="aliyun_access_key_secret" property="aliyunAccessKeySecret" jdbcType="VARCHAR" />
<result column="aliyun_oss_url" property="aliyunOssUrl" jdbcType="VARCHAR" />
<result column="aliyun_oss_bucket" property="aliyunOssBucket" jdbcType="VARCHAR" />
<result column="aliyun_oas_vault" property="aliyunOasVault" jdbcType="VARCHAR" />
<result column="pay_type" property="payType" jdbcType="TINYINT" />
<result column="pay_url" property="payUrl" jdbcType="VARCHAR" />
<result column="pay_key" property="payKey" jdbcType="VARCHAR" />
......@@ -87,8 +86,8 @@
<sql id="Base_Column_List" >
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
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.roncoo.education.system.service.dao.impl.mapper.entity.SysExample" >
select
......@@ -129,17 +128,17 @@
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)
pay_type, pay_url, pay_key,
pay_secret, notify_url, sms_code,
sign_name)
values (#{id,jdbcType=BIGINT}, #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP},
#{statusId,jdbcType=TINYINT}, #{sort,jdbcType=INTEGER}, #{videoType,jdbcType=TINYINT},
#{polyvUseid,jdbcType=VARCHAR}, #{polyvWritetoken,jdbcType=VARCHAR}, #{polyvReadtoken,jdbcType=VARCHAR},
#{polyvSecretkey,jdbcType=VARCHAR}, #{fileType,jdbcType=TINYINT}, #{aliyunAccessKeyId,jdbcType=VARCHAR},
#{aliyunAccessKeySecret,jdbcType=VARCHAR}, #{aliyunOssUrl,jdbcType=VARCHAR}, #{aliyunOssBucket,jdbcType=VARCHAR},
#{aliyunOasVault,jdbcType=VARCHAR}, #{payType,jdbcType=TINYINT}, #{payUrl,jdbcType=VARCHAR},
#{payKey,jdbcType=VARCHAR}, #{paySecret,jdbcType=VARCHAR}, #{notifyUrl,jdbcType=VARCHAR},
#{smsCode,jdbcType=VARCHAR}, #{signName,jdbcType=VARCHAR})
#{payType,jdbcType=TINYINT}, #{payUrl,jdbcType=VARCHAR}, #{payKey,jdbcType=VARCHAR},
#{paySecret,jdbcType=VARCHAR}, #{notifyUrl,jdbcType=VARCHAR}, #{smsCode,jdbcType=VARCHAR},
#{signName,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.roncoo.education.system.service.dao.impl.mapper.entity.Sys" >
insert into sys
......@@ -189,9 +188,6 @@
<if test="aliyunOssBucket != null" >
aliyun_oss_bucket,
</if>
<if test="aliyunOasVault != null" >
aliyun_oas_vault,
</if>
<if test="payType != null" >
pay_type,
</if>
......@@ -260,9 +256,6 @@
<if test="aliyunOssBucket != null" >
#{aliyunOssBucket,jdbcType=VARCHAR},
</if>
<if test="aliyunOasVault != null" >
#{aliyunOasVault,jdbcType=VARCHAR},
</if>
<if test="payType != null" >
#{payType,jdbcType=TINYINT},
</if>
......@@ -340,9 +333,6 @@
<if test="record.aliyunOssBucket != null" >
aliyun_oss_bucket = #{record.aliyunOssBucket,jdbcType=VARCHAR},
</if>
<if test="record.aliyunOasVault != null" >
aliyun_oas_vault = #{record.aliyunOasVault,jdbcType=VARCHAR},
</if>
<if test="record.payType != null" >
pay_type = #{record.payType,jdbcType=TINYINT},
</if>
......@@ -386,7 +376,6 @@
aliyun_access_key_secret = #{record.aliyunAccessKeySecret,jdbcType=VARCHAR},
aliyun_oss_url = #{record.aliyunOssUrl,jdbcType=VARCHAR},
aliyun_oss_bucket = #{record.aliyunOssBucket,jdbcType=VARCHAR},
aliyun_oas_vault = #{record.aliyunOasVault,jdbcType=VARCHAR},
pay_type = #{record.payType,jdbcType=TINYINT},
pay_url = #{record.payUrl,jdbcType=VARCHAR},
pay_key = #{record.payKey,jdbcType=VARCHAR},
......@@ -443,9 +432,6 @@
<if test="aliyunOssBucket != null" >
aliyun_oss_bucket = #{aliyunOssBucket,jdbcType=VARCHAR},
</if>
<if test="aliyunOasVault != null" >
aliyun_oas_vault = #{aliyunOasVault,jdbcType=VARCHAR},
</if>
<if test="payType != null" >
pay_type = #{payType,jdbcType=TINYINT},
</if>
......@@ -486,7 +472,6 @@
aliyun_access_key_secret = #{aliyunAccessKeySecret,jdbcType=VARCHAR},
aliyun_oss_url = #{aliyunOssUrl,jdbcType=VARCHAR},
aliyun_oss_bucket = #{aliyunOssBucket,jdbcType=VARCHAR},
aliyun_oas_vault = #{aliyunOasVault,jdbcType=VARCHAR},
pay_type = #{payType,jdbcType=TINYINT},
pay_url = #{payUrl,jdbcType=VARCHAR},
pay_key = #{payKey,jdbcType=VARCHAR},
......
......@@ -40,7 +40,7 @@ public final class SystemUtil {
public static final String RONCOO_PAY_NOTIFY = getProperty("roncoo_pay_notify");
public static final String WEIXIN_PAY_NOTIFY = getProperty("weixin_pay_notify");
public static final String ALI_PAY_NOTIFY = getProperty("ali_pay_notify");
public static final String POLYV_GETCATAURL = getProperty("polyv_getCataUrl");
public static final String POLYV_UPLOADVIDEO = getProperty("polyv_uploadVideo");
public static final String POLYV_CHANGECATAURL = getProperty("polyv_changeCataUrl");
......@@ -51,8 +51,11 @@ public final class SystemUtil {
public static final String POLYV_GETTOKEN = getProperty("polyv_getToken");
public static final String LECTURER_DEFAULT_PROPORTION = getProperty("lecturer_default_proportion");
public static final String CONTENT_LENGTH = getProperty("content_length");
public static final String TEST_COURSE = getProperty("test_course");
public static final String DOC_STORAGE_PATH = getProperty("doc_storage_path");
public static final String PIC_STORAGE_PATH = getProperty("pic_storage_path");
}
/**
* Copyright 2015-现在 广州市领课网络科技有限公司
*/
package com.roncoo.education.util.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* @author YZJ
*/
@Getter
@AllArgsConstructor
public enum FileStorageTypeEnum {
DOC(1, "附件"), PICTURE(2, "图片"), VIDEO(3, "视频");
private Integer code;
private String desc;
}
......@@ -13,10 +13,10 @@ import lombok.Getter;
@AllArgsConstructor
public enum FileTypeEnum {
ALIYUN(1, "阿里云"), QINIU(2, "七牛");
ALIYUN(1, "阿里云"), QINIU(2, "七牛"), LOCAL(3, "本地");
private Integer code;
private Integer code;
private String desc;
private String desc;
}
......@@ -15,8 +15,8 @@ public enum VideoTypeEnum {
POLYV(1, "保利威视"), QINIU(2, "七牛");
private Integer code;
private Integer code;
private String desc;
private String desc;
}
......@@ -24,4 +24,9 @@ lecturer_default_proportion=0.7000
content_length=5000
#测试课程id
test_course=1085453180200448002
\ No newline at end of file
test_course=1085453180200448002
#本地上传文档路径
doc_storage_path=C:/RonCoo/doc/
#本地上传路径路径
pic_storage_path=C:/RonCoo/pic/
\ No newline at end of file
# info
info.eureka.host01=192.168.1.181
info.eureka.host02=192.168.1.181
info.eureka.host01=localhost
info.eureka.port01=5761
info.eureka.port02=5762
# profile
spring.profiles.active=dev
# eureka
eureka.client.serviceUrl.defaultZone=http://${info.eureka.host01}:${info.eureka.port01}/eureka/,http://${info.eureka.host02}:${info.eureka.port02}/eureka/
eureka.client.serviceUrl.defaultZone=http://${info.eureka.host01}:${info.eureka.port01}/eureka/
# server
server.port=5880
......
......@@ -16,25 +16,22 @@
<#else>
<input type="radio" name="videoType" value="1" data-toggle="icheck" checked="checked" data-label="保利威视" size="20">
<input type="radio" name="videoType" value="2" data-toggle="icheck" data-label="七牛" size="20">
<input type="radio" name="videoType" value="3" data-toggle="icheck" data-label="本地" size="20" checked="checked">
</#if>
</div>
<br />
<div class="form-group">
<label class="control-label x150">useid:</label>
<input type="text" name="polyvUseid" value="<#if bean??>${bean.polyvUseid!}</#if>" placeholder="useid" size="20">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<label class="control-label x120">secretkey:</label>
<input type="text" name="polyvSecretkey" value="<#if bean??>${bean.polyvSecretkey!}</#if>" placeholder="secretkey" size="20">
<input type="text" name="polyvUseid" value="<#if bean??>${bean.polyvUseid!}</#if>" placeholder="useid" size="40">
<label class="control-label x150">secretkey:</label>
<input type="text" name="polyvSecretkey" value="<#if bean??>${bean.polyvSecretkey!}</#if>" placeholder="secretkey" size="40">
</div>
<br />
<div class="form-group">
<label class="control-label x150">readtoken:</label>
<input type="text" name="polyvReadtoken" value="<#if bean??>${bean.polyvReadtoken!}</#if>" placeholder="readtoken" size="57.5">
</div>
<br />
<div class="form-group">
<label class="control-label x150">writetoken:</label>
<input type="text" name="polyvWritetoken" value="<#if bean??>${bean.polyvWritetoken!}</#if>" placeholder="writetoken" size="57.5">
<input type="text" name="polyvReadtoken" value="<#if bean??>${bean.polyvReadtoken!}</#if>" placeholder="readtoken" size="40">
<label class="control-label x150">writetoken:</label>
<input type="text" name="polyvWritetoken" value="<#if bean??>${bean.polyvWritetoken!}</#if>" placeholder="writetoken" size="40">
</div>
</fieldset>
......@@ -49,37 +46,31 @@
<#else>
<input type="radio" name="fileType" value="1" data-toggle="icheck" checked="checked" data-label="阿里云" size="20">
<input type="radio" name="fileType" value="2" data-toggle="icheck" data-label="七牛" size="20">
<input type="radio" name="fileType" value="3" data-toggle="icheck" data-label="本地" size="20" checked="checked">
</#if>
</div>
<br />
<div class="form-group">
<label class="control-label x150">accessKeyId:</label>
<input type="text" name="aliyunAccessKeyId" value="<#if bean??>${bean.aliyunAccessKeyId!}</#if>" placeholder="accessKeyId" size="20">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<label class="control-label x120">ossBucket:</label>
<input type="text" name="aliyunOssBucket" value="<#if bean??>${bean.aliyunOssBucket!}</#if>" placeholder="accessKeySecret" size="20">
</div>
<div class="form-group">
<label class="control-label x150">smsCode:</label>
<input type="text" name="smsCode" value="<#if bean??>${bean.smsCode!}</#if>" placeholder="smsCode" size="20">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<label class="control-label x120">短信签名:</label>
<input type="text" name="signName" value="<#if bean??>${bean.signName!}</#if>" placeholder="signName" size="20">
<input type="text" name="aliyunAccessKeyId" value="<#if bean??>${bean.aliyunAccessKeyId!}</#if>" placeholder="accessKeyId" size="40">
<label class="control-label x150">accessKeySecret:</label>
<input type="text" name="aliyunAccessKeySecret" value="<#if bean??>${bean.aliyunAccessKeySecret!}</#if>" placeholder="accessKeySecret" size="40">
</div>
<br />
<div class="form-group">
<label class="control-label x150">oasVault:</label>
<input type="text" name="aliyunOasVault" value="<#if bean??>${bean.aliyunOasVault!}</#if>" placeholder="accessKeyId" size="20">
</div>
<br />
<div class="form-group">
<label class="control-label x150">accessKeySecret:</label>
<input type="text" name="aliyunAccessKeySecret" value="<#if bean??>${bean.aliyunAccessKeySecret!}</#if>" placeholder="accessKeySecret" size="57.5">
<label class="control-label x150">ossUrl:</label>
<input type="text" name="aliyunOssUrl" value="<#if bean??>${bean.aliyunOssUrl!}</#if>" placeholder="accessKeyId" size="40">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<label class="control-label x120">ossBucket:</label>
<input type="text" name="aliyunOssBucket" value="<#if bean??>${bean.aliyunOssBucket!}</#if>" placeholder="accessKeySecret" size="40">
</div>
<br />
<div class="form-group">
<label class="control-label x150">ossUrl:</label>
<input type="text" name="aliyunOssUrl" value="<#if bean??>${bean.aliyunOssUrl!}</#if>" placeholder="accessKeyId" size="57.5">
<label class="control-label x150">smsCode:</label>
<input type="text" name="smsCode" value="<#if bean??>${bean.smsCode!}</#if>" placeholder="smsCode" size="40">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<label class="control-label x120">短信签名:</label>
<input type="text" name="signName" value="<#if bean??>${bean.signName!}</#if>" placeholder="signName" size="40">
</div>
<br />
</fieldset>
......@@ -100,22 +91,16 @@
<br />
<div class="form-group">
<label class="control-label x150">payKey:</label>
<input type="text" name="payKey" value="<#if bean??>${bean.payKey!}</#if>" placeholder="roncooKey" size="57.5">
</div>
<br />
<div class="form-group">
<input type="text" name="payKey" value="<#if bean??>${bean.payKey!}</#if>" placeholder="roncooKey" size="40">
<label class="control-label x150">paySecret:</label>
<input type="text" name="paySecret" value="<#if bean??>${bean.paySecret!}</#if>" placeholder="roncooSecret" size="57.5">
<input type="text" name="paySecret" value="<#if bean??>${bean.paySecret!}</#if>" placeholder="roncooSecret" size="40">
</div>
<br />
<div class="form-group">
<label class="control-label x150">payUrl:</label>
<input type="text" name="payUrl" value="<#if bean??>${bean.payUrl!}</#if>" placeholder="roncooKey" size="57.5">
</div>
<br />
<div class="form-group">
<label class="control-label x150">notifyUrl:</label>
<input type="text" name="notifyUrl" value="<#if bean??>${bean.notifyUrl!}</#if>" placeholder="roncooSecret" size="57.5">
<label class="control-label x150">支付请求:</label>
<input type="text" name="payUrl" value="<#if bean??>${bean.payUrl!}</#if>" placeholder="payUrl" size="40">
<label class="control-label x150">回调地址:</label>
<input type="text" name="notifyUrl" value="<#if bean??>${bean.notifyUrl!}</#if>" placeholder="notifyUrl" size="40">
</div>
</fieldset>
<#else>
......@@ -135,20 +120,16 @@
<br />
<div class="form-group">
<label class="control-label x150">useid:</label>
<input type="text" name="polyvUseid" value="********" placeholder="useid" size="20">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<label class="control-label x120">secretkey:</label>
<input type="text" name="polyvSecretkey" value="********" placeholder="secretkey" size="20">
<input type="text" name="polyvUseid" value="********" placeholder="useid" size="40">
<label class="control-label x150">secretkey:</label>
<input type="text" name="polyvSecretkey" value="********" placeholder="secretkey" size="40">
</div>
<br />
<div class="form-group">
<label class="control-label x150">readtoken:</label>
<input type="text" name="polyvReadtoken" value="********" placeholder="readtoken" size="57.5">
</div>
<br />
<div class="form-group">
<label class="control-label x150">writetoken:</label>
<input type="text" name="polyvWritetoken" value="********" placeholder="writetoken" size="57.5">
<input type="text" name="polyvReadtoken" value="********" placeholder="readtoken" size="40">
<label class="control-label x150">writetoken:</label>
<input type="text" name="polyvWritetoken" value="********" placeholder="writetoken" size="40">
</div>
</fieldset>
......@@ -168,27 +149,24 @@
<br />
<div class="form-group">
<label class="control-label x150">accessKeyId:</label>
<input type="text" name="aliyunAccessKeyId" value="********" placeholder="accessKeyId" size="20">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<label class="control-label x120">ossBucket:</label>
<input type="text" name="aliyunOssBucket" value="********" placeholder="accessKeySecret" size="20">
</div>
<br />
<div class="form-group">
<label class="control-label x150">oasVault:</label>
<input type="text" name="aliyunOasVault" value="********" placeholder="accessKeyId" size="20">
<input type="text" name="aliyunAccessKeyId" value="********" placeholder="accessKeyId" size="40">
<label class="control-label x150">accessKeySecret:</label>
<input type="text" name="aliyunAccessKeySecret" value="********" placeholder="accessKeySecret" size="40">
</div>
<br />
<div class="form-group">
<label class="control-label x150">accessKeySecret:</label>
<input type="text" name="aliyunAccessKeySecret" value="********" placeholder="accessKeySecret" size="57.5">
<label class="control-label x150">ossUrl:</label>
<input type="text" name="aliyunOssUrl" value="********" placeholder="ossUrl" size="40">
<label class="control-label x150">ossBucket:</label>
<input type="text" name="aliyunOssBucket" value="********" placeholder="ossBucket" size="40">
</div>
<br />
<div class="form-group">
<label class="control-label x150">ossUrl:</label>
<input type="text" name="aliyunOssUrl" value="********" placeholder="accessKeyId" size="57.5">
<label class="control-label x150">smsCode:</label>
<input type="text" name="smsCode" value="********" placeholder="smsCode" size="40">
<label class="control-label x150">短信签名:</label>
<input type="text" name="signName" value="********" placeholder="signName" size="40">
</div>
<br />
</fieldset>
<fieldset>
......@@ -207,22 +185,16 @@
<br />
<div class="form-group">
<label class="control-label x150">payKey:</label>
<input type="text" name="payKey" value="********" placeholder="roncooKey" size="57.5">
</div>
<br />
<div class="form-group">
<input type="text" name="payKey" value="********" placeholder="roncooKey" size="40">
<label class="control-label x150">paySecret:</label>
<input type="text" name="paySecret" value="********" placeholder="roncooSecret" size="57.5">
</div>
<br />
<div class="form-group">
<label class="control-label x150">payUrl:</label>
<input type="text" name="payUrl" value="********" placeholder="roncooKey" size="57.5">
<input type="text" name="paySecret" value="********" placeholder="roncooSecret" size="40">
</div>
<br />
<div class="form-group">
<label class="control-label x150">notifyUrl:</label>
<input type="text" name="notifyUrl" value="********" placeholder="roncooSecret" size="57.5">
<label class="control-label x150">支付请求:</label>
<input type="text" name="payUrl" value="********" placeholder="payUrl" size="40">
<label class="control-label x150">回调地址:</label>
<input type="text" name="notifyUrl" value="********" placeholder="notifyUrl" size="40">
</div>
</fieldset>
</#if>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册