Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YZG
yzg-util
Commits
10b355f2
Commit
10b355f2
authored
Dec 15, 2021
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下载视频
parent
ec0f543c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
169 additions
and
13 deletions
+169
-13
YzgFileVo.java
...oud/src/main/java/com/yanzuoguang/cloud/vo/YzgFileVo.java
+1
-1
YzgFileQueryReqVo.java
.../java/com/yanzuoguang/cloud/vo/req/YzgFileQueryReqVo.java
+155
-0
YzgExcelService.java
...main/java/com/yanzuoguang/cloud/file/YzgExcelService.java
+5
-11
YzgFileConsumer.java
...main/java/com/yanzuoguang/cloud/file/YzgFileConsumer.java
+0
-1
YzgFileDaoImpl.java
...a/com/yanzuoguang/cloud/file/dao/impl/YzgFileDaoImpl.java
+8
-0
No files found.
yzg-util-cloud/src/main/java/com/yanzuoguang/cloud/vo/YzgFileVo.java
View file @
10b355f2
...
@@ -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
;
/**
/**
* 文件导出行数,用于显示
* 文件导出行数,用于显示
...
...
yzg-util-cloud/src/main/java/com/yanzuoguang/cloud/vo/req/YzgFileQueryReqVo.java
0 → 100644
View file @
10b355f2
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
;
}
}
yzg-util-file/src/main/java/com/yanzuoguang/cloud/file/
dao/
YzgExcelService.java
→
yzg-util-file/src/main/java/com/yanzuoguang/cloud/file/YzgExcelService.java
View file @
10b355f2
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
,
cl
s
);
return
fileDao
.
loadPage
(
req
,
YzgFileVo
.
clas
s
);
}
}
/**
/**
...
...
yzg-util-file/src/main/java/com/yanzuoguang/cloud/file/YzgFileConsumer.java
View file @
10b355f2
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
;
...
...
yzg-util-file/src/main/java/com/yanzuoguang/cloud/file/dao/impl/YzgFileDaoImpl.java
View file @
10b355f2
...
@@ -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"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment