Commit 10b355f2 authored by yanzg's avatar yanzg

下载视频

parent ec0f543c
...@@ -52,7 +52,7 @@ public class YzgFileVo extends BaseVo implements InitDao { ...@@ -52,7 +52,7 @@ public class YzgFileVo extends BaseVo implements InitDao {
/** /**
* 文件下载状态:0-等待生成,1-正在生成,2-生成完成,3-生成失败,具体原因查看错误消息 * 文件下载状态:0-等待生成,1-正在生成,2-生成完成,3-生成失败,具体原因查看错误消息
*/ */
@ApiModelProperty(notes = "文件下载名,用于显示", position = 60) @ApiModelProperty(notes = "文件下载状态:0-等待生成,1-正在生成,2-生成完成,3-生成失败,具体原因查看错误消息", position = 60)
private Integer fileStatus; private Integer fileStatus;
/** /**
* 文件导出行数,用于显示 * 文件导出行数,用于显示
......
package com.yanzuoguang.cloud.vo.req;
import com.yanzuoguang.util.vo.PageSizeReqVo;
import io.swagger.annotations.ApiModelProperty;
/**
* 加载文件
*
* @author 颜佐光
*/
public class YzgFileQueryReqVo extends PageSizeReqVo {
/**
* 文件Id,用于后续文件下载
*/
@ApiModelProperty(notes = "文件Id,用于后续文件下载", position = 10)
private String fileId;
/**
* 公司Id,用于判断每个公司同一个人不能生成多次文件,同一个公司Id需要配置每日最大运行次数,默认每日为50
*/
@ApiModelProperty(notes = "公司Id,用于后续文件下载,同一个公司Id需要配置每日最大运行次数,默认为50", position = 20)
private String companyId;
/**
* 文件名,callbackMQ,callbackParameter,注意:callbackMQ,callbackParameter,xxxxId不能显示在界面
*/
@ApiModelProperty(notes = "文件名,callbackMQ,callbackParameter,注意:callbackMQ,callbackParameter,xxxxId不能显示在界面", position = 20)
private String search;
/**
* 导出时间开始
*/
@ApiModelProperty(notes = "导出时间开始", position = 10)
private String createDateFrom;
/**
* 导出时间结束
*/
@ApiModelProperty(notes = "导出时间结束", position = 10)
private String createDateTo;
/**
* 下载时间开始
*/
@ApiModelProperty(notes = "下载时间开始", position = 10)
private String downloadDateFrom;
/**
* 下载时间结束
*/
@ApiModelProperty(notes = "下载时间结束", position = 10)
private String downloadDateTo;
/**
* 文件下载状态:0-等待生成,1-正在生成,2-生成完成,3-生成失败,具体原因查看错误消息
*/
@ApiModelProperty(notes = "文件下载状态:0-等待生成,1-正在生成,2-生成完成,3-生成失败,具体原因查看错误消息", position = 60)
private Integer fileStatus;
/**
* 文件导出行数,用于显示
*/
@ApiModelProperty(notes = "文件导出行数,用于显示", position = 70)
private Integer fileRow;
/**
* 下载人
*/
@ApiModelProperty(notes = "下载人", position = 100)
private String downloadUserId;
/**
* 创建人
*/
@ApiModelProperty(notes = "创建人", position = 120)
private String createUserId;
public String getFileId() {
return fileId;
}
public void setFileId(String fileId) {
this.fileId = fileId;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
public String getSearch() {
return search;
}
public void setSearch(String search) {
this.search = search;
}
public String getCreateDateFrom() {
return createDateFrom;
}
public void setCreateDateFrom(String createDateFrom) {
this.createDateFrom = createDateFrom;
}
public String getCreateDateTo() {
return createDateTo;
}
public void setCreateDateTo(String createDateTo) {
this.createDateTo = createDateTo;
}
public String getDownloadDateFrom() {
return downloadDateFrom;
}
public void setDownloadDateFrom(String downloadDateFrom) {
this.downloadDateFrom = downloadDateFrom;
}
public String getDownloadDateTo() {
return downloadDateTo;
}
public void setDownloadDateTo(String downloadDateTo) {
this.downloadDateTo = downloadDateTo;
}
public Integer getFileStatus() {
return fileStatus;
}
public void setFileStatus(Integer fileStatus) {
this.fileStatus = fileStatus;
}
public Integer getFileRow() {
return fileRow;
}
public void setFileRow(Integer fileRow) {
this.fileRow = fileRow;
}
public String getDownloadUserId() {
return downloadUserId;
}
public void setDownloadUserId(String downloadUserId) {
this.downloadUserId = downloadUserId;
}
public String getCreateUserId() {
return createUserId;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
}
package com.yanzuoguang.cloud.file.dao; package com.yanzuoguang.cloud.file;
import com.yanzuoguang.cloud.CloudConfig; import com.yanzuoguang.cloud.CloudConfig;
import com.yanzuoguang.cloud.file.YzgFileProcedure; import com.yanzuoguang.cloud.file.dao.YzgFileDao;
import com.yanzuoguang.cloud.helper.HttpFileHelper; import com.yanzuoguang.cloud.helper.HttpFileHelper;
import com.yanzuoguang.cloud.vo.YzgFileVo; import com.yanzuoguang.cloud.vo.YzgFileVo;
import com.yanzuoguang.cloud.vo.req.YzgFileCallbackReqVo; import com.yanzuoguang.cloud.vo.req.*;
import com.yanzuoguang.cloud.vo.req.YzgFileCreateReqVo;
import com.yanzuoguang.cloud.vo.req.YzgFileDownloadReqVo;
import com.yanzuoguang.cloud.vo.req.YzgFileStatusReqVo;
import com.yanzuoguang.util.exception.CodeException; import com.yanzuoguang.util.exception.CodeException;
import com.yanzuoguang.util.exception.ExceptionHelper; import com.yanzuoguang.util.exception.ExceptionHelper;
import com.yanzuoguang.util.helper.DateHelper; import com.yanzuoguang.util.helper.DateHelper;
import com.yanzuoguang.util.helper.JsonHelper; import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.util.helper.StringHelper; import com.yanzuoguang.util.helper.StringHelper;
import com.yanzuoguang.util.vo.PageSizeData; import com.yanzuoguang.util.vo.PageSizeData;
import com.yanzuoguang.util.vo.PageSizeReqVo;
import com.yanzuoguang.util.vo.ResponseResult; import com.yanzuoguang.util.vo.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -99,12 +95,10 @@ public class YzgExcelService { ...@@ -99,12 +95,10 @@ public class YzgExcelService {
* 获取文件数据 * 获取文件数据
* *
* @param req * @param req
* @param cls
* @param <T>
* @return * @return
*/ */
public <T extends Object> PageSizeData<T> loadPage(PageSizeReqVo req, Class<T> cls) { public PageSizeData<YzgFileVo> loadPage(YzgFileQueryReqVo req) {
return fileDao.loadPage(req, cls); return fileDao.loadPage(req, YzgFileVo.class);
} }
/** /**
......
package com.yanzuoguang.cloud.file; package com.yanzuoguang.cloud.file;
import com.rabbitmq.client.Channel; import com.rabbitmq.client.Channel;
import com.yanzuoguang.cloud.file.dao.YzgExcelService;
import com.yanzuoguang.cloud.vo.req.YzgFileCreateReqVo; import com.yanzuoguang.cloud.vo.req.YzgFileCreateReqVo;
import com.yanzuoguang.cloud.vo.req.YzgFileStatusReqVo; import com.yanzuoguang.cloud.vo.req.YzgFileStatusReqVo;
import com.yanzuoguang.mq.service.MqService; import com.yanzuoguang.mq.service.MqService;
......
...@@ -49,6 +49,14 @@ public class YzgFileDaoImpl extends BaseDaoImpl implements YzgFileDao, Initializ ...@@ -49,6 +49,14 @@ public class YzgFileDaoImpl extends BaseDaoImpl implements YzgFileDao, Initializ
getSql(DaoConst.LOAD) getSql(DaoConst.LOAD)
.addCode("{ORDER}", "ORDER BY createDate DESC") .addCode("{ORDER}", "ORDER BY createDate DESC")
.add("createDateFrom", "AND a.createDate>=?")
.add("createDateTo", "AND a.createDate<=?")
.add("downloadDateFrom", "AND a.downloadDate>=?")
.add("downloadDateTo", "AND a.downloadDate<=?")
.add("search", "AND (b.callbackMQ LIKE CONCAT(?,'%') " +
"OR b.fileName LIKE CONCAT('%',?,'%') " +
"OR b.errorMessage LIKE CONCAT('%',?,'%') " +
"OR b.callbackParameter LIKE CONCAT('%',?,'%') ")
; ;
table.add(GET_COUNT_SQL, "SELECT COUNT(1) FROM Yzg_File WHERE 1=1") table.add(GET_COUNT_SQL, "SELECT COUNT(1) FROM Yzg_File WHERE 1=1")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment