Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
zgzx
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
zgzx
Commits
b087c4b2
提交
b087c4b2
authored
12月 01, 2020
作者:
renjianyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
1a433d22
隐藏空白字符变更
内嵌
并排
正在显示
39 个修改的文件
包含
423 行增加
和
23 行删除
+423
-23
BaseRequestPath.java
...src/main/java/com/zrqx/core/constant/BaseRequestPath.java
+1
-0
ResourceRequestPath.java
.../com/zrqx/core/constant/resource/ResourceRequestPath.java
+3
-0
AllResourceTypeEnum.java
...rc/main/java/com/zrqx/core/enums/AllResourceTypeEnum.java
+1
-1
QrcodeForm.java
...ore/src/main/java/com/zrqx/core/form/file/QrcodeForm.java
+15
-0
QueryResourceForPoPForm.java
...m/zrqx/core/form/resource/bg/QueryResourceForPoPForm.java
+3
-2
QueryResourceRelationForm.java
...zrqx/core/form/resource/bg/QueryResourceRelationForm.java
+6
-1
SaveResourceRelationForm.java
.../zrqx/core/form/resource/bg/SaveResourceRelationForm.java
+5
-0
QueryProjectLibraryForm.java
...m/resource/bg/projectlibrary/QueryProjectLibraryForm.java
+1
-1
SaveUpdateProjectLibraryForm.java
...ource/bg/projectlibrary/SaveUpdateProjectLibraryForm.java
+1
-1
RecommendResourceForm.java
...ore/form/resource/bg/recommend/RecommendResourceForm.java
+5
-1
SaveRecommendForm.java
...qx/core/form/resource/bg/recommend/SaveRecommendForm.java
+4
-0
SaveRecommendResourceForm.java
...form/resource/bg/recommend/SaveRecommendResourceForm.java
+6
-0
UpdateRecommendResourceForm.java
...rm/resource/bg/recommend/UpdateRecommendResourceForm.java
+3
-0
QueryLibraryForm.java
...zrqx/core/form/resource/bg/resource/QueryLibraryForm.java
+2
-0
FgQueryRelatedProjectForm.java
...resource/fg/projectlibrary/FgQueryRelatedProjectForm.java
+14
-0
RecommendResource.java
...java/com/zrqx/core/model/recommend/RecommendResource.java
+6
-1
ChapterLibrary.java
...qx/core/model/resource/articlelibrary/ChapterLibrary.java
+9
-0
Book.java
...rc/main/java/com/zrqx/core/model/resource/ebook/Book.java
+2
-0
ProjectLibrary.java
...qx/core/model/resource/projectLibrary/ProjectLibrary.java
+3
-5
ResourceRelation.java
...ore/model/resource/resourcerelation/ResourceRelation.java
+1
-0
Adspace.java
...src/main/java/com/zrqx/core/model/sysuser/ad/Adspace.java
+1
-1
Correction.java
...va/com/zrqx/core/model/sysuser/correction/Correction.java
+2
-0
BeanUtils.java
...core/src/main/java/com/zrqx/core/util/bean/BeanUtils.java
+42
-0
ZipUtil.java
...qx.core/src/main/java/com/zrqx/core/util/zip/ZipUtil.java
+12
-3
ResourceRelationListVo.java
...ava/com/zrqx/core/vo/resource/ResourceRelationListVo.java
+2
-0
ResourceRelationVo.java
...in/java/com/zrqx/core/vo/resource/ResourceRelationVo.java
+4
-1
ArticleLibraryListVO.java
...core/vo/resource/articlelibrary/ArticleLibraryListVO.java
+3
-0
EbookListVO.java
...ain/java/com/zrqx/core/vo/resource/ebook/EbookListVO.java
+2
-0
FgArticleLibraryOneVO.java
.../vo/resource/fg/articlelibrary/FgArticleLibraryOneVO.java
+83
-2
FgEbookListVO.java
...ava/com/zrqx/core/vo/resource/fg/ebook/FgEbookListVO.java
+2
-0
FgEbookVO.java
...in/java/com/zrqx/core/vo/resource/fg/ebook/FgEbookVO.java
+5
-0
FgRecommendResourcePageVo.java
...e/vo/resource/fg/recommend/FgRecommendResourcePageVo.java
+5
-1
ProjectLibraryListVO.java
...core/vo/resource/projectlibrary/ProjectLibraryListVO.java
+4
-2
ProjectLibraryVO.java
...rqx/core/vo/resource/projectlibrary/ProjectLibraryVO.java
+6
-0
FgRecommendListVo.java
...om/zrqx/core/vo/resource/recommend/FgRecommendListVo.java
+30
-0
FgRecommendPageVo.java
...om/zrqx/core/vo/resource/recommend/FgRecommendPageVo.java
+28
-0
FgRecommendVo.java
...va/com/zrqx/core/vo/resource/recommend/FgRecommendVo.java
+28
-0
FgTypeToResourceListVo.java
...qx/core/vo/resource/recommend/FgTypeToResourceListVo.java
+23
-0
RecommendResourcePageVo.java
...x/core/vo/resource/recommend/RecommendResourcePageVo.java
+50
-0
没有找到文件。
com.zrqx.core/src/main/java/com/zrqx/core/constant/BaseRequestPath.java
浏览文件 @
b087c4b2
...
...
@@ -66,6 +66,7 @@ public class BaseRequestPath {
public
static
final
String
STATUS
=
"/status"
;
/** 所有 */
public
static
final
String
ALL
=
"/all"
;
/** 其他 */
public
static
final
String
OTHER
=
"/other"
;
/** 创建 */
...
...
com.zrqx.core/src/main/java/com/zrqx/core/constant/resource/ResourceRequestPath.java
浏览文件 @
b087c4b2
...
...
@@ -138,6 +138,9 @@ public class ResourceRequestPath extends BaseRequestPath {
/** 索引*/
public
static
final
String
INDEX
=
"/index"
;
/** 新*/
public
static
final
String
NEW
=
"/new"
;
/***
*
*/
...
...
com.zrqx.core/src/main/java/com/zrqx/core/enums/AllResourceTypeEnum.java
浏览文件 @
b087c4b2
...
...
@@ -23,7 +23,7 @@ public enum AllResourceTypeEnum {
*//** 视频 *//*
VIDEO(5, "视频"),
*//** 图片*//**/
/*IMAGE(4, "图片"),*/
IMAGE
(
4
,
"图片"
),
/** 文章 */
ARTICLE
(
2
,
"文章"
),
/** 图书 */
...
...
com.zrqx.core/src/main/java/com/zrqx/core/form/file/QrcodeForm.java
0 → 100644
浏览文件 @
b087c4b2
package
com
.
zrqx
.
core
.
form
.
file
;
import
java.util.List
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
public
class
QrcodeForm
{
@ApiModelProperty
(
value
=
"二维码code"
,
required
=
true
)
List
<
String
>
fileNames
;
@ApiModelProperty
(
value
=
"1文章二维码打包"
,
required
=
true
)
private
Integer
type
;
}
com.zrqx.core/src/main/java/com/zrqx/core/form/resource/bg/QueryResourceForPoPForm.java
浏览文件 @
b087c4b2
...
...
@@ -10,13 +10,14 @@ import lombok.Data;
public
class
QueryResourceForPoPForm
{
@ApiModelProperty
(
value
=
"资源名称"
)
private
String
name
;
@ApiModelProperty
(
"1杂志 、2文章、3PDF 5视频 6 音频 8专题"
)
@ApiModelProperty
(
"1杂志 、2文章、3PDF 5视频 6 音频 8专题
0全部
"
)
private
Integer
resourceType
;
@ApiModelProperty
(
"自定义分类code"
)
private
String
diyTypeCode
;
@ApiModelProperty
(
value
=
"relation id"
)
private
String
id
;
@ApiModelProperty
(
"录入方式:1:手动录入 2:EPUB导入"
)
private
String
goodsType
;
@ApiModelProperty
(
value
=
"当前资源id(关联资源接口使用)"
)
private
String
resourceId
;
@ApiModelProperty
(
value
=
"资源id集合"
)
...
...
com.zrqx.core/src/main/java/com/zrqx/core/form/resource/bg/QueryResourceRelationForm.java
浏览文件 @
b087c4b2
...
...
@@ -8,6 +8,11 @@ import lombok.Data;
public
class
QueryResourceRelationForm
{
@ApiModelProperty
(
value
=
"当前资源id"
,
required
=
true
)
private
String
id
;
@ApiModelProperty
(
"
录入方式 1手动、2EPUB
"
)
@ApiModelProperty
(
""
)
private
Integer
resourceType
;
@ApiModelProperty
(
"录入方式 1手动、2EPUB"
)
private
String
goodsType
;
@ApiModelProperty
(
"文章必填字段判断"
)
private
String
actype
;
}
com.zrqx.core/src/main/java/com/zrqx/core/form/resource/bg/SaveResourceRelationForm.java
浏览文件 @
b087c4b2
...
...
@@ -11,5 +11,10 @@ public class SaveResourceRelationForm {
private
String
[]
resourceIds
;
@ApiModelProperty
(
"资源类型 1杂志、2文章、3PDF"
)
private
Integer
resourceType
;
@ApiModelProperty
(
"录入方式:1:手动 2EPUB"
)
private
Integer
goodsType
;
@ApiModelProperty
(
"作者"
)
private
String
author
;
}
com.zrqx.core/src/main/java/com/zrqx/core/form/resource/bg/projectlibrary/QueryProjectLibraryForm.java
浏览文件 @
b087c4b2
...
...
@@ -15,7 +15,7 @@ public class QueryProjectLibraryForm {
private
String
name
;
@ApiModelProperty
(
"状态 0禁用,1启用"
)
private
Integer
status
;
@ApiModelProperty
(
"状态 0 杂志 1微首页"
)
@ApiModelProperty
(
"状态 0 杂志 1微首页
2 全部
"
)
private
Integer
sceneStatus
;
@ApiModelProperty
(
"状态 0 不置顶 1 置顶"
)
private
Integer
topStatus
;
...
...
com.zrqx.core/src/main/java/com/zrqx/core/form/resource/bg/projectlibrary/SaveUpdateProjectLibraryForm.java
浏览文件 @
b087c4b2
...
...
@@ -22,7 +22,7 @@ public class SaveUpdateProjectLibraryForm {
private
String
synopsis
;
@ApiModelProperty
(
"状态 0禁用,1启用"
)
private
Integer
status
;
@ApiModelProperty
(
"状态 0 杂志 1微首页"
)
@ApiModelProperty
(
"状态 0 杂志 1微首页
2 全部
"
)
private
Integer
sceneStatus
;
@ApiModelProperty
(
"状态 0 不置顶 1 置顶"
)
private
Integer
topStatus
;
...
...
com.zrqx.core/src/main/java/com/zrqx/core/form/resource/bg/recommend/RecommendResourceForm.java
浏览文件 @
b087c4b2
...
...
@@ -17,8 +17,12 @@ public class RecommendResourceForm {
@ApiModelProperty
(
"民族 1蒙古族 2侗族 3藏族 4朝鲜族 5土家族 6回族 7满族 8汉族"
)
private
Integer
nationsType
;
/** 推荐资源类型 */
@ApiModelProperty
(
"资源类型1图书、2医家、3文章、4图片、5视频、6音频、7附件"
)
@ApiModelProperty
(
"资源类型1图书、2医家、3文章、4图片、5视频、6音频、7附件
8专题
"
)
private
Integer
resType
;
@ApiModelProperty
(
"资源名称"
)
private
String
resourceName
;
@ApiModelProperty
(
"推荐位code"
)
private
String
recomCode
;
}
com.zrqx.core/src/main/java/com/zrqx/core/form/resource/bg/recommend/SaveRecommendForm.java
浏览文件 @
b087c4b2
package
com
.
zrqx
.
core
.
form
.
resource
.
bg
.
recommend
;
import
lombok.Data
;
import
java.util.Date
;
import
io.swagger.annotations.ApiModelProperty
;
/**
* 推荐位
...
...
@@ -27,4 +30,5 @@ public class SaveRecommendForm {
private
Integer
status
;
@ApiModelProperty
(
value
=
"推荐位类型:1首页推荐位 "
)
private
Integer
recommendType
;
}
com.zrqx.core/src/main/java/com/zrqx/core/form/resource/bg/recommend/SaveRecommendResourceForm.java
浏览文件 @
b087c4b2
package
com
.
zrqx
.
core
.
form
.
resource
.
bg
.
recommend
;
import
java.util.Date
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
...
...
@@ -30,5 +32,9 @@ public class SaveRecommendResourceForm {
/** 状态0:下架 1:上架 */
@ApiModelProperty
(
value
=
"状态(注意文章,图书,作者状态编号不一样)"
)
private
Integer
status
;
@ApiModelProperty
(
value
=
"资源的创建时间"
)
private
String
resCreateTime
;
@ApiModelProperty
(
"来源"
)
private
String
source
;
}
com.zrqx.core/src/main/java/com/zrqx/core/form/resource/bg/recommend/UpdateRecommendResourceForm.java
浏览文件 @
b087c4b2
...
...
@@ -18,4 +18,7 @@ public class UpdateRecommendResourceForm {
private
String
resImg
;
@ApiModelProperty
(
value
=
"资源名称"
)
private
String
resName
;
@ApiModelProperty
(
"来源"
)
private
String
source
;
}
com.zrqx.core/src/main/java/com/zrqx/core/form/resource/bg/resource/QueryLibraryForm.java
浏览文件 @
b087c4b2
...
...
@@ -9,6 +9,8 @@ import lombok.Data;
public
class
QueryLibraryForm
{
@ApiModelProperty
(
value
=
"标题"
)
private
String
title
;
@ApiModelProperty
(
value
=
"标题"
)
private
String
name
;
@ApiModelProperty
(
"自定义分类code"
)
private
String
diyTypeCode
;
@ApiModelProperty
(
"民族 1蒙古族 2侗族 3藏族 4朝鲜族 5土家族 6回族 7满族 8汉族"
)
...
...
com.zrqx.core/src/main/java/com/zrqx/core/form/resource/fg/projectlibrary/FgQueryRelatedProjectForm.java
0 → 100644
浏览文件 @
b087c4b2
package
com
.
zrqx
.
core
.
form
.
resource
.
fg
.
projectlibrary
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
@ApiModel
(
value
=
"FgQueryRelatedProjectForm"
,
description
=
"专题详情页-相关专题"
)
public
class
FgQueryRelatedProjectForm
{
@ApiModelProperty
(
value
=
"专题id"
,
required
=
true
)
private
String
id
;
@ApiModelProperty
(
value
=
"展示数量"
,
required
=
true
)
private
Integer
num
;
}
com.zrqx.core/src/main/java/com/zrqx/core/model/recommend/RecommendResource.java
浏览文件 @
b087c4b2
...
...
@@ -32,7 +32,7 @@ public class RecommendResource {
@ApiModelProperty
(
value
=
"资源id"
)
private
String
resId
;
/** 资源类型0-10 */
@ApiModelProperty
(
value
=
"
资源类型 0全部31理论 32药物 33方剂 34临床 35医案 36文化 37机构 38医论 48其他 1医著 2医家
"
)
@ApiModelProperty
(
value
=
"
1杂志 2文章 3PDF 4图片 5视频 6音频 7附件 8专题
"
)
private
Integer
resType
;
/** 状态0:下架 1:上架 */
@ApiModelProperty
(
value
=
"状态0:下架 1:上架"
)
...
...
@@ -58,4 +58,9 @@ public class RecommendResource {
/** 修改人id */
@ApiModelProperty
(
value
=
"修改人id"
)
private
String
updater
;
@ApiModelProperty
(
value
=
"资源的创建时间"
)
private
String
resCreateTime
;
@ApiModelProperty
(
"来源"
)
private
String
source
;
}
com.zrqx.core/src/main/java/com/zrqx/core/model/resource/articlelibrary/ChapterLibrary.java
浏览文件 @
b087c4b2
...
...
@@ -4,9 +4,13 @@ package com.zrqx.core.model.resource.articlelibrary;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
import
lombok.Data
;
...
...
@@ -32,6 +36,7 @@ public class ChapterLibrary implements java.io.Serializable {
@GeneratedValue
(
generator
=
"JDBC"
)
@ApiModelProperty
(
"目录id,新增时不需要填写"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"目录标题"
,
required
=
true
)
private
String
chapterName
;
@ApiModelProperty
(
value
=
"父章节id(第一级为0,之后为父级的markid)"
,
required
=
true
)
...
...
@@ -46,6 +51,9 @@ public class ChapterLibrary implements java.io.Serializable {
private
String
markid
;
@ApiModelProperty
(
value
=
"章节层级(1,2,3,4,5)"
,
required
=
true
)
private
Integer
level
;
@Transient
@ApiModelProperty
(
value
=
"子目录"
)
private
List
<
ChapterLibrary
>
list
=
new
ArrayList
<
ChapterLibrary
>();
}
\ No newline at end of file
com.zrqx.core/src/main/java/com/zrqx/core/model/resource/ebook/Book.java
浏览文件 @
b087c4b2
...
...
@@ -108,4 +108,6 @@ public class Book {
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"浏览数量"
)
private
Integer
browseNum
;
@ApiModelProperty
(
value
=
"资源二维码"
)
private
String
resourceQr
;
}
com.zrqx.core/src/main/java/com/zrqx/core/model/resource/projectLibrary/ProjectLibrary.java
浏览文件 @
b087c4b2
...
...
@@ -24,9 +24,9 @@ public class ProjectLibrary {
private
String
id
;
@ApiModelProperty
(
"专题名称"
)
private
String
name
;
@ApiModelProperty
(
"封面1"
)
@ApiModelProperty
(
"封面1
杂志
"
)
private
String
cover
;
@ApiModelProperty
(
"封面2"
)
@ApiModelProperty
(
"封面2
微首页
"
)
private
String
cover1
;
@ApiModelProperty
(
"背景图"
)
private
String
backcover
;
...
...
@@ -34,7 +34,7 @@ public class ProjectLibrary {
private
String
synopsis
;
@ApiModelProperty
(
"状态 0禁用,1启用"
)
private
Integer
status
;
@ApiModelProperty
(
"状态 0 杂志 1微首页"
)
@ApiModelProperty
(
"状态 0 杂志 1微首页
2 全部
"
)
private
Integer
sceneStatus
;
@ApiModelProperty
(
"状态0 不顶置 1 置顶"
)
private
Integer
topStatus
;
...
...
@@ -46,8 +46,6 @@ public class ProjectLibrary {
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
"修改时间"
)
private
Date
updateTime
;
@ApiModelProperty
(
"作者"
)
private
String
author
;
@ApiModelProperty
(
"浏览数量"
)
private
Integer
browseNum
;
@ApiModelProperty
(
"资源类型"
)
...
...
com.zrqx.core/src/main/java/com/zrqx/core/model/resource/resourcerelation/ResourceRelation.java
浏览文件 @
b087c4b2
...
...
@@ -30,4 +30,5 @@ public class ResourceRelation {
private
Integer
sort
;
@ApiModelProperty
(
"创建时间"
)
private
Date
uploadTime
;
}
com.zrqx.core/src/main/java/com/zrqx/core/model/sysuser/ad/Adspace.java
浏览文件 @
b087c4b2
...
...
@@ -43,7 +43,7 @@ public class Adspace {
@ApiModelProperty
(
value
=
"更新时间"
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"结束时间"
)
private
Date
endTime
;
private
String
endTime
;
@ApiModelProperty
(
value
=
"排序"
,
required
=
true
)
private
Integer
sort
;
@ApiModelProperty
(
value
=
"状态:0关闭,1开启"
,
required
=
true
)
...
...
com.zrqx.core/src/main/java/com/zrqx/core/model/sysuser/correction/Correction.java
浏览文件 @
b087c4b2
...
...
@@ -27,6 +27,8 @@ public class Correction {
private
String
title
;
@ApiModelProperty
(
value
=
"纠错人"
)
private
String
name
;
@ApiModelProperty
(
value
=
"所属期刊"
)
private
String
periodical
;
@ApiModelProperty
(
value
=
"资源类型:1电子书,3文章 "
)
private
Integer
type
;
@ApiModelProperty
(
value
=
"状态:0未审核,1已审核,2已纠错"
)
...
...
com.zrqx.core/src/main/java/com/zrqx/core/util/bean/BeanUtils.java
浏览文件 @
b087c4b2
...
...
@@ -3,7 +3,9 @@ package com.zrqx.core.util.bean;
import
java.lang.reflect.Field
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.function.BiConsumer
;
import
java.util.function.Consumer
;
import
java.util.function.Predicate
;
...
...
@@ -11,6 +13,8 @@ import java.util.stream.Collectors;
import
java.util.stream.Stream
;
import
org.springframework.beans.BeanInstantiationException
;
import
org.springframework.beans.BeanWrapper
;
import
org.springframework.beans.BeanWrapperImpl
;
import
com.zrqx.core.exception.BaseException
;
...
...
@@ -28,6 +32,44 @@ public class BeanUtils extends org.springframework.beans.BeanUtils{
public
static
<
R
,
VO
>
VO
copy
(
R
source
,
Class
<
VO
>
clazz
){
return
copy
(
source
,
clazz
,
(
r
,
vo
)
->
{});
}
/**
* 过滤filter中不为空的字段,复制source对象到vo
* @param source
* @param clazz
* @param filter
* @return
* @author ycw
* @date: 2019年9月4日 下午5:41:01
*/
public
static
<
R
,
VO
,
T
,
F
>
T
copyPropertiesIgnoreNotNull
(
R
source
,
T
vo
,
F
filter
){
try
{
BeanUtils
.
copyProperties
(
source
,
vo
,
getNotNullPropertyNames
(
filter
));
}
catch
(
BeanInstantiationException
e
)
{
e
.
printStackTrace
();
throw
new
BaseException
(
"复制对象时创建对象失败,source:"
+
source
,
e
);
}
return
vo
;
}
/**
* 获取source中不为空的字段
* @param source
* @return
* @author ycw
* @date: 2019年9月4日 下午5:59:06
*/
public
static
String
[]
getNotNullPropertyNames
(
Object
source
)
{
final
BeanWrapper
src
=
new
BeanWrapperImpl
(
source
);
java
.
beans
.
PropertyDescriptor
[]
pds
=
src
.
getPropertyDescriptors
();
Set
<
String
>
emptyNames
=
new
HashSet
<
String
>();
for
(
java
.
beans
.
PropertyDescriptor
pd
:
pds
)
{
Object
srcValue
=
src
.
getPropertyValue
(
pd
.
getName
());
if
(
srcValue
!=
null
)
emptyNames
.
add
(
pd
.
getName
());
}
String
[]
result
=
new
String
[
emptyNames
.
size
()];
return
emptyNames
.
toArray
(
result
);
}
/**
* 拷贝对象
* @param source 拷贝源
...
...
com.zrqx.core/src/main/java/com/zrqx/core/util/zip/ZipUtil.java
浏览文件 @
b087c4b2
...
...
@@ -5,11 +5,13 @@ import java.io.BufferedOutputStream;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileOutputStream
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipOutputStream
;
import
com.zrqx.core.model.file.FileInfo
;
import
com.zrqx.core.util.datatype.DateUtils
;
import
com.zrqx.core.util.datatype.UUIDUtil
;
public
class
ZipUtil
{
...
...
@@ -46,13 +48,18 @@ public class ZipUtil {
* @return String 文件路径
* @throws Exception
*/
public
static
String
zip
(
String
rootPath
,
List
<
FileInfo
>
list
)
throws
Exception
{
public
static
String
zip
(
String
rootPath
,
List
<
FileInfo
>
list
,
Integer
type
)
throws
Exception
{
// File zipFile = new File(zipFileName);
System
.
out
.
println
(
"压缩中..."
);
String
zipFileName
=
rootPath
+
UUIDUtil
.
getUUID
()
+
".zip"
;
String
zipurl
=
null
;
if
(
type
==
1
)
{
zipurl
=
"杂志二维码"
+
DateUtils
.
dateTimeToStr
(
new
Date
(),
DateUtils
.
DATE_FORMAT_YYYYMMDD
);
}
else
{
zipurl
=
DateUtils
.
dateTimeToStr
(
new
Date
(),
DateUtils
.
DATE_FORMAT_YYYYMMDD
);
}
String
zipFileName
=
rootPath
+
zipurl
+
".zip"
;
// 创建zip输出流
ZipOutputStream
out
=
new
ZipOutputStream
(
new
BufferedOutputStream
(
new
FileOutputStream
(
zipFileName
)));
for
(
FileInfo
file
:
list
)
{
String
filePath
=
rootPath
+
file
.
getPath
()
+
"/"
+
file
.
getFileName
()
+
file
.
getSuffixName
();
File
sourceFile
=
new
File
(
filePath
);
...
...
@@ -60,6 +67,8 @@ public class ZipUtil {
}
out
.
close
();
zipFileName
=
zipurl
+
".zip"
;
System
.
out
.
println
(
"压缩完成"
);
return
zipFileName
;
}
...
...
com.zrqx.core/src/main/java/com/zrqx/core/vo/resource/ResourceRelationListVo.java
浏览文件 @
b087c4b2
...
...
@@ -14,6 +14,8 @@ public class ResourceRelationListVo {
private
Integer
status
;
@ApiModelProperty
(
"资源类型"
)
private
Integer
resourceType
;
@ApiModelProperty
(
"录入方式:1:手动录入 2:EPUB导入"
)
private
String
goodsType
;
@ApiModelProperty
(
"来源"
)
private
String
source
;
...
...
com.zrqx.core/src/main/java/com/zrqx/core/vo/resource/ResourceRelationVo.java
浏览文件 @
b087c4b2
...
...
@@ -13,12 +13,15 @@ public class ResourceRelationVo {
private
String
resourceId
;
@ApiModelProperty
(
"资源名"
)
private
String
name
;
@ApiModelProperty
(
"
录入方式:1:手动 2EPUB
"
)
@ApiModelProperty
(
""
)
private
Integer
resourceType
;
@ApiModelProperty
(
"录入方式:1:手动 2EPUB"
)
private
Integer
goodsType
;
@ApiModelProperty
(
"创建时间"
)
private
String
uploadTime
;
@ApiModelProperty
(
"排序"
)
private
Integer
sort
;
@ApiModelProperty
(
"作者"
)
private
String
author
;
@ApiModelProperty
(
"封面"
)
...
...
com.zrqx.core/src/main/java/com/zrqx/core/vo/resource/articlelibrary/ArticleLibraryListVO.java
浏览文件 @
b087c4b2
...
...
@@ -18,4 +18,7 @@ public class ArticleLibraryListVO {
private
String
uploadTime
;
@ApiModelProperty
(
"状态:0已下架,1已上架"
)
private
String
status
;
@ApiModelProperty
(
"录入方式:1:手动录入 2:EPUB导入"
)
private
String
goodsType
;
}
com.zrqx.core/src/main/java/com/zrqx/core/vo/resource/ebook/EbookListVO.java
浏览文件 @
b087c4b2
...
...
@@ -28,5 +28,7 @@ public class EbookListVO {
private
String
releaseTime
;
@ApiModelProperty
(
value
=
"创建时间"
)
private
String
uploadTime
;
@ApiModelProperty
(
value
=
"资源二维码"
)
private
String
resourceQr
;
}
com.zrqx.core/src/main/java/com/zrqx/core/vo/resource/fg/articlelibrary/FgArticleLibraryOneVO.java
浏览文件 @
b087c4b2
...
...
@@ -16,8 +16,6 @@ public class FgArticleLibraryOneVO {
private
String
author
;
@ApiModelProperty
(
"来源"
)
private
String
source
;
@ApiModelProperty
(
"正文"
)
private
String
text
;
@ApiModelProperty
(
"资源类型"
)
private
Integer
resourceType
;
@ApiModelProperty
(
"资源名称"
)
...
...
@@ -28,4 +26,87 @@ public class FgArticleLibraryOneVO {
@ApiModelProperty
(
"上传时间"
)
private
Date
uploadTime
;
@ApiModelProperty
(
"作者id"
)
private
String
authorId
;
@ApiModelProperty
(
"关键词"
)
private
String
keywords
;
@ApiModelProperty
(
"定价"
)
private
String
price
;
@ApiModelProperty
(
"简介"
)
private
String
synopsis
;
@ApiModelProperty
(
"正文"
)
private
String
text
;
@ApiModelProperty
(
"pdf"
)
private
String
pdf
;
@ApiModelProperty
(
"状态:0待审核,1已上架,2已下架"
)
private
Integer
status
;
@ApiModelProperty
(
"图书id"
)
private
String
bookId
;
@ApiModelProperty
(
"图书名称"
)
private
String
bookName
;
@ApiModelProperty
(
"封面"
)
private
String
img
;
@ApiModelProperty
(
"音频文件"
)
private
String
audio
;
@ApiModelProperty
(
"视频文件"
)
private
String
video
;
@ApiModelProperty
(
"售价"
)
private
String
realPrice
;
@ApiModelProperty
(
"全文阅读权限 0 游客可见 1会员可见"
)
private
Integer
readTextPower
;
@ApiModelProperty
(
"民族 1蒙古族 2侗族 3藏族 4朝鲜族 5土家族 6回族 7满族 8汉族"
)
private
Integer
nationsType
;
@ApiModelProperty
(
value
=
"章节标识号(bookid+txt编号)"
,
required
=
true
)
private
String
markid
;
@ApiModelProperty
(
value
=
"预览文章"
,
required
=
true
)
private
String
previewText
;
@ApiModelProperty
(
value
=
"销量"
)
private
Integer
salesNum
;
@ApiModelProperty
(
"商品类型,默认2-2"
)
private
String
goodsType
;
@ApiModelProperty
(
"0:未收藏;1:已收藏"
)
private
Integer
isCollection
;
@ApiModelProperty
(
"0:未购买;1:已购买"
)
private
Integer
isBuy
;
@ApiModelProperty
(
"0:未登录;1:已登录"
)
private
Integer
isLogin
;
@ApiModelProperty
(
"0:付费;1:免费"
)
private
Integer
isFree
;
@ApiModelProperty
(
"0:不是作者;1:是作者"
)
private
Integer
isAuthor
;
@ApiModelProperty
(
"0:阅读;1:加入购车;2:加入购物车(按钮置灰)"
)
private
Integer
isStatus
;
@ApiModelProperty
(
"提示消息code"
)
private
Integer
messageCode
;
@ApiModelProperty
(
"提示消息"
)
private
String
message
;
@ApiModelProperty
(
"图书是否是PDF 0否1是"
)
private
Integer
isPdf
;
@ApiModelProperty
(
"pdf阅读url"
)
private
String
pdfReadUrl
;
@ApiModelProperty
(
"图书定价"
)
private
String
bookPrice
;
@ApiModelProperty
(
"图书售价"
)
private
String
bookRealPrice
;
@ApiModelProperty
(
"图书折扣"
)
private
String
bookDiscount
;
@ApiModelProperty
(
"目录排序"
)
private
Integer
orderNum
;
@ApiModelProperty
(
"最大目录排序"
)
private
Integer
orderMaxNum
;
@ApiModelProperty
(
"最小目录排序"
)
private
Integer
orderMinNum
;
@ApiModelProperty
(
"评论数量"
)
private
Integer
commentNum
;
@ApiModelProperty
(
"资源评分"
)
private
Integer
resourceScore
;
}
com.zrqx.core/src/main/java/com/zrqx/core/vo/resource/fg/ebook/FgEbookListVO.java
浏览文件 @
b087c4b2
...
...
@@ -18,4 +18,6 @@ public class FgEbookListVO {
private
String
periods
;
@ApiModelProperty
(
"Pdf"
)
private
String
pdf
;
@ApiModelProperty
(
value
=
"资源二维码"
)
private
String
resourceQr
;
}
com.zrqx.core/src/main/java/com/zrqx/core/vo/resource/fg/ebook/FgEbookVO.java
浏览文件 @
b087c4b2
...
...
@@ -3,6 +3,7 @@ package com.zrqx.core.vo.resource.fg.ebook;
import
java.util.Date
;
import
java.util.List
;
import
com.zrqx.core.model.resource.articlelibrary.ChapterLibrary
;
import
com.zrqx.core.vo.resource.ResourceRelationVo
;
import
io.swagger.annotations.ApiModel
;
...
...
@@ -46,6 +47,8 @@ public class FgEbookVO {
private
List
<
ResourceRelationVo
>
listArticle
;
@ApiModelProperty
(
"pdf杂志"
)
private
String
pdf
;
@ApiModelProperty
(
value
=
"章节标识号(bookid+txt编号)"
,
required
=
true
)
private
String
markid
;
@ApiModelProperty
(
"杂志目录"
)
private
String
bookCatalog
;
@ApiModelProperty
(
"杂志简介"
)
...
...
@@ -63,4 +66,6 @@ public class FgEbookVO {
private
String
yearId
;
@ApiModelProperty
(
"期数id"
)
private
String
periodsId
;
@ApiModelProperty
(
value
=
"关联目录章节"
)
private
List
<
ChapterLibrary
>
chapterList
;
}
com.zrqx.core/src/main/java/com/zrqx/core/vo/resource/fg/recommend/RecommendResourcePageVo.java
→
com.zrqx.core/src/main/java/com/zrqx/core/vo/resource/fg/recommend/
Fg
RecommendResourcePageVo.java
浏览文件 @
b087c4b2
package
com
.
zrqx
.
core
.
vo
.
resource
.
fg
.
recommend
;
import
java.util.Date
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
...
...
@@ -8,7 +10,7 @@ import lombok.Data;
* @date
*/
@Data
public
class
RecommendResourcePageVo
{
public
class
Fg
RecommendResourcePageVo
{
@ApiModelProperty
(
"推荐位与资源关系id"
)
private
Integer
id
;
...
...
@@ -24,4 +26,6 @@ public class RecommendResourcePageVo {
private
Integer
sort
;
@ApiModelProperty
(
value
=
"资源类型 1杂志、2文章、3pdf、5视频、6音频"
)
private
String
resType_zh
;
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
}
com.zrqx.core/src/main/java/com/zrqx/core/vo/resource/projectlibrary/ProjectLibraryListVO.java
浏览文件 @
b087c4b2
...
...
@@ -15,6 +15,8 @@ public class ProjectLibraryListVO {
private
String
name
;
@ApiModelProperty
(
"来源"
)
private
String
source
;
@ApiModelProperty
(
"专题简介"
)
private
String
synopsis
;
@ApiModelProperty
(
"上传时间"
)
private
Date
uploadTime
;
@ApiModelProperty
(
"修改时间"
)
...
...
@@ -27,9 +29,9 @@ public class ProjectLibraryListVO {
private
Integer
topStatus
;
@ApiModelProperty
(
"状态0 无推荐 1 推荐"
)
private
Integer
recommendStatus
;
@ApiModelProperty
(
"封面图片"
)
@ApiModelProperty
(
"封面图片
杂志
"
)
private
String
cover
;
@ApiModelProperty
(
"封面图片"
)
@ApiModelProperty
(
"封面图片
微首页
"
)
private
String
cover1
;
}
com.zrqx.core/src/main/java/com/zrqx/core/vo/resource/projectlibrary/ProjectLibraryVO.java
浏览文件 @
b087c4b2
...
...
@@ -4,10 +4,13 @@ import io.swagger.annotations.ApiModel;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.Date
;
import
java.util.List
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
com.zrqx.core.vo.resource.recommend.FgRecommendVo
;
@Data
@ApiModel
(
value
=
"ProjectLibraryVO"
,
description
=
"单个查询专题返回的实体"
)
public
class
ProjectLibraryVO
{
...
...
@@ -38,4 +41,7 @@ public class ProjectLibraryVO {
@ApiModelProperty
(
"浏览数量"
)
private
Integer
browseNum
;
@ApiModelProperty
(
"推荐资源"
)
private
List
<
FgRecommendVo
>
recommendCourseList
;
}
com.zrqx.core/src/main/java/com/zrqx/core/vo/resource/recommend/FgRecommendListVo.java
0 → 100644
浏览文件 @
b087c4b2
package
com
.
zrqx
.
core
.
vo
.
resource
.
recommend
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.List
;
import
lombok.Data
;
import
com.zrqx.core.util.page.PageInfo
;
/**
* 前台推荐位资源内容查询vo-列表
* @author
* @date
*/
@Data
public
class
FgRecommendListVo
{
@ApiModelProperty
(
"推荐位id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"推荐位描述"
)
private
String
descriptions
;
@ApiModelProperty
(
value
=
"推荐位名称"
)
private
String
name
;
@ApiModelProperty
(
"推荐位封面"
)
private
String
img
;
@ApiModelProperty
(
value
=
"推荐内容(列表)"
)
private
List
<?>
RecommendResourceList
;
@ApiModelProperty
(
value
=
"推荐内容(分页)"
)
private
PageInfo
<?>
RecommendResourcePage
;
}
com.zrqx.core/src/main/java/com/zrqx/core/vo/resource/recommend/FgRecommendPageVo.java
0 → 100644
浏览文件 @
b087c4b2
package
com
.
zrqx
.
core
.
vo
.
resource
.
recommend
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
com.zrqx.core.util.page.PageInfo
;
/**
* 前台公共推荐位vo-分页查询
* @author
* @date
*/
@Data
public
class
FgRecommendPageVo
{
@ApiModelProperty
(
"推荐位id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"推荐位描述"
)
private
String
descriptions
;
@ApiModelProperty
(
value
=
"推荐位名称"
)
private
String
name
;
@ApiModelProperty
(
"推荐位封面"
)
private
String
img
;
@ApiModelProperty
(
value
=
"民族"
)
private
Integer
nationsType
;
@ApiModelProperty
(
value
=
"推荐内容"
)
private
PageInfo
<?>
RecommendResourceList
;
}
com.zrqx.core/src/main/java/com/zrqx/core/vo/resource/recommend/FgRecommendVo.java
0 → 100644
浏览文件 @
b087c4b2
package
com
.
zrqx
.
core
.
vo
.
resource
.
recommend
;
import
java.util.Date
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* 前台推荐位资源内容查询vo
* @author
* @date
*/
@Data
public
class
FgRecommendVo
{
@ApiModelProperty
(
"资源id"
)
private
String
id
;
@ApiModelProperty
(
value
=
"资源名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"资源内容封面"
)
private
String
img
;
@ApiModelProperty
(
value
=
"资源类型 "
)
private
Integer
resourceType
;
@ApiModelProperty
(
"上传时间"
)
private
Date
uploadTime
;
@ApiModelProperty
(
"来源"
)
private
String
source
;
}
com.zrqx.core/src/main/java/com/zrqx/core/vo/resource/recommend/FgTypeToResourceListVo.java
0 → 100644
浏览文件 @
b087c4b2
package
com
.
zrqx
.
core
.
vo
.
resource
.
recommend
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.List
;
import
lombok.Data
;
/**
*
* @author ycw
* @date 2019年2月20日上午11:55:59
*/
@Data
public
class
FgTypeToResourceListVo
{
@ApiModelProperty
(
value
=
"资源类型 0全部31理论 32药物 33方剂 34临床 35医案 36文化 37机构 38医论48其他 1医著 2医家"
)
private
Integer
resType
;
@ApiModelProperty
(
value
=
"资源类型名称 0全部31理论 32药物 33方剂 34临床 35医案 36文化 37机构 38医论48其他 1医著 2医家"
)
private
String
resName
;
@ApiModelProperty
(
"对应类型的资源集合"
)
private
List
<?>
resList
;
}
com.zrqx.core/src/main/java/com/zrqx/core/vo/resource/recommend/RecommendResourcePageVo.java
0 → 100644
浏览文件 @
b087c4b2
package
com
.
zrqx
.
core
.
vo
.
resource
.
recommend
;
import
java.math.BigDecimal
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.fasterxml.jackson.databind.ser.std.ToStringSerializer
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* 前台推荐位资源内容查询vo
* @author
* @date
*/
@Data
public
class
RecommendResourcePageVo
{
@ApiModelProperty
(
"id"
)
private
String
id
;
@ApiModelProperty
(
value
=
"资源名称"
)
private
String
resName
;
@ApiModelProperty
(
value
=
"资源内容封面"
)
private
String
resImg
;
@ApiModelProperty
(
value
=
"资源id"
)
private
String
resId
;
@ApiModelProperty
(
value
=
"资源类型"
)
private
Integer
resourceType
;
@ApiModelProperty
(
value
=
"资源排序号"
)
private
Integer
sort
;
//临时字段资源
@JsonSerialize
(
using
=
ToStringSerializer
.
class
)
@ApiModelProperty
(
"定价 元"
)
private
BigDecimal
price
;
@JsonSerialize
(
using
=
ToStringSerializer
.
class
)
@ApiModelProperty
(
"售价 元"
)
private
BigDecimal
realPrice
;
@ApiModelProperty
(
"封面"
)
private
String
cover
;
@ApiModelProperty
(
"学习人数"
)
private
Integer
studyNum
;
@ApiModelProperty
(
"播放次数"
)
private
Integer
clickNum
;
@ApiModelProperty
(
"资源数量"
)
private
Integer
resourceNumber
;
@ApiModelProperty
(
"售价选项 0 免费,1收费"
)
private
Integer
priceOption
;
@ApiModelProperty
(
"0:未购买;1:已购买"
)
private
Integer
isBuy
;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论