Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
sc_media
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
sc_media
Commits
96512a5c
提交
96512a5c
authored
7月 15, 2019
作者:
renjiancai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
fe9fd007
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
59 行增加
和
70 行删除
+59
-70
ResourceRequestPath.java
.../com/zrqx/core/constant/resource/ResourceRequestPath.java
+2
-0
SaveUpdateImageLibraryForm.java
...source/bg/resourcelibrary/SaveUpdateImageLibraryForm.java
+0
-50
SaveUpdateResourceLibraryForm.java
...rce/bg/resourcelibrary/SaveUpdateResourceLibraryForm.java
+18
-0
ResourceLibrary.java
...in/java/com/zrqx/core/model/resource/ResourceLibrary.java
+3
-0
ResourceLibraryController.java
...urce/bg/controller/content/ResourceLibraryController.java
+23
-3
ResourceLibraryMapper.java
...urce/bg/mapper/resourcelibrary/ResourceLibraryMapper.java
+5
-2
ResourceLibrarySerivceImpl.java
...g/service/resourcelibrary/ResourceLibrarySerivceImpl.java
+7
-4
ResourceLibraryService.java
...ce/bg/service/resourcelibrary/ResourceLibraryService.java
+1
-1
UserAccountRelationService.java
.../resource/bg/service/user/UserAccountRelationService.java
+0
-3
UserAccountRelationServiceImpl.java
...ource/bg/service/user/UserAccountRelationServiceImpl.java
+0
-7
没有找到文件。
com.zrqx.core/src/main/java/com/zrqx/core/constant/resource/ResourceRequestPath.java
浏览文件 @
96512a5c
...
...
@@ -14,6 +14,8 @@ public class ResourceRequestPath extends BaseRequestPath {
public
static
final
String
ARTICLE_LIBRARY
=
"/article-library"
;
/** 图片库*/
public
static
final
String
IMAGE_LIBRARY
=
"/image-library"
;
/** 素材库*/
public
static
final
String
RESOURCE_LIBRARY
=
"/resource-library"
;
/** 视频库*/
public
static
final
String
VIDEO_LIBRARY
=
"/video-library"
;
/** 音频库*/
...
...
com.zrqx.core/src/main/java/com/zrqx/core/form/resource/bg/resourcelibrary/SaveUpdateImageLibraryForm.java
deleted
100644 → 0
浏览文件 @
fe9fd007
package
com
.
zrqx
.
core
.
form
.
resource
.
bg
.
resourcelibrary
;
import
java.util.Date
;
import
java.util.List
;
import
javax.persistence.Transient
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
@ApiModel
(
value
=
"SaveUpdateImageLibraryForm"
,
description
=
"新增和修改图片库"
)
public
class
SaveUpdateImageLibraryForm
{
@ApiModelProperty
(
"图片id,新增时不需要填写"
)
private
String
id
;
@ApiModelProperty
(
value
=
"标题"
)
private
String
title
;
@ApiModelProperty
(
"图组"
)
private
String
text
;
@ApiModelProperty
(
"类型"
)
private
String
type
;
@ApiModelProperty
(
"定时发布时间"
)
private
Date
timingTime
;
@ApiModelProperty
(
"发布状态:0未发布,1已发布,2定时发布"
)
private
Integer
publishStatus
;
@ApiModelProperty
(
"审核状态:0发布中,1发布成功,2发布失败 ,3已删除,4部分发布失败,6未发布"
)
private
Integer
examineStatus
;
@ApiModelProperty
(
"资源类型 1图文章 2图集 3视频"
)
private
Integer
resourceType
;
@ApiModelProperty
(
"是否删除 0:未删除 1:已删除"
)
private
Integer
isDelete
=
0
;
@ApiModelProperty
(
"发布时间"
)
private
Date
publishTime
;
@ApiModelProperty
(
"上传时间"
)
private
Date
uploadTime
;
@ApiModelProperty
(
"审核时间"
)
private
Date
examineTime
;
@ApiModelProperty
(
"反馈原因"
)
private
String
reason
;
@ApiModelProperty
(
"封面"
)
private
String
cover
;
@ApiModelProperty
(
"内容唯一id"
)
private
String
article_id
;
@ApiModelProperty
(
"封面类型,1表示单图,3表示三图"
)
private
Integer
cover_type
;
@Transient
private
List
<
String
>
original_author
;
@ApiModelProperty
(
value
=
"修改时间"
)
private
Date
updateTime
;
}
com.zrqx.core/src/main/java/com/zrqx/core/form/resource/bg/resourcelibrary/SaveUpdateResourceLibraryForm.java
0 → 100644
浏览文件 @
96512a5c
package
com
.
zrqx
.
core
.
form
.
resource
.
bg
.
resourcelibrary
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.Date
;
import
lombok.Data
;
@Data
@ApiModel
(
value
=
"SaveUpdateResourceLibraryForm"
,
description
=
"修改名称"
)
public
class
SaveUpdateResourceLibraryForm
{
@ApiModelProperty
(
"id,新增时不需要填写"
)
private
String
id
;
@ApiModelProperty
(
value
=
"标题"
)
private
String
title
;
@ApiModelProperty
(
value
=
"修改时间"
)
private
Date
updateTime
;
}
com.zrqx.core/src/main/java/com/zrqx/core/model/resource/ResourceLibrary.java
浏览文件 @
96512a5c
...
...
@@ -38,4 +38,7 @@ public class ResourceLibrary {
private
String
timeLength
;
@ApiModelProperty
(
"文件大小"
)
private
String
size
;
@ApiModelProperty
(
"修改时间"
)
private
Date
updateTime
;
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/controller/content/ResourceLibraryController.java
浏览文件 @
96512a5c
package
com
.
zrqx
.
resource
.
bg
.
controller
.
content
;
import
java.io.IOException
;
import
java.text.ParseException
;
import
java.util.Date
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -14,6 +18,10 @@ import com.zrqx.core.constant.resource.ResourceRequestPath;
import
com.zrqx.core.enums.ResponseCodeEnum
;
import
com.zrqx.core.exception.BaseException
;
import
com.zrqx.core.form.resource.bg.BatchImportForm
;
import
com.zrqx.core.form.resource.bg.articlelibrary.SaveUpdateArticleLibraryForm
;
import
com.zrqx.core.form.resource.bg.resourcelibrary.SaveImageLibraryForm
;
import
com.zrqx.core.form.resource.bg.resourcelibrary.SaveUpdateResourceLibraryForm
;
import
com.zrqx.core.model.resource.ResourceLibrary
;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.util.response.CallBack
;
...
...
@@ -24,11 +32,23 @@ import com.zrqx.resource.bg.service.resourcelibrary.ResourceLibraryService;
* 内容管理Controller
*/
@RestController
@RequestMapping
(
ResourceRequestPath
.
BG
+
ResourceRequestPath
.
ARTICL
E_LIBRARY
)
@RequestMapping
(
ResourceRequestPath
.
BG
+
ResourceRequestPath
.
RESOURC
E_LIBRARY
)
@Api
(
description
=
"内容管理——图组库"
)
public
class
ResourceLibraryController
{
@Autowired
private
ResourceLibraryService
resourceLibraryService
;
@ApiOperation
(
value
=
"新增"
,
notes
=
"新增一个"
)
@PostMapping
(
value
=
ResourceRequestPath
.
SAVE
)
public
CallBack
<
Boolean
>
save
(
@RequestBody
SaveUpdateResourceLibraryForm
form
)
{
if
(
form
.
getId
()
==
null
){
throw
new
BaseException
(
"请选择要修改的资源!"
);
}
ResourceLibrary
library
=
resourceLibraryService
.
selectByPrimaryKey
(
form
.
getId
());
library
.
setUpdateTime
(
new
Date
());
library
.
setTitle
(
form
.
getTitle
());
resourceLibraryService
.
updateByPrimaryKey
(
library
);
return
CallBack
.
success
();
}
/**
* 查询图片素材
* @param pageParam
...
...
@@ -38,8 +58,8 @@ public class ResourceLibraryController {
*/
@ApiOperation
(
value
=
"分页查询"
,
notes
=
"分页查询"
)
@GetMapping
(
value
=
ResourceRequestPath
.
PAGE
)
public
CallBack
<
PageInfo
<
ResourceLibraryListVO
>>
page
(
PageParam
pageParam
)
{
return
CallBack
.
success
(
resourceLibraryService
.
page
(
pageParam
));
public
CallBack
<
PageInfo
<
ResourceLibraryListVO
>>
page
(
Integer
resourceType
,
PageParam
pageParam
)
{
return
CallBack
.
success
(
resourceLibraryService
.
page
(
resourceType
,
pageParam
));
}
@ApiOperation
(
value
=
"批量新增"
,
notes
=
"批量新增"
)
...
...
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/mapper/resourcelibrary/ResourceLibraryMapper.java
浏览文件 @
96512a5c
...
...
@@ -12,9 +12,12 @@ import com.zrqx.core.vo.resource.resourcelibrary.ResourceLibraryListVO;
*/
public
interface
ResourceLibraryMapper
extends
BaseMapper
<
ResourceLibrary
>
{
@Select
(
"<script>"
+
"SELECT * from resource_library a where 1=1 and a.isDelete=0"
+
"SELECT * from resource_library a where 1=1 and a.isDelete=0"
+
"<if>"
+
" and a.resourceType=#{resourceType}"
+
"</if>"
+
"</script>"
)
List
<
ResourceLibraryListVO
>
query
();
List
<
ResourceLibraryListVO
>
query
(
Integer
resourceType
);
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/resourcelibrary/ResourceLibrarySerivceImpl.java
浏览文件 @
96512a5c
...
...
@@ -60,10 +60,10 @@ public class ResourceLibrarySerivceImpl extends BaseServiceImpl<ResourceLibrary,
* @date: 2019年7月12日 上午10:04:16
*/
@Override
public
PageInfo
<
ResourceLibraryListVO
>
page
(
PageParam
pageParam
)
{
public
PageInfo
<
ResourceLibraryListVO
>
page
(
Integer
resourceType
,
PageParam
pageParam
)
{
pageParam
.
setOrderBy
(
"uploadTime desc"
);
startPage
(
pageParam
);
List
<
ResourceLibraryListVO
>
list
=
resourceMapper
.
query
();
List
<
ResourceLibraryListVO
>
list
=
resourceMapper
.
query
(
resourceType
);
return
new
PageInfo
<
ResourceLibraryListVO
>(
list
);
}
@Override
...
...
@@ -80,9 +80,12 @@ public class ResourceLibrarySerivceImpl extends BaseServiceImpl<ResourceLibrary,
obj
.
setTitle
(
name
);
obj
.
setPath
(
form
.
getToken
().
get
(
i
));
obj
.
setUploadTime
(
new
Date
());
obj
.
setResourceType
(
1
);
obj
.
setResourceType
(
form
.
getResourceType
()
);
obj
.
setIsDelete
(
0
);
obj
.
setResourceType
(
5
);
if
(
form
.
getResourceType
().
equals
(
2
)){
obj
.
setSize
(
form
.
getSize
().
get
(
i
));
obj
.
setTimeLength
(
form
.
getTimeLength
().
get
(
i
));
}
resourceMapper
.
insert
(
obj
);
list
.
add
(
obj
);
}
...
...
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/resourcelibrary/ResourceLibraryService.java
浏览文件 @
96512a5c
...
...
@@ -30,7 +30,7 @@ public interface ResourceLibraryService extends BaseService<ResourceLibrary,Inte
* @author rjc
* @date: 2019年7月12日 上午10:04:49
*/
PageInfo
<
ResourceLibraryListVO
>
page
(
PageParam
pageParam
);
PageInfo
<
ResourceLibraryListVO
>
page
(
Integer
resourceType
,
PageParam
pageParam
);
boolean
batchInsert
(
BatchImportForm
form
);
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/user/UserAccountRelationService.java
浏览文件 @
96512a5c
package
com
.
zrqx
.
resource
.
bg
.
service
.
user
;
import
com.zrqx.core.form.resource.bg.resourcelibrary.SaveUpdateImageLibraryForm
;
import
com.zrqx.core.model.sysuser.user.UserAccountRelation
;
import
com.zrqx.core.service.BaseService
;
/**
...
...
@@ -11,6 +10,5 @@ public interface UserAccountRelationService extends BaseService<UserAccountRelat
Integer
accountCount
(
Integer
status
);
public
boolean
saveOrUpdate
(
SaveUpdateImageLibraryForm
form
);
}
\ No newline at end of file
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/user/UserAccountRelationServiceImpl.java
浏览文件 @
96512a5c
...
...
@@ -5,7 +5,6 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zrqx.core.form.resource.bg.resourcelibrary.SaveUpdateImageLibraryForm
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.sysuser.user.UserAccountRelation
;
import
com.zrqx.core.service.BaseServiceImpl
;
...
...
@@ -29,10 +28,4 @@ public class UserAccountRelationServiceImpl extends BaseServiceImpl<UserAccountR
// TODO Auto-generated method stub
return
accountRelationMapper
.
accountCount
(
status
);
}
@Override
public
boolean
saveOrUpdate
(
SaveUpdateImageLibraryForm
form
)
{
return
true
;
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论