Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
H
hxkf
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
hxkf
Commits
db48f7fa
提交
db48f7fa
authored
4月 22, 2020
作者:
liupengfei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
48356465
隐藏空白字符变更
内嵌
并排
正在显示
24 个修改的文件
包含
229 行增加
和
255 行删除
+229
-255
EbookController.java
...om/zrqx/resource/bg/controller/ebook/EbookController.java
+26
-91
ProjectLibraryController.java
...g/controller/projectlibrary/ProjectLibraryController.java
+2
-2
ResourceLibraryController.java
...controller/resourcelibrary/ResourceLibraryController.java
+11
-11
DatabaseController.java
.../zrqx/resource/bg/controller/task/DatabaseController.java
+4
-4
EbookMapper.java
...n/java/com/zrqx/resource/bg/mapper/ebook/EbookMapper.java
+5
-5
ResourceRelationServiceImpl.java
...zrqx/resource/bg/service/ResourceRelationServiceImpl.java
+4
-12
BookService.java
.../java/com/zrqx/resource/bg/service/ebook/BookService.java
+4
-0
EbookService.java
...java/com/zrqx/resource/bg/service/ebook/EbookService.java
+7
-1
EbookServiceImpl.java
.../com/zrqx/resource/bg/service/ebook/EbookServiceImpl.java
+123
-30
ProjectLibrarySerivceImpl.java
.../bg/service/projectlibrary/ProjectLibrarySerivceImpl.java
+8
-8
ProjectLibraryService.java
...urce/bg/service/projectlibrary/ProjectLibraryService.java
+8
-8
QueryEbookInfoForm.java
...qx/resource/commons/form/bg/ebook/QueryEbookInfoForm.java
+0
-4
SaveUpdateEbookForm.java
...x/resource/commons/form/bg/ebook/SaveUpdateEbookForm.java
+2
-24
UpdateEbookForm.java
.../zrqx/resource/commons/form/bg/ebook/UpdateEbookForm.java
+2
-0
Book.java
...main/java/com/zrqx/resource/commons/model/ebook/Book.java
+2
-2
Ebook.java
...ain/java/com/zrqx/resource/commons/model/ebook/Ebook.java
+1
-3
AboutListVO.java
...rqx/resource/commons/vo/bg/authorlibrary/AboutListVO.java
+2
-2
EbookListVO.java
...va/com/zrqx/resource/commons/vo/bg/ebook/EbookListVO.java
+1
-7
EbookVO.java
...n/java/com/zrqx/resource/commons/vo/bg/ebook/EbookVO.java
+4
-28
FgEbookController.java
.../zrqx/resource/fg/controller/ebook/FgEbookController.java
+2
-2
FgResourceLibraryController.java
...ntroller/resourcelibrary/FgResourceLibraryController.java
+5
-5
FgResourceRelationServiceImpl.java
...qx/resource/fg/service/FgResourceRelationServiceImpl.java
+4
-4
FgAuthorLibraryServiceImpl.java
.../fg/service/authorlibrary/FgAuthorLibraryServiceImpl.java
+1
-1
FgRecordServiceImpl.java
.../zrqx/resource/fg/service/record/FgRecordServiceImpl.java
+1
-1
没有找到文件。
app/resource/src/main/java/com/zrqx/resource/bg/controller/ebook/EbookController.java
浏览文件 @
db48f7fa
...
@@ -141,38 +141,21 @@ public class EbookController {
...
@@ -141,38 +141,21 @@ public class EbookController {
if
(!
ebookservice
.
saveOrUpdate
(
form
))
{
if
(!
ebookservice
.
saveOrUpdate
(
form
))
{
throw
new
BaseException
(
"操作失败"
);
throw
new
BaseException
(
"操作失败"
);
}
}
// 当图书为免费时,文章图片同步为免费
if
(
StringUtils
.
isNotBlank
(
form
.
getId
())){
if
(
StringUtils
.
isNotBlank
(
form
.
getId
())
&&
form
.
getPriceOption
().
equals
(
PriceOptionEnum
.
STATUS_0
.
getCode
())){
// 当图书为免费时,文章图片同步为免费
this
.
updateArticlePrice
(
Arrays
.
asList
(
form
.
getId
()));
if
(
form
.
getPriceOption
().
equals
(
PriceOptionEnum
.
STATUS_0
.
getCode
())){
this
.
updateImagePrice
(
Arrays
.
asList
(
form
.
getId
()));
this
.
updateArticlePrice
(
Arrays
.
asList
(
form
.
getId
()));
}
}
return
CallBack
.
success
(
true
);
// 推荐位内容修改
}
UpdateRecommendResourceForm
res
=
new
UpdateRecommendResourceForm
();
res
.
setResId
(
form
.
getId
());
@ApiOperation
(
"修改电子书"
)
res
.
setResType
(
AllResourceTypeEnum
.
BOOK
.
getCode
());
@PostMapping
(
"/update"
)
if
(
StringUtils
.
isNotBlank
(
form
.
getImg
())){
public
CallBack
<?>
updateBook
(
@RequestBody
SaveUpdateEbookForm
form
)
{
res
.
setResImg
(
form
.
getImg
());
if
(!
ebookservice
.
saveOrUpdate
(
form
))
{
}
throw
new
BaseException
(
"操作失败"
);
res
.
setResName
(
form
.
getName
());
recommendResourceService
.
updateResourceContent
(
res
);
}
}
// 当图书为免费时,文章图片同步为免费
if
(
StringUtils
.
isNotBlank
(
form
.
getId
())
&&
PriceOptionEnum
.
STATUS_0
.
getCode
().
equals
(
form
.
getPriceOption
())){
this
.
updateArticlePrice
(
Arrays
.
asList
(
form
.
getId
()));
this
.
updateImagePrice
(
Arrays
.
asList
(
form
.
getId
()));
}
// 促销活动内容修改
PromotionContent
con
=
new
PromotionContent
();
con
.
setResourceId
(
form
.
getId
());
con
.
setResourceType
(
AllResourceTypeEnum
.
BOOK
.
getCode
());
con
.
setName
(
form
.
getName
());
promotionContentService
.
updateContent
(
con
);
// 推荐位内容修改
UpdateRecommendResourceForm
res
=
new
UpdateRecommendResourceForm
();
res
.
setResId
(
form
.
getId
());
res
.
setResType
(
AllResourceTypeEnum
.
BOOK
.
getCode
());
res
.
setResImg
(
form
.
getBookCover
());
res
.
setResName
(
form
.
getName
());
recommendResourceService
.
updateResourceContent
(
res
);
return
CallBack
.
success
(
true
);
return
CallBack
.
success
(
true
);
}
}
...
@@ -206,12 +189,6 @@ public class EbookController {
...
@@ -206,12 +189,6 @@ public class EbookController {
if
(
ebook
.
getPrice
()
!=
null
){
if
(
ebook
.
getPrice
()
!=
null
){
vo
.
setPrice
(
ebook
.
getPrice
().
toString
());
vo
.
setPrice
(
ebook
.
getPrice
().
toString
());
}
}
if
(
ebook
.
getEntityRealPrice
()
!=
null
){
vo
.
setEntityRealPrice
(
ebook
.
getEntityRealPrice
().
toString
());
}
if
(
ebook
.
getEntityPrice
()
!=
null
){
vo
.
setEntityPrice
(
ebook
.
getEntityPrice
().
toString
());
}
if
(
ebook
.
getPdfId
()
==
null
){
if
(
ebook
.
getPdfId
()
==
null
){
if
(
ebook
.
getPdfFile
()
==
null
){
if
(
ebook
.
getPdfFile
()
==
null
){
vo
.
setPdfType
(
3
);
vo
.
setPdfType
(
3
);
...
@@ -234,9 +211,6 @@ public class EbookController {
...
@@ -234,9 +211,6 @@ public class EbookController {
// 选中的LabelContentDiyTypeId
// 选中的LabelContentDiyTypeId
List
<
Integer
>
labelContentDiyTypeIds
=
lcdList
.
stream
().
map
(
EbookLabelContentDiyType
::
getLabelContentDiyTypeId
).
collect
(
Collectors
.
toList
());
List
<
Integer
>
labelContentDiyTypeIds
=
lcdList
.
stream
().
map
(
EbookLabelContentDiyType
::
getLabelContentDiyTypeId
).
collect
(
Collectors
.
toList
());
vo
.
setLabelContentDiyTypeIds
(
labelContentDiyTypeIds
);
vo
.
setLabelContentDiyTypeIds
(
labelContentDiyTypeIds
);
if
(
StringUtils
.
isNotBlank
(
ebook
.
getPdfFile
()))
{
vo
.
setPdf_zh
(
pdfLibraryService
.
getOriginalFileName
(
ebook
.
getPdfFile
()));
}
// 目录
// 目录
List
<
ChapterLibrary
>
chapterList
=
this
.
getDirectory
(
vo
.
getId
());
List
<
ChapterLibrary
>
chapterList
=
this
.
getDirectory
(
vo
.
getId
());
vo
.
setChapterList
(
chapterList
);
vo
.
setChapterList
(
chapterList
);
...
@@ -248,12 +222,13 @@ public class EbookController {
...
@@ -248,12 +222,13 @@ public class EbookController {
public
CallBack
<
Boolean
>
update1
(
@RequestBody
UpdateEbookForm
form
)
{
public
CallBack
<
Boolean
>
update1
(
@RequestBody
UpdateEbookForm
form
)
{
Ebook
eb
=
new
Ebook
();
Ebook
eb
=
new
Ebook
();
eb
.
setPriceOption
(
form
.
getPriceOption
());
eb
.
setPriceOption
(
form
.
getPriceOption
());
eb
.
setPrice
(
form
.
getPrice
());
eb
.
setRealPrice
(
form
.
getRealPrice
());
eb
.
setRealPrice
(
form
.
getRealPrice
());
eb
.
setUpdateTime
(
new
Date
());
eb
.
setUpdateTime
(
new
Date
());
Example
example
=
dt
service
.
createExample
();
Example
example
=
ebook
service
.
createExample
();
example
.
createCriteria
().
andIn
(
"id"
,
form
.
getIds
());
example
.
createCriteria
().
andIn
(
"id"
,
form
.
getIds
());
if
(!
ebookservice
.
UpdateByExampleSelective
(
eb
,
example
))
{
if
(!
ebookservice
.
UpdateByExampleSelective
(
eb
,
example
))
{
throw
new
BaseException
(
"
操作
失败"
);
throw
new
BaseException
(
"
修改
失败"
);
}
}
// 当图书为免费时,文章同步为免费
// 当图书为免费时,文章同步为免费
if
(
PriceOptionEnum
.
STATUS_0
.
getCode
().
equals
(
form
.
getPriceOption
())){
if
(
PriceOptionEnum
.
STATUS_0
.
getCode
().
equals
(
form
.
getPriceOption
())){
...
@@ -272,7 +247,7 @@ public class EbookController {
...
@@ -272,7 +247,7 @@ public class EbookController {
return
CallBack
.
success
();
return
CallBack
.
success
();
}
}
@ApiOperation
(
value
=
"批量修改销售状态"
,
notes
=
"批量修改销售状态"
)
/*
@ApiOperation(value = "批量修改销售状态", notes = "批量修改销售状态")
@PostMapping(value = "/batch/update/status")
@PostMapping(value = "/batch/update/status")
public CallBack<Boolean> update3(@RequestBody UpdateEbookForm form) {
public CallBack<Boolean> update3(@RequestBody UpdateEbookForm form) {
Book b = new Book();
Book b = new Book();
...
@@ -319,7 +294,7 @@ public class EbookController {
...
@@ -319,7 +294,7 @@ public class EbookController {
throw new BaseException("请求参数有误,请检查!");
throw new BaseException("请求参数有误,请检查!");
}
}
return CallBack.success();
return CallBack.success();
}
}
*/
@ApiOperation
(
value
=
"批量修改上下架"
,
notes
=
"批量修改上下架"
)
@ApiOperation
(
value
=
"批量修改上下架"
,
notes
=
"批量修改上下架"
)
@PostMapping
(
value
=
"/batch/update/updown"
)
@PostMapping
(
value
=
"/batch/update/updown"
)
...
@@ -371,7 +346,7 @@ public class EbookController {
...
@@ -371,7 +346,7 @@ public class EbookController {
return
CallBack
.
success
();
return
CallBack
.
success
();
}
}
@ApiOperation
(
value
=
"批量提交审核"
,
notes
=
"批量提交审核"
)
/*
@ApiOperation(value = "批量提交审核", notes = "批量提交审核")
@PostMapping(value = "/batch/update")
@PostMapping(value = "/batch/update")
public CallBack<Boolean> update6(@RequestBody List<String> ids) {
public CallBack<Boolean> update6(@RequestBody List<String> ids) {
if (!list(ids, EbookStatusEnum._1, false, EbookStatusEnum._0)) {// 如果状态不是
if (!list(ids, EbookStatusEnum._1, false, EbookStatusEnum._0)) {// 如果状态不是
...
@@ -380,7 +355,7 @@ public class EbookController {
...
@@ -380,7 +355,7 @@ public class EbookController {
throw new BaseException("请先下架,再删除数据。");
throw new BaseException("请先下架,再删除数据。");
}
}
return CallBack.success();
return CallBack.success();
}
}
*/
@ApiOperation
(
value
=
"批量删除"
,
notes
=
"批量删除"
)
@ApiOperation
(
value
=
"批量删除"
,
notes
=
"批量删除"
)
@PostMapping
(
value
=
"/batch/delete"
)
@PostMapping
(
value
=
"/batch/delete"
)
...
@@ -394,15 +369,10 @@ public class EbookController {
...
@@ -394,15 +369,10 @@ public class EbookController {
}
}
}
}
// 这里需要级联删除其他接口关联资源
// 这里需要级联删除其他接口关联资源
// ----推荐位内容
if
(!
ebookservice
.
batchDelete
(
ids
))
{
recommendResourceService
.
delectByResourceIds
(
ids
,
AllResourceTypeEnum
.
BOOK
.
getCode
());
throw
new
BaseException
(
"操作失败"
);
// ----促销活动
}
promotionContentService
.
delectByResourceIds
(
ids
,
AllResourceTypeEnum
.
BOOK
.
getCode
());
// 删除文章
// ----关联资源
example
=
new
Example
(
ResourceRelation
.
class
);
example
.
createCriteria
().
andIn
(
"objectId"
,
ids
).
orIn
(
"resourceId"
,
ids
);
resourceRelationService
.
deleteByExample
(
example
);
// 删除相关资源
example
=
new
Example
(
ArticleLibrary
.
class
);
example
=
new
Example
(
ArticleLibrary
.
class
);
example
.
createCriteria
().
andIn
(
"bookId"
,
ids
);
example
.
createCriteria
().
andIn
(
"bookId"
,
ids
);
List
<
ArticleLibrary
>
articleList
=
alservice
.
selectByExample
(
example
);
List
<
ArticleLibrary
>
articleList
=
alservice
.
selectByExample
(
example
);
...
@@ -410,6 +380,7 @@ public class EbookController {
...
@@ -410,6 +380,7 @@ public class EbookController {
List
<
String
>
articleIdList
=
articleList
.
stream
().
map
(
ArticleLibrary
::
getId
).
collect
(
Collectors
.
toList
());
List
<
String
>
articleIdList
=
articleList
.
stream
().
map
(
ArticleLibrary
::
getId
).
collect
(
Collectors
.
toList
());
alservice
.
batchDelete
(
articleIdList
);
alservice
.
batchDelete
(
articleIdList
);
}
}
// 删除图片
example
=
new
Example
(
ImageLibrary
.
class
);
example
=
new
Example
(
ImageLibrary
.
class
);
example
.
createCriteria
().
andIn
(
"bookId"
,
ids
);
example
.
createCriteria
().
andIn
(
"bookId"
,
ids
);
List
<
ImageLibrary
>
imageList
=
ilService
.
selectByExample
(
example
);
List
<
ImageLibrary
>
imageList
=
ilService
.
selectByExample
(
example
);
...
@@ -417,38 +388,6 @@ public class EbookController {
...
@@ -417,38 +388,6 @@ public class EbookController {
List
<
String
>
imageIdList
=
imageList
.
stream
().
map
(
ImageLibrary
::
getId
).
collect
(
Collectors
.
toList
());
List
<
String
>
imageIdList
=
imageList
.
stream
().
map
(
ImageLibrary
::
getId
).
collect
(
Collectors
.
toList
());
ilService
.
batchDelete
(
imageIdList
);
ilService
.
batchDelete
(
imageIdList
);
}
}
// ----目录
example
=
new
Example
(
ChapterLibrary
.
class
);
example
.
createCriteria
().
andIn
(
"bookid"
,
ids
);
chapterLibraryService
.
deleteByExample
(
example
);
// ----自定义分类
example
=
new
Example
(
EbookDiyType
.
class
);
example
.
createCriteria
().
andIn
(
"ebookId"
,
ids
);
dtservice
.
deleteByExample
(
example
);
// ----自定义标签
example
=
new
Example
(
EbookLabelContentDiyType
.
class
);
example
.
createCriteria
().
andIn
(
"ebookId"
,
ids
);
lcdtservice
.
deleteByExample
(
example
);
example
=
new
Example
(
Ebook
.
class
);
example
.
createCriteria
().
andIn
(
"id"
,
ids
);
ebookservice
.
deleteByExample
(
example
);
example
=
new
Example
(
Book
.
class
);
example
.
createCriteria
().
andIn
(
"id"
,
ids
);
bookservice
.
deleteByExample
(
example
);
//删除资源订单相关信息
orderClient
.
deleteOrder
(
ids
);
//删除资源收藏相关信息
example
=
new
Example
(
MemberCollection
.
class
);
example
.
createCriteria
().
andIn
(
"objectId"
,
ids
);
memberCollectionService
.
deleteByExample
(
example
);
//删除资源购物车相关信息
example
=
new
Example
(
ShoppingCart
.
class
);
example
.
createCriteria
().
andIn
(
"goodsId"
,
ids
);
shoppingCartService
.
deleteByExample
(
example
);
//删除资源浏览记录相关信息
example
=
new
Example
(
Record
.
class
);
example
.
createCriteria
().
andIn
(
"goodsId"
,
ids
);
recordService
.
deleteByExample
(
example
);
return
CallBack
.
success
();
return
CallBack
.
success
();
}
}
...
@@ -635,7 +574,6 @@ public class EbookController {
...
@@ -635,7 +574,6 @@ public class EbookController {
article
.
setUpdateTime
(
new
Date
());
article
.
setUpdateTime
(
new
Date
());
article
.
setStatus
(
0
);
article
.
setStatus
(
0
);
article
.
setBrowseNum
(
50
);
article
.
setBrowseNum
(
50
);
article
.
setNationsType
(
book
.
getNationsType
());
article
.
setResourceType
(
AllResourceTypeEnum
.
ARTICLE
.
getCode
());
article
.
setResourceType
(
AllResourceTypeEnum
.
ARTICLE
.
getCode
());
article
.
setGoodsType
(
GoodsTypeEnum
.
ARTICLE
.
getCode
());
article
.
setGoodsType
(
GoodsTypeEnum
.
ARTICLE
.
getCode
());
article
.
setSalesNum
(
0
);
article
.
setSalesNum
(
0
);
...
@@ -703,7 +641,6 @@ public class EbookController {
...
@@ -703,7 +641,6 @@ public class EbookController {
ev
.
getEbook
().
setBookStatus
(
0
);
ev
.
getEbook
().
setBookStatus
(
0
);
ev
.
getEbook
().
setGoodsType
(
GoodsTypeEnum
.
EBOOK
.
getCode
());
ev
.
getEbook
().
setGoodsType
(
GoodsTypeEnum
.
EBOOK
.
getCode
());
ev
.
getEbook
().
setBrowseNum
(
50
);
ev
.
getEbook
().
setBrowseNum
(
50
);
ev
.
getEbook
().
setName
(
ev
.
getBook
().
getName
());
ev
.
getEbook
().
setBookType
(
1
);
ev
.
getEbook
().
setBookType
(
1
);
ev
.
getEbook
().
setPriceOption
(
PriceOptionEnum
.
STATUS_1
.
getCode
());
ev
.
getEbook
().
setPriceOption
(
PriceOptionEnum
.
STATUS_1
.
getCode
());
ebookservice
.
insert
(
ev
.
getEbook
());
ebookservice
.
insert
(
ev
.
getEbook
());
...
@@ -728,7 +665,6 @@ public class EbookController {
...
@@ -728,7 +665,6 @@ public class EbookController {
article
.
setUpdateTime
(
new
Date
());
article
.
setUpdateTime
(
new
Date
());
article
.
setStatus
(
0
);
article
.
setStatus
(
0
);
article
.
setBrowseNum
(
50
);
article
.
setBrowseNum
(
50
);
article
.
setNationsType
(
ev
.
getBook
().
getNationsType
());
article
.
setResourceType
(
AllResourceTypeEnum
.
ARTICLE
.
getCode
());
article
.
setResourceType
(
AllResourceTypeEnum
.
ARTICLE
.
getCode
());
article
.
setGoodsType
(
GoodsTypeEnum
.
ARTICLE
.
getCode
());
article
.
setGoodsType
(
GoodsTypeEnum
.
ARTICLE
.
getCode
());
article
.
setSalesNum
(
0
);
article
.
setSalesNum
(
0
);
...
@@ -907,7 +843,6 @@ public class EbookController {
...
@@ -907,7 +843,6 @@ public class EbookController {
ev
.
getEbook
().
setGoodsType
(
GoodsTypeEnum
.
EBOOK
.
getCode
());
ev
.
getEbook
().
setGoodsType
(
GoodsTypeEnum
.
EBOOK
.
getCode
());
ev
.
getEbook
().
setBrowseNum
(
50
);
ev
.
getEbook
().
setBrowseNum
(
50
);
ev
.
getEbook
().
setBookType
(
1
);
ev
.
getEbook
().
setBookType
(
1
);
ev
.
getEbook
().
setName
(
ev
.
getBook
().
getName
());
ebookservice
.
insert
(
ev
.
getEbook
());
ebookservice
.
insert
(
ev
.
getEbook
());
// 图书分类关联表
// 图书分类关联表
EbookDiyType
edt
=
new
EbookDiyType
();
EbookDiyType
edt
=
new
EbookDiyType
();
...
...
app/resource/src/main/java/com/zrqx/resource/bg/controller/projectlibrary/ProjectLibraryController.java
浏览文件 @
db48f7fa
...
@@ -47,7 +47,7 @@ public class ProjectLibraryController {
...
@@ -47,7 +47,7 @@ public class ProjectLibraryController {
@Autowired
@Autowired
private
RecommendResourceService
recommendResourceService
;
private
RecommendResourceService
recommendResourceService
;
@ApiOperation
(
value
=
"新增"
,
notes
=
"新增一个"
)
/*
@ApiOperation(value = "新增" , notes ="新增一个")
@PostMapping(value = "/save")
@PostMapping(value = "/save")
public CallBack<Boolean> save(@RequestBody SaveUpdateProjectLibraryForm form){
public CallBack<Boolean> save(@RequestBody SaveUpdateProjectLibraryForm form){
if(!service.saveOrUpdate(form)){
if(!service.saveOrUpdate(form)){
...
@@ -111,6 +111,6 @@ public class ProjectLibraryController {
...
@@ -111,6 +111,6 @@ public class ProjectLibraryController {
@GetMapping(value = "/page")
@GetMapping(value = "/page")
public CallBack<PageInfo<ProjectLibraryListVO>> page(QueryProjectLibraryForm form, PageParam pageParam){
public CallBack<PageInfo<ProjectLibraryListVO>> page(QueryProjectLibraryForm form, PageParam pageParam){
return CallBack.success(service.page(form, pageParam));
return CallBack.success(service.page(form, pageParam));
}
}
*/
}
}
app/resource/src/main/java/com/zrqx/resource/bg/controller/resourcelibrary/ResourceLibraryController.java
浏览文件 @
db48f7fa
...
@@ -282,7 +282,7 @@ public class ResourceLibraryController {
...
@@ -282,7 +282,7 @@ public class ResourceLibraryController {
audioIdList
=
resultMap
.
get
(
AllResourceTypeEnum
.
AUDIO
.
getCode
());
audioIdList
=
resultMap
.
get
(
AllResourceTypeEnum
.
AUDIO
.
getCode
());
imageIdList
=
resultMap
.
get
(
AllResourceTypeEnum
.
IMAGE
.
getCode
());
imageIdList
=
resultMap
.
get
(
AllResourceTypeEnum
.
IMAGE
.
getCode
());
annexIdList
=
resultMap
.
get
(
AllResourceTypeEnum
.
ANNEX
.
getCode
());
annexIdList
=
resultMap
.
get
(
AllResourceTypeEnum
.
ANNEX
.
getCode
());
projectIdList
=
resultMap
.
get
(
AllResourceTypeEnum
.
PROJECT
.
getCode
());
//
projectIdList = resultMap.get(AllResourceTypeEnum.PROJECT.getCode());
courseIdList
=
resultMap
.
get
(
AllResourceTypeEnum
.
COURSE
.
getCode
());
courseIdList
=
resultMap
.
get
(
AllResourceTypeEnum
.
COURSE
.
getCode
());
}
}
QueryResourceForPoPForm
f
=
new
QueryResourceForPoPForm
();
QueryResourceForPoPForm
f
=
new
QueryResourceForPoPForm
();
...
@@ -323,10 +323,10 @@ public class ResourceLibraryController {
...
@@ -323,10 +323,10 @@ public class ResourceLibraryController {
return
CallBack
.
success
(
authorLibraryService
.
pageByTitleAndDiyType
(
f
,
pageParam
));
return
CallBack
.
success
(
authorLibraryService
.
pageByTitleAndDiyType
(
f
,
pageParam
));
}
}
//专题库列表查询
//专题库列表查询
if
(
form
.
getResourceType
().
equals
(
AllResourceTypeEnum
.
PROJECT
.
getCode
())){
/*
if(form.getResourceType().equals(AllResourceTypeEnum.PROJECT.getCode())){
f.setIds(projectIdList);
f.setIds(projectIdList);
return CallBack.success(projectLibraryService.pageByTitleAndDiyType(f, pageParam));
return CallBack.success(projectLibraryService.pageByTitleAndDiyType(f, pageParam));
}
}
*/
//课程库列表查询
//课程库列表查询
if
(
form
.
getResourceType
().
equals
(
AllResourceTypeEnum
.
COURSE
.
getCode
())){
if
(
form
.
getResourceType
().
equals
(
AllResourceTypeEnum
.
COURSE
.
getCode
())){
f
.
setIds
(
courseIdList
);
f
.
setIds
(
courseIdList
);
...
@@ -376,7 +376,7 @@ public class ResourceLibraryController {
...
@@ -376,7 +376,7 @@ public class ResourceLibraryController {
audioIdList
=
resultMap
.
get
(
AllResourceTypeEnum
.
AUDIO
.
getCode
());
audioIdList
=
resultMap
.
get
(
AllResourceTypeEnum
.
AUDIO
.
getCode
());
imageIdList
=
resultMap
.
get
(
AllResourceTypeEnum
.
IMAGE
.
getCode
());
imageIdList
=
resultMap
.
get
(
AllResourceTypeEnum
.
IMAGE
.
getCode
());
annexIdList
=
resultMap
.
get
(
AllResourceTypeEnum
.
ANNEX
.
getCode
());
annexIdList
=
resultMap
.
get
(
AllResourceTypeEnum
.
ANNEX
.
getCode
());
projectIdList
=
resultMap
.
get
(
AllResourceTypeEnum
.
PROJECT
.
getCode
());
//
projectIdList = resultMap.get(AllResourceTypeEnum.PROJECT.getCode());
courseIdList
=
resultMap
.
get
(
AllResourceTypeEnum
.
COURSE
.
getCode
());
courseIdList
=
resultMap
.
get
(
AllResourceTypeEnum
.
COURSE
.
getCode
());
}
}
...
@@ -418,10 +418,10 @@ public class ResourceLibraryController {
...
@@ -418,10 +418,10 @@ public class ResourceLibraryController {
return
CallBack
.
success
(
authorLibraryService
.
pageByTitleAndDiyType
(
f
,
pageParam
));
return
CallBack
.
success
(
authorLibraryService
.
pageByTitleAndDiyType
(
f
,
pageParam
));
}
}
//专题库列表查询
//专题库列表查询
if
(
form
.
getResourceType
().
equals
(
AllResourceTypeEnum
.
PROJECT
.
getCode
())){
/*
if(form.getResourceType().equals(AllResourceTypeEnum.PROJECT.getCode())){
f.setIds(projectIdList);
f.setIds(projectIdList);
return CallBack.success(projectLibraryService.pageByTitleAndDiyType(f, pageParam));
return CallBack.success(projectLibraryService.pageByTitleAndDiyType(f, pageParam));
}
}
*/
//课程库列表查询
//课程库列表查询
if
(
form
.
getResourceType
().
equals
(
AllResourceTypeEnum
.
COURSE
.
getCode
())){
if
(
form
.
getResourceType
().
equals
(
AllResourceTypeEnum
.
COURSE
.
getCode
())){
f
.
setIds
(
courseIdList
);
f
.
setIds
(
courseIdList
);
...
@@ -460,7 +460,7 @@ public class ResourceLibraryController {
...
@@ -460,7 +460,7 @@ public class ResourceLibraryController {
audioIdList
=
resultMap
.
get
(
AllResourceTypeEnum
.
AUDIO
.
getCode
());
audioIdList
=
resultMap
.
get
(
AllResourceTypeEnum
.
AUDIO
.
getCode
());
imageIdList
=
resultMap
.
get
(
AllResourceTypeEnum
.
IMAGE
.
getCode
());
imageIdList
=
resultMap
.
get
(
AllResourceTypeEnum
.
IMAGE
.
getCode
());
annexIdList
=
resultMap
.
get
(
AllResourceTypeEnum
.
ANNEX
.
getCode
());
annexIdList
=
resultMap
.
get
(
AllResourceTypeEnum
.
ANNEX
.
getCode
());
projectIdList
=
resultMap
.
get
(
AllResourceTypeEnum
.
PROJECT
.
getCode
());
//
projectIdList = resultMap.get(AllResourceTypeEnum.PROJECT.getCode());
courseIdList
=
resultMap
.
get
(
AllResourceTypeEnum
.
COURSE
.
getCode
());
courseIdList
=
resultMap
.
get
(
AllResourceTypeEnum
.
COURSE
.
getCode
());
}
}
QueryResourceForPoPForm
f
=
new
QueryResourceForPoPForm
();
QueryResourceForPoPForm
f
=
new
QueryResourceForPoPForm
();
...
@@ -501,10 +501,10 @@ public class ResourceLibraryController {
...
@@ -501,10 +501,10 @@ public class ResourceLibraryController {
return
CallBack
.
success
(
authorLibraryService
.
pageByTitleAndDiyType
(
f
,
pageParam
));
return
CallBack
.
success
(
authorLibraryService
.
pageByTitleAndDiyType
(
f
,
pageParam
));
}
}
//专题库列表查询
//专题库列表查询
if
(
form
.
getResourceType
().
equals
(
AllResourceTypeEnum
.
PROJECT
.
getCode
())){
/*
if(form.getResourceType().equals(AllResourceTypeEnum.PROJECT.getCode())){
f.setIds(projectIdList);
f.setIds(projectIdList);
return CallBack.success(projectLibraryService.pageByTitleAndDiyType(f, pageParam));
return CallBack.success(projectLibraryService.pageByTitleAndDiyType(f, pageParam));
}
}
*/
//课程库列表查询
//课程库列表查询
if
(
form
.
getResourceType
().
equals
(
AllResourceTypeEnum
.
COURSE
.
getCode
())){
if
(
form
.
getResourceType
().
equals
(
AllResourceTypeEnum
.
COURSE
.
getCode
())){
f
.
setIds
(
courseIdList
);
f
.
setIds
(
courseIdList
);
...
@@ -941,7 +941,7 @@ public class ResourceLibraryController {
...
@@ -941,7 +941,7 @@ public class ResourceLibraryController {
reslist
.
add
(
resultMap
);
reslist
.
add
(
resultMap
);
}
}
//专题
//专题
if
(
solrDocument
.
get
(
"resourceType"
).
equals
(
AllResourceTypeEnum
.
PROJECT
.
getCode
())){
/*
if(solrDocument.get("resourceType").equals(AllResourceTypeEnum.PROJECT.getCode())){
//存储每个高亮处理后的结果
//存储每个高亮处理后的结果
Map<String, Object> resultMap = new HashMap<String, Object>();
Map<String, Object> resultMap = new HashMap<String, Object>();
//查询结果的id,存入map
//查询结果的id,存入map
...
@@ -954,7 +954,7 @@ public class ResourceLibraryController {
...
@@ -954,7 +954,7 @@ public class ResourceLibraryController {
}
}
resultMap.put("uploadTime",solrDocument.get("uploadTime"));
resultMap.put("uploadTime",solrDocument.get("uploadTime"));
reslist.add(resultMap);
reslist.add(resultMap);
}
}
*/
//课程
//课程
if
(
solrDocument
.
get
(
"resourceType"
).
equals
(
AllResourceTypeEnum
.
COURSE
.
getCode
())){
if
(
solrDocument
.
get
(
"resourceType"
).
equals
(
AllResourceTypeEnum
.
COURSE
.
getCode
())){
//存储每个高亮处理后的结果
//存储每个高亮处理后的结果
...
...
app/resource/src/main/java/com/zrqx/resource/bg/controller/task/DatabaseController.java
浏览文件 @
db48f7fa
...
@@ -315,7 +315,7 @@ public class DatabaseController {
...
@@ -315,7 +315,7 @@ public class DatabaseController {
}
}
// pdf
// pdf
if
(
resourceType
==
null
||
resourceType
.
contains
(
AllResourceTypeEnum
.
PDF
.
getCode
().
toString
()))
{
/*
if (resourceType == null || resourceType.contains(AllResourceTypeEnum.PDF.getCode().toString())) {
StringBuffer ids = new StringBuffer();
StringBuffer ids = new StringBuffer();
try (Connection conn = DriverManager.getConnection(url, userName, password)) {
try (Connection conn = DriverManager.getConnection(url, userName, password)) {
if (codes.contains(",")) {
if (codes.contains(",")) {
...
@@ -363,7 +363,7 @@ public class DatabaseController {
...
@@ -363,7 +363,7 @@ public class DatabaseController {
process.waitFor();
process.waitFor();
}
}
}
}
*/
// 视频
// 视频
if
(
resourceType
==
null
||
resourceType
.
contains
(
AllResourceTypeEnum
.
VIDEO
.
getCode
().
toString
()))
{
if
(
resourceType
==
null
||
resourceType
.
contains
(
AllResourceTypeEnum
.
VIDEO
.
getCode
().
toString
()))
{
StringBuffer
ids
=
new
StringBuffer
();
StringBuffer
ids
=
new
StringBuffer
();
...
@@ -729,7 +729,7 @@ public class DatabaseController {
...
@@ -729,7 +729,7 @@ public class DatabaseController {
}
}
}
}
// pdf
// pdf
if
(
resourceType
==
null
||
resourceType
.
contains
(
AllResourceTypeEnum
.
PDF
.
getCode
().
toString
()))
{
/*
if (resourceType == null || resourceType.contains(AllResourceTypeEnum.PDF.getCode().toString())) {
try (Connection conn = DriverManager.getConnection(url, userName, password)) {
try (Connection conn = DriverManager.getConnection(url, userName, password)) {
try (PreparedStatement ps = conn.prepareStatement(
try (PreparedStatement ps = conn.prepareStatement(
"select r.pdf from res_pdf_library r inner join res_pdf_library_diy_type rt on r.id =rt.plid where rt.code like '"
"select r.pdf from res_pdf_library r inner join res_pdf_library_diy_type rt on r.id =rt.plid where rt.code like '"
...
@@ -743,7 +743,7 @@ public class DatabaseController {
...
@@ -743,7 +743,7 @@ public class DatabaseController {
}
}
}
}
}
}
*/
// 视频
// 视频
if
(
resourceType
==
null
||
resourceType
.
contains
(
AllResourceTypeEnum
.
VIDEO
.
getCode
().
toString
()))
{
if
(
resourceType
==
null
||
resourceType
.
contains
(
AllResourceTypeEnum
.
VIDEO
.
getCode
().
toString
()))
{
try
(
Connection
conn
=
DriverManager
.
getConnection
(
url
,
userName
,
password
))
{
try
(
Connection
conn
=
DriverManager
.
getConnection
(
url
,
userName
,
password
))
{
...
...
app/resource/src/main/java/com/zrqx/resource/bg/mapper/ebook/EbookMapper.java
浏览文件 @
db48f7fa
...
@@ -28,20 +28,20 @@ public interface EbookMapper extends BaseMapper<Ebook>{
...
@@ -28,20 +28,20 @@ public interface EbookMapper extends BaseMapper<Ebook>{
*/
*/
@Select
(
"<script>"
@Select
(
"<script>"
+
"SELECT "
+
"SELECT "
+
" bb.id,bb.name,bb.author,bb.isbn,
bb.copyrightTerm,
"
+
" bb.id,bb.name,bb.author,bb.isbn, "
+
" be.realprice,be.
entityRealPrice,be.
uploadTime,be.updateTime,be.bookStatus "
+
" be.realprice,be.uploadTime,be.updateTime,be.bookStatus "
+
" FROM res_book bb "
+
" FROM res_book bb "
+
" LEFT JOIN res_ebook be ON bb.id = be.id "
+
" LEFT JOIN res_ebook be ON bb.id = be.id "
+
" LEFT JOIN res_ebook_diy_type bdt ON be.id = bdt.ebookid"
+
" LEFT JOIN res_ebook_diy_type bdt ON be.id = bdt.ebookid"
+
" WHERE 1 = 1 "
+
" WHERE 1 = 1 "
+
"<if test='form.option==1'>"
+
"<if test='form.option==1'>"
+
" AND
bb.author is null
"
+
" AND
(bb.author is null or bb.author = '')
"
+
"</if>"
+
"</if>"
+
"<if test='form.option==2'>"
+
"<if test='form.option==2'>"
+
" AND
be.bookCover is null
"
+
" AND
(be.img is null or be.img = '')
"
+
"</if>"
+
"</if>"
+
"<if test='form.option==3'>"
+
"<if test='form.option==3'>"
+
" AND
be.summary is null
"
+
" AND
(be.synopsis is null or be.synopsis = '')
"
+
"</if>"
+
"</if>"
+
"<if test='form.option==4'>"
+
"<if test='form.option==4'>"
+
" AND be.realPrice is null "
+
" AND be.realPrice is null "
...
...
app/resource/src/main/java/com/zrqx/resource/bg/service/ResourceRelationServiceImpl.java
浏览文件 @
db48f7fa
...
@@ -17,7 +17,7 @@ import com.zrqx.resource.bg.mapper.articlelibrary.ArticleLibraryMapper;
...
@@ -17,7 +17,7 @@ import com.zrqx.resource.bg.mapper.articlelibrary.ArticleLibraryMapper;
import
com.zrqx.resource.bg.mapper.audiolibrary.AudioLibraryMapper
;
import
com.zrqx.resource.bg.mapper.audiolibrary.AudioLibraryMapper
;
import
com.zrqx.resource.bg.mapper.authorLibrary.AuthorLibraryMapper
;
import
com.zrqx.resource.bg.mapper.authorLibrary.AuthorLibraryMapper
;
import
com.zrqx.resource.bg.mapper.courselibrary.CourseLibraryMapper
;
import
com.zrqx.resource.bg.mapper.courselibrary.CourseLibraryMapper
;
import
com.zrqx.resource.bg.mapper.ebook.
Eb
ookMapper
;
import
com.zrqx.resource.bg.mapper.ebook.
B
ookMapper
;
import
com.zrqx.resource.bg.mapper.imagelibrary.ImageLibraryMapper
;
import
com.zrqx.resource.bg.mapper.imagelibrary.ImageLibraryMapper
;
import
com.zrqx.resource.bg.mapper.projectlibrary.ProjectLibraryMapper
;
import
com.zrqx.resource.bg.mapper.projectlibrary.ProjectLibraryMapper
;
import
com.zrqx.resource.bg.mapper.videolibrary.VideoLibraryMapper
;
import
com.zrqx.resource.bg.mapper.videolibrary.VideoLibraryMapper
;
...
@@ -27,9 +27,8 @@ import com.zrqx.resource.commons.model.articlelibrary.ArticleLibrary;
...
@@ -27,9 +27,8 @@ import com.zrqx.resource.commons.model.articlelibrary.ArticleLibrary;
import
com.zrqx.resource.commons.model.audiolibrary.AudioLibrary
;
import
com.zrqx.resource.commons.model.audiolibrary.AudioLibrary
;
import
com.zrqx.resource.commons.model.authorLibrary.AuthorLibrary
;
import
com.zrqx.resource.commons.model.authorLibrary.AuthorLibrary
;
import
com.zrqx.resource.commons.model.courcelibrary.CourseLibrary
;
import
com.zrqx.resource.commons.model.courcelibrary.CourseLibrary
;
import
com.zrqx.resource.commons.model.ebook.
Eb
ook
;
import
com.zrqx.resource.commons.model.ebook.
B
ook
;
import
com.zrqx.resource.commons.model.imagelibrary.ImageLibrary
;
import
com.zrqx.resource.commons.model.imagelibrary.ImageLibrary
;
import
com.zrqx.resource.commons.model.projectlibrary.ProjectLibrary
;
import
com.zrqx.resource.commons.model.resourcerelation.ResourceRelation
;
import
com.zrqx.resource.commons.model.resourcerelation.ResourceRelation
;
import
com.zrqx.resource.commons.model.videolibrary.VideoLibrary
;
import
com.zrqx.resource.commons.model.videolibrary.VideoLibrary
;
import
com.zrqx.resource.commons.vo.bg.ResourceRelationVo
;
import
com.zrqx.resource.commons.vo.bg.ResourceRelationVo
;
...
@@ -55,7 +54,7 @@ public class ResourceRelationServiceImpl extends BaseServiceImpl<ResourceRelatio
...
@@ -55,7 +54,7 @@ public class ResourceRelationServiceImpl extends BaseServiceImpl<ResourceRelatio
@Autowired
@Autowired
private
CourseLibraryMapper
courseLibraryMapper
;
private
CourseLibraryMapper
courseLibraryMapper
;
@Autowired
@Autowired
private
EbookMapper
e
bookMapper
;
private
BookMapper
bookMapper
;
@Override
@Override
public
BaseMapper
<
ResourceRelation
>
getMapper
()
{
public
BaseMapper
<
ResourceRelation
>
getMapper
()
{
...
@@ -66,7 +65,7 @@ public class ResourceRelationServiceImpl extends BaseServiceImpl<ResourceRelatio
...
@@ -66,7 +65,7 @@ public class ResourceRelationServiceImpl extends BaseServiceImpl<ResourceRelatio
list
.
forEach
(
e
->
{
list
.
forEach
(
e
->
{
if
(
e
.
getResourceType
()
!=
null
)
{
if
(
e
.
getResourceType
()
!=
null
)
{
if
(
e
.
getResourceType
().
equals
(
AllResourceTypeEnum
.
BOOK
.
getCode
()))
{
if
(
e
.
getResourceType
().
equals
(
AllResourceTypeEnum
.
BOOK
.
getCode
()))
{
Ebook
vl
=
e
bookMapper
.
selectByPrimaryKey
(
e
.
getResourceId
());
Book
vl
=
bookMapper
.
selectByPrimaryKey
(
e
.
getResourceId
());
if
(
vl
!=
null
)
{
if
(
vl
!=
null
)
{
e
.
setName
(
vl
.
getName
());
e
.
setName
(
vl
.
getName
());
e
.
setResType_zh
(
AllResourceTypeEnum
.
BOOK
.
getName
());
e
.
setResType_zh
(
AllResourceTypeEnum
.
BOOK
.
getName
());
...
@@ -114,13 +113,6 @@ public class ResourceRelationServiceImpl extends BaseServiceImpl<ResourceRelatio
...
@@ -114,13 +113,6 @@ public class ResourceRelationServiceImpl extends BaseServiceImpl<ResourceRelatio
e
.
setResType_zh
(
AllResourceTypeEnum
.
AUTHOR
.
getName
());
e
.
setResType_zh
(
AllResourceTypeEnum
.
AUTHOR
.
getName
());
}
}
}
}
if
(
e
.
getResourceType
().
equals
(
AllResourceTypeEnum
.
PROJECT
.
getCode
()))
{
ProjectLibrary
cl
=
projectLibraryMapper
.
selectByPrimaryKey
(
e
.
getResourceId
());
if
(
cl
!=
null
)
{
e
.
setName
(
cl
.
getName
());
e
.
setResType_zh
(
AllResourceTypeEnum
.
PROJECT
.
getName
());
}
}
if
(
e
.
getResourceType
().
equals
(
AllResourceTypeEnum
.
COURSE
.
getCode
()))
{
if
(
e
.
getResourceType
().
equals
(
AllResourceTypeEnum
.
COURSE
.
getCode
()))
{
CourseLibrary
cl
=
courseLibraryMapper
.
selectByPrimaryKey
(
e
.
getResourceId
());
CourseLibrary
cl
=
courseLibraryMapper
.
selectByPrimaryKey
(
e
.
getResourceId
());
if
(
cl
!=
null
)
{
if
(
cl
!=
null
)
{
...
...
app/resource/src/main/java/com/zrqx/resource/bg/service/ebook/BookService.java
浏览文件 @
db48f7fa
package
com
.
zrqx
.
resource
.
bg
.
service
.
ebook
;
package
com
.
zrqx
.
resource
.
bg
.
service
.
ebook
;
import
java.util.List
;
import
com.zrqx.core.service.BaseService
;
import
com.zrqx.core.service.BaseService
;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.util.page.PageParam
;
...
@@ -14,4 +16,6 @@ public interface BookService extends BaseService<Book, String> {
...
@@ -14,4 +16,6 @@ public interface BookService extends BaseService<Book, String> {
PageInfo
<
Book
>
queryByIsbn
(
String
isbn
,
String
name
,
String
author
,
PageInfo
<
Book
>
queryByIsbn
(
String
isbn
,
String
name
,
String
author
,
String
uploadTime
,
PageParam
pageParam
);
String
uploadTime
,
PageParam
pageParam
);
boolean
batchDelete
(
List
<
String
>
ids
);
}
}
app/resource/src/main/java/com/zrqx/resource/bg/service/ebook/EbookService.java
浏览文件 @
db48f7fa
...
@@ -37,7 +37,13 @@ public interface EbookService extends BaseService<Ebook, String>{
...
@@ -37,7 +37,13 @@ public interface EbookService extends BaseService<Ebook, String>{
*/
*/
boolean
batchInsert
(
SaveEbookForm
form
);
boolean
batchInsert
(
SaveEbookForm
form
);
/**
/**
* 批量删除
* @param ids
* @return
* @author ycw
* @date: 2020年4月21日 下午5:27:24
*/
boolean
batchDelete
(
List
<
String
>
ids
);
/**
/**
* 后台分页查询
* 后台分页查询
* @param form
* @param form
...
...
app/resource/src/main/java/com/zrqx/resource/bg/service/ebook/EbookServiceImpl.java
浏览文件 @
db48f7fa
...
@@ -11,6 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -11,6 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
com.zrqx.core.client.order.bg.OrderClient
;
import
com.zrqx.core.client.vo.ImportLabelVo
;
import
com.zrqx.core.client.vo.ImportLabelVo
;
import
com.zrqx.core.enums.AllResourceTypeEnum
;
import
com.zrqx.core.enums.AllResourceTypeEnum
;
import
com.zrqx.core.enums.GoodsTypeEnum
;
import
com.zrqx.core.enums.GoodsTypeEnum
;
...
@@ -25,22 +26,37 @@ import com.zrqx.core.util.excelutil.ImportResult;
...
@@ -25,22 +26,37 @@ import com.zrqx.core.util.excelutil.ImportResult;
import
com.zrqx.core.util.excelutil.ImportUtil
;
import
com.zrqx.core.util.excelutil.ImportUtil
;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.resource.bg.mapper.ResourceRelationMapper
;
import
com.zrqx.resource.bg.mapper.articlelibrary.ArticleLibraryMapper
;
import
com.zrqx.resource.bg.mapper.articlelibrary.ChapterLibraryMapper
;
import
com.zrqx.resource.bg.mapper.ebook.BookMapper
;
import
com.zrqx.resource.bg.mapper.ebook.BookMapper
;
import
com.zrqx.resource.bg.mapper.ebook.EbookDiyTypeMapper
;
import
com.zrqx.resource.bg.mapper.ebook.EbookDiyTypeMapper
;
import
com.zrqx.resource.bg.mapper.ebook.EbookLabelContentDiyTypeMapper
;
import
com.zrqx.resource.bg.mapper.ebook.EbookLabelContentDiyTypeMapper
;
import
com.zrqx.resource.bg.mapper.ebook.EbookMapper
;
import
com.zrqx.resource.bg.mapper.ebook.EbookMapper
;
import
com.zrqx.resource.bg.mapper.marketing.PromotionContentMapper
;
import
com.zrqx.resource.bg.mapper.membercollection.MemberCollectionMapper
;
import
com.zrqx.resource.bg.mapper.recommend.RecommendResourceMapper
;
import
com.zrqx.resource.bg.mapper.record.RecordMapper
;
import
com.zrqx.resource.bg.mapper.shoppingcart.ShoppingCartMapper
;
import
com.zrqx.resource.commons.form.bg.QueryResourceForPoPForm
;
import
com.zrqx.resource.commons.form.bg.QueryResourceForPoPForm
;
import
com.zrqx.resource.commons.form.bg.ebook.QueryEbookInfoForm
;
import
com.zrqx.resource.commons.form.bg.ebook.QueryEbookInfoForm
;
import
com.zrqx.resource.commons.form.bg.ebook.SaveEbookForm
;
import
com.zrqx.resource.commons.form.bg.ebook.SaveEbookForm
;
import
com.zrqx.resource.commons.form.bg.ebook.SaveUpdateEbookForm
;
import
com.zrqx.resource.commons.form.bg.ebook.SaveUpdateEbookForm
;
import
com.zrqx.resource.commons.model.articlelibrary.ChapterLibrary
;
import
com.zrqx.resource.commons.model.ebook.Book
;
import
com.zrqx.resource.commons.model.ebook.Book
;
import
com.zrqx.resource.commons.model.ebook.Ebook
;
import
com.zrqx.resource.commons.model.ebook.Ebook
;
import
com.zrqx.resource.commons.model.ebook.EbookDiyType
;
import
com.zrqx.resource.commons.model.ebook.EbookDiyType
;
import
com.zrqx.resource.commons.model.ebook.EbookLabelContentDiyType
;
import
com.zrqx.resource.commons.model.ebook.EbookLabelContentDiyType
;
import
com.zrqx.resource.commons.model.membercollection.MemberCollection
;
import
com.zrqx.resource.commons.model.record.Record
;
import
com.zrqx.resource.commons.model.resourcerelation.ResourceRelation
;
import
com.zrqx.resource.commons.model.shoppingcart.ShoppingCart
;
import
com.zrqx.resource.commons.vo.bg.ebook.EbookListVO
;
import
com.zrqx.resource.commons.vo.bg.ebook.EbookListVO
;
import
com.zrqx.resource.commons.vo.bg.ebook.ExcelBookExportVo
;
import
com.zrqx.resource.commons.vo.bg.ebook.ExcelBookExportVo
;
import
com.zrqx.resource.commons.vo.bg.ebook.ExcelEbookImportVo
;
import
com.zrqx.resource.commons.vo.bg.ebook.ExcelEbookImportVo
;
import
tk.mybatis.mapper.entity.Example
;
/**
/**
* 电子书-serviceimpl
* 电子书-serviceimpl
*
*
...
@@ -59,6 +75,24 @@ public class EbookServiceImpl extends BaseServiceImpl<Ebook, String> implements
...
@@ -59,6 +75,24 @@ public class EbookServiceImpl extends BaseServiceImpl<Ebook, String> implements
@Autowired
@Autowired
private
EbookLabelContentDiyTypeMapper
ebookLabelDiyTypeMapper
;
private
EbookLabelContentDiyTypeMapper
ebookLabelDiyTypeMapper
;
@Autowired
@Autowired
private
ChapterLibraryMapper
chapterLibraryMapper
;
@Autowired
private
RecommendResourceMapper
recommendResourceMapper
;
@Autowired
private
PromotionContentMapper
promotionContentMapper
;
@Autowired
private
ResourceRelationMapper
resourceRelationMapper
;
@Autowired
private
ArticleLibraryMapper
articleLibraryMapper
;
@Autowired
private
OrderClient
orderClient
;
@Autowired
private
MemberCollectionMapper
memberCollectionMapper
;
@Autowired
private
RecordMapper
recordMapper
;
@Autowired
private
ShoppingCartMapper
shoppingCartMapper
;
@Autowired
private
ImportUtil
importUtil
;
private
ImportUtil
importUtil
;
@Override
@Override
...
@@ -113,52 +147,33 @@ public class EbookServiceImpl extends BaseServiceImpl<Ebook, String> implements
...
@@ -113,52 +147,33 @@ public class EbookServiceImpl extends BaseServiceImpl<Ebook, String> implements
if
(
PriceOptionEnum
.
STATUS_0
.
getCode
().
equals
(
ebook
.
getPriceOption
())){
if
(
PriceOptionEnum
.
STATUS_0
.
getCode
().
equals
(
ebook
.
getPriceOption
())){
ebook
.
setRealPrice
(
new
BigDecimal
(
0
));
ebook
.
setRealPrice
(
new
BigDecimal
(
0
));
}
}
// 默认电子书
Integer
bookType
=
1
;
ebook
.
setBookType
(
1
);
if
(
book
.
getId
()
==
null
)
{
if
(
book
.
getId
()
==
null
)
{
Integer
bookType
=
ebook
.
getBookType
();
if
((
bookType
.
equals
(
0
)
||
bookType
.
equals
(
1
))
&&
((
StringUtils
.
isBlank
(
ebook
.
getEpubFile
()))
&&
(
StringUtils
.
isBlank
(
ebook
.
getPdfFile
())))){
String
epubFile
=
ebook
.
getEpubFile
();
String
pdfFile
=
ebook
.
getPdfFile
();
if
((
bookType
.
equals
(
0
)
||
bookType
.
equals
(
1
))
&&
((
epubFile
==
null
)
&&
(
pdfFile
==
null
))){
throw
new
BaseException
(
"请添加相关PDF资源"
);
throw
new
BaseException
(
"请添加相关PDF资源"
);
}
}
book
.
setResourceType
(
AllResourceTypeEnum
.
BOOK
.
getCode
());
book
.
setResourceType
(
AllResourceTypeEnum
.
BOOK
.
getCode
());
book
.
setSalesNum
(
0
);
book
.
setSalesNum
(
0
);
bookMapper
.
insertSelective
(
book
);
bookMapper
.
insertSelective
(
book
);
ebook
.
setId
(
book
.
getId
());
ebook
.
setId
(
book
.
getId
());
ebook
.
setBookStatus
(
EbookStatusEnum
.
_5
.
getCode
());
// 默认已下架
ebook
.
setUploadTime
(
new
Date
());
ebook
.
setUploadTime
(
new
Date
());
ebook
.
setOffShelvesTime
(
new
Date
());
ebook
.
setBrowseNum
(
50
);
//浏览量
ebook
.
setBrowseNum
(
50
);
//浏览量
ebook
.
setGoodsType
(
GoodsTypeEnum
.
EBOOK
.
getCode
());
ebook
.
setGoodsType
(
GoodsTypeEnum
.
EBOOK
.
getCode
());
ebookMapper
.
insertSelective
(
ebook
);
ebookMapper
.
insertSelective
(
ebook
);
}
else
{
}
else
{
Ebook
e
=
ebookMapper
.
selectByPrimaryKey
(
book
.
getId
());
//Ebook e = ebookMapper.selectByPrimaryKey(book.getId());
Integer
bookType
=
ebook
.
getBookType
();
if
((
bookType
.
equals
(
0
)
||
bookType
.
equals
(
1
))
&&
((
StringUtils
.
isBlank
(
ebook
.
getEpubFile
()))
&&
(
StringUtils
.
isBlank
(
ebook
.
getPdfFile
())))){
String
epubFile
=
e
.
getEpubFile
();
String
pdfFile
=
e
.
getPdfFile
();
if
((
bookType
.
equals
(
0
)
||
bookType
.
equals
(
1
))
&&
((
epubFile
==
null
)
&&
(
pdfFile
==
null
))){
throw
new
BaseException
(
"请添加相关epub资源或者PDF资源"
);
throw
new
BaseException
(
"请添加相关epub资源或者PDF资源"
);
}
}
bookMapper
.
updateByPrimaryKeySelective
(
book
);
bookMapper
.
updateByPrimaryKeySelective
(
book
);
ebook
.
setUpdateTime
(
new
Date
());
ebook
.
setUpdateTime
(
new
Date
());
ebookMapper
.
updateByPrimaryKeySelective
(
ebook
);
ebookMapper
.
updateByPrimaryKeySelective
(
ebook
);
if
(
form
.
getPrice
()
==
null
){
// 修改其他信息
Ebook
a
=
ebookMapper
.
selectByPrimaryKey
(
ebook
.
getId
());
this
.
updateOtherInfo
(
form
);
a
.
setPrice
(
form
.
getPrice
());
ebookMapper
.
updateByPrimaryKey
(
a
);
}
if
(
form
.
getEntityPrice
()
==
null
){
Ebook
a
=
ebookMapper
.
selectByPrimaryKey
(
ebook
.
getId
());
a
.
setEntityPrice
(
form
.
getEntityPrice
());
ebookMapper
.
updateByPrimaryKey
(
a
);
}
if
(
form
.
getRealPrice
()
==
null
){
Ebook
a
=
ebookMapper
.
selectByPrimaryKey
(
ebook
.
getId
());
a
.
setRealPrice
(
form
.
getRealPrice
());
ebookMapper
.
updateByPrimaryKey
(
a
);
}
if
(
form
.
getEntityRealPrice
()
==
null
){
Ebook
a
=
ebookMapper
.
selectByPrimaryKey
(
ebook
.
getId
());
a
.
setEntityRealPrice
(
form
.
getEntityRealPrice
());
ebookMapper
.
updateByPrimaryKey
(
a
);
}
// 删除原有关系表中的关系
// 删除原有关系表中的关系
EbookDiyType
ebdt
=
new
EbookDiyType
();
EbookDiyType
ebdt
=
new
EbookDiyType
();
ebdt
.
setEbookId
(
ebook
.
getId
());
ebdt
.
setEbookId
(
ebook
.
getId
());
...
@@ -187,14 +202,67 @@ public class EbookServiceImpl extends BaseServiceImpl<Ebook, String> implements
...
@@ -187,14 +202,67 @@ public class EbookServiceImpl extends BaseServiceImpl<Ebook, String> implements
@Override
@Override
public
boolean
batchInsert
(
SaveEbookForm
form
)
{
public
boolean
batchInsert
(
SaveEbookForm
form
)
{
return
false
;
// TODO Auto-generated method stub
return
false
;
}
@Override
public
boolean
batchDelete
(
List
<
String
>
ids
)
{
Example
example
=
new
Example
(
Ebook
.
class
);
example
.
createCriteria
().
andIn
(
"id"
,
ids
);
ebookMapper
.
deleteByExample
(
example
);
example
=
new
Example
(
Book
.
class
);
example
.
createCriteria
().
andIn
(
"id"
,
ids
);
bookMapper
.
deleteByExample
(
example
);
// ----目录
example
=
new
Example
(
ChapterLibrary
.
class
);
example
.
createCriteria
().
andIn
(
"bookid"
,
ids
);
chapterLibraryMapper
.
deleteByExample
(
example
);
// ----自定义分类
example
=
new
Example
(
EbookDiyType
.
class
);
example
.
createCriteria
().
andIn
(
"ebookId"
,
ids
);
ebookDiyTypeMapper
.
deleteByExample
(
example
);
// ----自定义标签
example
=
new
Example
(
EbookLabelContentDiyType
.
class
);
example
.
createCriteria
().
andIn
(
"ebookId"
,
ids
);
ebookLabelDiyTypeMapper
.
deleteByExample
(
example
);
// 这里需要级联删除其他接口关联资源
// ----推荐位内容
recommendResourceMapper
.
delectByResourceIds
(
ids
,
AllResourceTypeEnum
.
BOOK
.
getCode
());
// ----促销活动
promotionContentMapper
.
delectByResourceIds
(
ids
,
AllResourceTypeEnum
.
BOOK
.
getCode
());
// ----关联资源
example
=
new
Example
(
ResourceRelation
.
class
);
example
.
createCriteria
().
andIn
(
"objectId"
,
ids
).
orIn
(
"resourceId"
,
ids
);
resourceRelationMapper
.
deleteByExample
(
example
);
//删除资源订单相关信息
orderClient
.
deleteOrder
(
ids
);
//删除资源收藏相关信息
example
=
new
Example
(
MemberCollection
.
class
);
example
.
createCriteria
().
andIn
(
"objectId"
,
ids
);
memberCollectionMapper
.
deleteByExample
(
example
);
//删除资源购物车相关信息
example
=
new
Example
(
ShoppingCart
.
class
);
example
.
createCriteria
().
andIn
(
"goodsId"
,
ids
);
shoppingCartMapper
.
deleteByExample
(
example
);
//删除资源浏览记录相关信息
example
=
new
Example
(
Record
.
class
);
example
.
createCriteria
().
andIn
(
"goodsId"
,
ids
);
recordMapper
.
deleteByExample
(
example
);
return
true
;
}
}
@Override
@Override
public
PageInfo
<
EbookListVO
>
page
(
QueryEbookInfoForm
form
,
PageParam
pageParam
)
{
public
PageInfo
<
EbookListVO
>
page
(
QueryEbookInfoForm
form
,
PageParam
pageParam
)
{
if
(
null
!=
pageParam
&&
StringUtils
.
isBlank
(
pageParam
.
getOrderBy
()))
{
pageParam
.
setOrderBy
(
"uploadTime desc"
);
}
startPage
(
pageParam
);
startPage
(
pageParam
);
List
<
EbookListVO
>
list
=
ebookMapper
.
page
(
form
);
List
<
EbookListVO
>
list
=
ebookMapper
.
page
(
form
);
list
.
stream
().
forEach
(
li
->
li
.
setStatus_zh
(
EbookStatusEnum
.
getName
(
Integer
.
parseInt
(
li
.
getBookStatus
()))));
return
new
PageInfo
<
EbookListVO
>(
list
);
return
new
PageInfo
<
EbookListVO
>(
list
);
}
}
...
@@ -219,6 +287,31 @@ public class EbookServiceImpl extends BaseServiceImpl<Ebook, String> implements
...
@@ -219,6 +287,31 @@ public class EbookServiceImpl extends BaseServiceImpl<Ebook, String> implements
return
1
;
return
1
;
}
}
/**
* 更新信息
* @param form
* @author ycw
* @date: 2020年4月21日 下午4:25:45
*/
private
void
updateOtherInfo
(
SaveUpdateEbookForm
form
){
Ebook
eb
=
ebookMapper
.
selectByPrimaryKey
(
form
.
getId
());
Book
b
=
bookMapper
.
selectByPrimaryKey
(
form
.
getId
());
if
(
form
.
getPrice
()
==
null
){
eb
.
setPrice
(
null
);
}
if
(
form
.
getRealPrice
()
==
null
){
eb
.
setRealPrice
(
null
);
}
if
(
StringUtils
.
isBlank
(
form
.
getAuthorId
())){
b
.
setAuthorId
(
null
);
}
if
(
StringUtils
.
isBlank
(
form
.
getTranslatorId
())){
b
.
setTranslatorId
(
null
);
}
ebookMapper
.
updateByPrimaryKey
(
eb
);
bookMapper
.
updateByPrimaryKey
(
b
);
}
/**
/**
* 导入元数据
* 导入元数据
...
...
app/resource/src/main/java/com/zrqx/resource/bg/service/projectlibrary/ProjectLibrarySerivceImpl.java
浏览文件 @
db48f7fa
...
@@ -47,7 +47,7 @@ public class ProjectLibrarySerivceImpl extends BaseServiceImpl<ProjectLibrary,St
...
@@ -47,7 +47,7 @@ public class ProjectLibrarySerivceImpl extends BaseServiceImpl<ProjectLibrary,St
/**
/**
* 保存或修改专题库
* 保存或修改专题库
*/
*/
@Override
/*
@Override
public boolean saveOrUpdate(SaveUpdateProjectLibraryForm form) {
public boolean saveOrUpdate(SaveUpdateProjectLibraryForm form) {
ProjectLibrary entity = new ProjectLibrary();
ProjectLibrary entity = new ProjectLibrary();
if(StringUtils.isNotBlank(form.getAuthorNameAndId())){
if(StringUtils.isNotBlank(form.getAuthorNameAndId())){
...
@@ -73,13 +73,13 @@ public class ProjectLibrarySerivceImpl extends BaseServiceImpl<ProjectLibrary,St
...
@@ -73,13 +73,13 @@ public class ProjectLibrarySerivceImpl extends BaseServiceImpl<ProjectLibrary,St
return true;
return true;
}
}
/**
*/
/**
* 批量删除
* 批量删除
* @param ids
* @param ids
* @return
* @return
* @author yzg
* @author yzg
* @date: 2018年11月22日 下午2:39:23
* @date: 2018年11月22日 下午2:39:23
*/
*/
/*
@Override
@Override
public boolean batchDelete(List<String> ids) {
public boolean batchDelete(List<String> ids) {
if (ids.size() == 0) {
if (ids.size() == 0) {
...
@@ -104,9 +104,9 @@ public class ProjectLibrarySerivceImpl extends BaseServiceImpl<ProjectLibrary,St
...
@@ -104,9 +104,9 @@ public class ProjectLibrarySerivceImpl extends BaseServiceImpl<ProjectLibrary,St
return true;
return true;
}
}
/**
*/
/**
* 分页查询专题库
* 分页查询专题库
*/
*/
/*
@Override
@Override
public PageInfo<ProjectLibraryListVO> page(QueryProjectLibraryForm form,
public PageInfo<ProjectLibraryListVO> page(QueryProjectLibraryForm form,
PageParam pageParam) {
PageParam pageParam) {
...
@@ -118,9 +118,9 @@ public class ProjectLibrarySerivceImpl extends BaseServiceImpl<ProjectLibrary,St
...
@@ -118,9 +118,9 @@ public class ProjectLibrarySerivceImpl extends BaseServiceImpl<ProjectLibrary,St
return new PageInfo<ProjectLibraryListVO>(list);
return new PageInfo<ProjectLibraryListVO>(list);
}
}
/**
*/
/**
* 关联资源选择弹框
* 关联资源选择弹框
*/
*/
/*
@Override
@Override
public PageInfo<ProjectLibraryListVO> pageByTitleAndDiyType(QueryResourceForPoPForm form, PageParam pageParam){
public PageInfo<ProjectLibraryListVO> pageByTitleAndDiyType(QueryResourceForPoPForm form, PageParam pageParam){
startPage(pageParam);
startPage(pageParam);
...
@@ -131,5 +131,5 @@ public class ProjectLibrarySerivceImpl extends BaseServiceImpl<ProjectLibrary,St
...
@@ -131,5 +131,5 @@ public class ProjectLibrarySerivceImpl extends BaseServiceImpl<ProjectLibrary,St
}
}
}
}
return new PageInfo<ProjectLibraryListVO>(list);
return new PageInfo<ProjectLibraryListVO>(list);
}
}
*/
}
}
app/resource/src/main/java/com/zrqx/resource/bg/service/projectlibrary/ProjectLibraryService.java
浏览文件 @
db48f7fa
...
@@ -20,32 +20,32 @@ public interface ProjectLibraryService extends BaseService<ProjectLibrary,String
...
@@ -20,32 +20,32 @@ public interface ProjectLibraryService extends BaseService<ProjectLibrary,String
* @param form
* @param form
* @return
* @return
*/
*/
boolean
saveOrUpdate
(
SaveUpdateProjectLibraryForm
form
);
/*
boolean saveOrUpdate(SaveUpdateProjectLibraryForm form);
/**
*/
/**
* 批量删除
* 批量删除
* @param ids
* @param ids
* @return
* @return
* @author yzg
* @author yzg
* @date: 2018年11月22日 下午2:39:23
* @date: 2018年11月22日 下午2:39:23
*/
*/
/*
boolean batchDelete(List<String> ids);
boolean batchDelete(List<String> ids);
/**
*/
/**
* 分页查询专题库
* 分页查询专题库
* @param form
* @param form
* @param pageParam
* @param pageParam
* @return
* @return
*/
*/
/*
PageInfo<ProjectLibraryListVO> page(QueryProjectLibraryForm form, PageParam pageParam);
PageInfo<ProjectLibraryListVO> page(QueryProjectLibraryForm form, PageParam pageParam);
/**
*/
/**
* 选择弹窗中的列表
* 选择弹窗中的列表
* @param form
* @param form
* @param pageParam
* @param pageParam
* @return
* @return
* @author ycw
* @author ycw
* @date: 2019年1月3日 下午7:12:29
* @date: 2019年1月3日 下午7:12:29
*/
*/
/*
PageInfo
<
ProjectLibraryListVO
>
pageByTitleAndDiyType
(
QueryResourceForPoPForm
form
,
PageParam
pageParam
);
PageInfo<ProjectLibraryListVO> pageByTitleAndDiyType(QueryResourceForPoPForm form, PageParam pageParam);
*/
}
}
app/resource/src/main/java/com/zrqx/resource/commons/form/bg/ebook/QueryEbookInfoForm.java
浏览文件 @
db48f7fa
...
@@ -33,8 +33,4 @@ public class QueryEbookInfoForm {
...
@@ -33,8 +33,4 @@ public class QueryEbookInfoForm {
private
List
<
Integer
>
diyTypeId
;
private
List
<
Integer
>
diyTypeId
;
@ApiModelProperty
(
"自定义分类code"
)
@ApiModelProperty
(
"自定义分类code"
)
private
String
diyTypeCode
;
private
String
diyTypeCode
;
@ApiModelProperty
(
"1包含实体书"
)
private
Integer
isContainEntity
;
@ApiModelProperty
(
"0全部1电子书2实体书"
)
private
Integer
bookType
;
}
}
app/resource/src/main/java/com/zrqx/resource/commons/form/bg/ebook/SaveUpdateEbookForm.java
浏览文件 @
db48f7fa
...
@@ -52,16 +52,6 @@ public class SaveUpdateEbookForm {
...
@@ -52,16 +52,6 @@ public class SaveUpdateEbookForm {
private
String
printNo
;
private
String
printNo
;
@ApiModelProperty
(
"印张"
)
@ApiModelProperty
(
"印张"
)
private
String
printCount
;
private
String
printCount
;
@ApiModelProperty
(
"CIP"
)
private
String
CIP
;
@ApiModelProperty
(
"关于作者"
)
private
String
aboutAuthor
;
@ApiModelProperty
(
"版权期限开始"
)
private
String
copyrightTermBegin
;
@ApiModelProperty
(
"版权期限结束"
)
private
String
copyrightTerm
;
@ApiModelProperty
(
"邮编"
)
private
String
zipCode
;
@ApiModelProperty
(
"书刊类型 0外版书 1本版书"
)
@ApiModelProperty
(
"书刊类型 0外版书 1本版书"
)
private
Integer
type
;
private
Integer
type
;
@ApiModelProperty
(
"销售状态 0 不可售 1 可售"
)
@ApiModelProperty
(
"销售状态 0 不可售 1 可售"
)
...
@@ -69,15 +59,13 @@ public class SaveUpdateEbookForm {
...
@@ -69,15 +59,13 @@ public class SaveUpdateEbookForm {
@ApiModelProperty
(
"关键词"
)
@ApiModelProperty
(
"关键词"
)
private
String
keywords
;
private
String
keywords
;
@ApiModelProperty
(
"电子书封面"
)
@ApiModelProperty
(
"电子书封面"
)
private
String
bookCover
;
private
String
img
;
@ApiModelProperty
(
"上下架状态 0:录入中 1:待审核 2:审核中 3:审核不通过 4:已上架 5:已下架"
)
private
Integer
bookStatus
;
@ApiModelProperty
(
"pdfId"
)
@ApiModelProperty
(
"pdfId"
)
private
String
pdfId
;
private
String
pdfId
;
@ApiModelProperty
(
"pdf文件"
)
@ApiModelProperty
(
"pdf文件"
)
private
String
pdfFile
;
private
String
pdfFile
;
@ApiModelProperty
(
"内容简介"
)
@ApiModelProperty
(
"内容简介"
)
private
String
s
ummary
;
private
String
s
ynopsis
;
@ApiModelProperty
(
"图书目录"
)
@ApiModelProperty
(
"图书目录"
)
private
String
bookCatalog
;
private
String
bookCatalog
;
@ApiModelProperty
(
"定价 元 在前台展示为划线价格"
)
@ApiModelProperty
(
"定价 元 在前台展示为划线价格"
)
...
@@ -86,22 +74,12 @@ public class SaveUpdateEbookForm {
...
@@ -86,22 +74,12 @@ public class SaveUpdateEbookForm {
private
Integer
priceOption
;
private
Integer
priceOption
;
@ApiModelProperty
(
"售价 元"
)
@ApiModelProperty
(
"售价 元"
)
private
BigDecimal
realPrice
;
private
BigDecimal
realPrice
;
@ApiModelProperty
(
"是否包含实体书"
)
private
Integer
isContainEntity
;
@ApiModelProperty
(
"实体书售价(元)"
)
private
BigDecimal
entityRealPrice
;
@ApiModelProperty
(
"实体书定价(元)"
)
private
BigDecimal
entityPrice
;
@ApiModelProperty
(
"0全部1电子书2实体书"
)
private
Integer
bookType
;
@ApiModelProperty
(
"分类id"
)
@ApiModelProperty
(
"分类id"
)
private
List
<
EbookDiyType
>
diyType
;
private
List
<
EbookDiyType
>
diyType
;
@ApiModelProperty
(
"标签id"
)
@ApiModelProperty
(
"标签id"
)
private
List
<
EbookLabelContentDiyType
>
label
;
private
List
<
EbookLabelContentDiyType
>
label
;
@ApiModelProperty
(
"民族 1蒙古族 2侗族 3藏族 4朝鲜族 5土家族 6回族 7满族 8汉族"
)
private
Integer
nationsType
;
@ApiModelProperty
(
"pdf名称"
)
@ApiModelProperty
(
"pdf名称"
)
private
String
pdfName
;
private
String
pdfName
;
@ApiModelProperty
(
value
=
"作者名称和id(用,隔开)"
)
@ApiModelProperty
(
value
=
"作者名称和id(用,隔开)"
)
...
...
app/resource/src/main/java/com/zrqx/resource/commons/form/bg/ebook/UpdateEbookForm.java
浏览文件 @
db48f7fa
...
@@ -18,6 +18,8 @@ public class UpdateEbookForm {
...
@@ -18,6 +18,8 @@ public class UpdateEbookForm {
private
Integer
status
;
private
Integer
status
;
@ApiModelProperty
(
"售价选项 0 免费,1收费"
)
@ApiModelProperty
(
"售价选项 0 免费,1收费"
)
private
Integer
priceOption
;
private
Integer
priceOption
;
@ApiModelProperty
(
"定价 元"
)
private
BigDecimal
price
;
@ApiModelProperty
(
"售价 元"
)
@ApiModelProperty
(
"售价 元"
)
private
BigDecimal
realPrice
;
private
BigDecimal
realPrice
;
@ApiModelProperty
(
value
=
"分类id"
)
@ApiModelProperty
(
value
=
"分类id"
)
...
...
app/resource/src/main/java/com/zrqx/resource/commons/model/ebook/Book.java
浏览文件 @
db48f7fa
...
@@ -78,13 +78,13 @@ public class Book {
...
@@ -78,13 +78,13 @@ public class Book {
private
Integer
type
;
private
Integer
type
;
@ApiModelProperty
(
"销售状态 0 不可售 1 可售"
)
@ApiModelProperty
(
"销售状态 0 不可售 1 可售"
)
private
Integer
status
;
private
Integer
status
;
@ApiModelProperty
(
"民族 1蒙古族 2侗族 3藏族 4朝鲜族 5土家族 6回族 7满族 8汉族"
)
private
Integer
nationsType
;
@ApiModelProperty
(
"编者,主编等"
)
@ApiModelProperty
(
"编者,主编等"
)
private
String
editor
;
private
String
editor
;
@ApiModelProperty
(
value
=
"销量"
)
@ApiModelProperty
(
value
=
"销量"
)
private
Integer
salesNum
;
private
Integer
salesNum
;
@ApiModelProperty
(
value
=
"纸质书购买地址"
)
private
Integer
purchaseAddress
;
@ApiModelProperty
(
value
=
"资源类型"
)
@ApiModelProperty
(
value
=
"资源类型"
)
private
Integer
resourceType
;
private
Integer
resourceType
;
}
}
app/resource/src/main/java/com/zrqx/resource/commons/model/ebook/Ebook.java
浏览文件 @
db48f7fa
...
@@ -28,8 +28,6 @@ public class Ebook {
...
@@ -28,8 +28,6 @@ public class Ebook {
private
String
keywords
;
private
String
keywords
;
@ApiModelProperty
(
"电子书封面"
)
@ApiModelProperty
(
"电子书封面"
)
private
String
bookCover
;
private
String
bookCover
;
@ApiModelProperty
(
"图书名称"
)
private
String
name
;
@ApiModelProperty
(
"上下架状态 0:录入中 1:待审核 2:审核中 3:审核不通过 4:已上架 5:已下架"
)
@ApiModelProperty
(
"上下架状态 0:录入中 1:待审核 2:审核中 3:审核不通过 4:已上架 5:已下架"
)
private
Integer
bookStatus
;
private
Integer
bookStatus
;
...
@@ -46,7 +44,7 @@ public class Ebook {
...
@@ -46,7 +44,7 @@ public class Ebook {
private
String
pdfFile
;
private
String
pdfFile
;
@ApiModelProperty
(
"内容简介"
)
@ApiModelProperty
(
"内容简介"
)
private
String
s
ummary
;
private
String
s
ynopsis
;
@ApiModelProperty
(
"图书目录"
)
@ApiModelProperty
(
"图书目录"
)
private
String
bookCatalog
;
private
String
bookCatalog
;
...
...
app/resource/src/main/java/com/zrqx/resource/commons/vo/bg/authorlibrary/AboutListVO.java
浏览文件 @
db48f7fa
...
@@ -17,7 +17,7 @@ public class AboutListVO {
...
@@ -17,7 +17,7 @@ public class AboutListVO {
@ApiModelProperty
(
"资源名称"
)
@ApiModelProperty
(
"资源名称"
)
private
String
name
;
private
String
name
;
@ApiModelProperty
(
"电子书封面"
)
@ApiModelProperty
(
"电子书封面"
)
private
String
bookCover
;
private
String
img
;
@ApiModelProperty
(
"内容简介"
)
@ApiModelProperty
(
"内容简介"
)
private
String
s
ummary
;
private
String
s
ynopsis
;
}
}
app/resource/src/main/java/com/zrqx/resource/commons/vo/bg/ebook/EbookListVO.java
浏览文件 @
db48f7fa
...
@@ -14,15 +14,13 @@ public class EbookListVO {
...
@@ -14,15 +14,13 @@ public class EbookListVO {
@ApiModelProperty
(
value
=
"电子书名"
)
@ApiModelProperty
(
value
=
"电子书名"
)
private
String
name
;
private
String
name
;
@ApiModelProperty
(
value
=
"电子书封面"
)
@ApiModelProperty
(
value
=
"电子书封面"
)
private
String
bookCover
;
private
String
img
;
@ApiModelProperty
(
"作者"
)
@ApiModelProperty
(
"作者"
)
private
String
author
;
private
String
author
;
@ApiModelProperty
(
"ISBN"
)
@ApiModelProperty
(
"ISBN"
)
private
String
isbn
;
private
String
isbn
;
@ApiModelProperty
(
"售价"
)
@ApiModelProperty
(
"售价"
)
private
String
realPrice
;
private
String
realPrice
;
@ApiModelProperty
(
"实体书售价"
)
private
String
entityRealPrice
;
@ApiModelProperty
(
"上传时间"
)
@ApiModelProperty
(
"上传时间"
)
private
Date
uploadTime
;
private
Date
uploadTime
;
@ApiModelProperty
(
"更新时间"
)
@ApiModelProperty
(
"更新时间"
)
...
@@ -31,8 +29,4 @@ public class EbookListVO {
...
@@ -31,8 +29,4 @@ public class EbookListVO {
private
String
bookStatus
;
private
String
bookStatus
;
@ApiModelProperty
(
"电子书状态 0:录入中 1:待审核 2:审核中 3:审核不通过 4:已上架 5:已下架"
)
@ApiModelProperty
(
"电子书状态 0:录入中 1:待审核 2:审核中 3:审核不通过 4:已上架 5:已下架"
)
private
String
status_zh
;
private
String
status_zh
;
@ApiModelProperty
(
"版权期限"
)
private
String
copyrightTerm
;
@ApiModelProperty
(
"版权期限开始"
)
private
String
copyrightTermBegin
;
}
}
app/resource/src/main/java/com/zrqx/resource/commons/vo/bg/ebook/EbookVO.java
浏览文件 @
db48f7fa
...
@@ -29,8 +29,6 @@ public class EbookVO {
...
@@ -29,8 +29,6 @@ public class EbookVO {
private
String
translator
;
private
String
translator
;
@ApiModelProperty
(
"isbn"
)
@ApiModelProperty
(
"isbn"
)
private
String
isbn
;
private
String
isbn
;
@ApiModelProperty
(
"编号"
)
private
String
bookNo
;
@ApiModelProperty
(
"所属丛书"
)
@ApiModelProperty
(
"所属丛书"
)
private
String
bookSeries
;
private
String
bookSeries
;
@ApiModelProperty
(
"责任编辑"
)
@ApiModelProperty
(
"责任编辑"
)
...
@@ -48,25 +46,11 @@ public class EbookVO {
...
@@ -48,25 +46,11 @@ public class EbookVO {
@ApiModelProperty
(
"字数"
)
@ApiModelProperty
(
"字数"
)
private
Integer
fontCount
;
private
Integer
fontCount
;
@ApiModelProperty
(
"封面"
)
@ApiModelProperty
(
"封面"
)
private
String
bookCover
;
private
String
img
;
@ApiModelProperty
(
"关键词"
)
@ApiModelProperty
(
"关键词"
)
private
String
keywords
;
private
String
keywords
;
@ApiModelProperty
(
"中图分类"
)
@ApiModelProperty
(
"中图分类"
)
private
String
midpicid
;
private
String
midpicid
;
@ApiModelProperty
(
"版权期限开始"
)
private
String
copyrightTermBegin
;
@ApiModelProperty
(
"版权期限结束"
)
private
String
copyrightTerm
;
@ApiModelProperty
(
"印次"
)
private
String
printNo
;
@ApiModelProperty
(
"印张"
)
private
String
printCount
;
@ApiModelProperty
(
"CIP"
)
private
String
CIP
;
@ApiModelProperty
(
"关于作者"
)
private
String
aboutAuthor
;
@ApiModelProperty
(
"邮编"
)
private
String
zipCode
;
@ApiModelProperty
(
value
=
"分类id"
)
@ApiModelProperty
(
value
=
"分类id"
)
private
List
<
EbookDiyType
>
diyType
;
private
List
<
EbookDiyType
>
diyType
;
...
@@ -75,7 +59,7 @@ public class EbookVO {
...
@@ -75,7 +59,7 @@ public class EbookVO {
@ApiModelProperty
(
value
=
"标签内容id"
)
@ApiModelProperty
(
value
=
"标签内容id"
)
private
List
<
Integer
>
labelContentDiyTypeIds
;
private
List
<
Integer
>
labelContentDiyTypeIds
;
@ApiModelProperty
(
"内容简介"
)
@ApiModelProperty
(
"内容简介"
)
private
String
s
ummary
;
private
String
s
ynopsis
;
@ApiModelProperty
(
"图书目录"
)
@ApiModelProperty
(
"图书目录"
)
private
String
bookCatalog
;
private
String
bookCatalog
;
@ApiModelProperty
(
"pdf文件"
)
@ApiModelProperty
(
"pdf文件"
)
...
@@ -88,23 +72,15 @@ public class EbookVO {
...
@@ -88,23 +72,15 @@ public class EbookVO {
private
String
realPrice
;
private
String
realPrice
;
@ApiModelProperty
(
"售价选项 0 免费,1收费"
)
@ApiModelProperty
(
"售价选项 0 免费,1收费"
)
private
Integer
priceOption
;
private
Integer
priceOption
;
@ApiModelProperty
(
"是否包含实体书"
)
private
Integer
isContainEntity
;
@ApiModelProperty
(
"实体书售价(元)"
)
private
String
entityRealPrice
;
@ApiModelProperty
(
"实体书定价(元)"
)
private
String
entityPrice
;
@ApiModelProperty
(
"0全部1电子书2实体书"
)
private
Integer
bookType
;
@ApiModelProperty
(
"书刊类型 0外版书 1本版书"
)
@ApiModelProperty
(
"书刊类型 0外版书 1本版书"
)
private
Integer
type
;
private
Integer
type
;
@ApiModelProperty
(
"销售状态 0 不可售 1 可售"
)
@ApiModelProperty
(
"销售状态 0 不可售 1 可售"
)
private
Integer
status
;
private
Integer
status
;
@ApiModelProperty
(
value
=
"epub文件名称"
)
private
String
fileName
;
@ApiModelProperty
(
"pdf名称"
)
@ApiModelProperty
(
"pdf名称"
)
private
String
pdfName
;
private
String
pdfName
;
@ApiModelProperty
(
value
=
"pdf原始名"
)
private
String
pdf_zh
;
@ApiModelProperty
(
value
=
"关联目录章节"
)
@ApiModelProperty
(
value
=
"关联目录章节"
)
private
List
<
ChapterLibrary
>
chapterList
;
private
List
<
ChapterLibrary
>
chapterList
;
@ApiModelProperty
(
value
=
"作者名称和id(用,隔开)"
)
@ApiModelProperty
(
value
=
"作者名称和id(用,隔开)"
)
...
...
app/resource/src/main/java/com/zrqx/resource/fg/controller/ebook/FgEbookController.java
浏览文件 @
db48f7fa
...
@@ -270,9 +270,9 @@ public class FgEbookController {
...
@@ -270,9 +270,9 @@ public class FgEbookController {
@ApiOperation
(
value
=
"图书相关资源"
,
notes
=
"查询图书相关资源"
)
@ApiOperation
(
value
=
"图书相关资源"
,
notes
=
"查询图书相关资源"
)
@GetMapping
(
value
=
"/relation-resource/{oid}"
)
@GetMapping
(
value
=
"/relation-resource/{oid}"
)
public
CallBack
<
List
<
FgAboutListVo
>>
queryByRelation
(
@PathVariable
String
oid
){
public
CallBack
<
List
<
FgAboutListVo
>>
queryByRelation
(
@PathVariable
String
oid
){
Ebook
ebook
=
e
bookservice
.
selectByPrimaryKey
(
oid
);
Book
book
=
bookservice
.
selectByPrimaryKey
(
oid
);
// 相关资源
// 相关资源
String
guanjianzi
=
e
book
.
getName
();
String
guanjianzi
=
book
.
getName
();
List
<
FgAboutListVo
>
xglist
=
new
ArrayList
<
FgAboutListVo
>();
List
<
FgAboutListVo
>
xglist
=
new
ArrayList
<
FgAboutListVo
>();
if
(
guanjianzi
==
null
||
guanjianzi
.
equals
(
""
)){
if
(
guanjianzi
==
null
||
guanjianzi
.
equals
(
""
)){
//title查询结果list
//title查询结果list
...
...
app/resource/src/main/java/com/zrqx/resource/fg/controller/resourcelibrary/FgResourceLibraryController.java
浏览文件 @
db48f7fa
...
@@ -357,13 +357,13 @@ public class FgResourceLibraryController {
...
@@ -357,13 +357,13 @@ public class FgResourceLibraryController {
}
}
}
}
//专题
//专题
if
(
AllResourceTypeEnum
.
PROJECT
.
getCode
().
equals
(
form
.
getResourceType
())){
/*
if(AllResourceTypeEnum.PROJECT.getCode().equals(form.getResourceType())){
ProjectLibrary entity = projectLibraryService.selectByPrimaryKey(form.getResourceId());
ProjectLibrary entity = projectLibraryService.selectByPrimaryKey(form.getResourceId());
if(entity != null){
if(entity != null){
resourceType = entity.getResourceType();
resourceType = entity.getResourceType();
query.setSort("browseNum", ORDER.desc);
query.setSort("browseNum", ORDER.desc);
}
}
}
}
*/
// 相关资源
// 相关资源
List
<
FgAboutListVo
>
xglist
=
new
ArrayList
<
FgAboutListVo
>();
List
<
FgAboutListVo
>
xglist
=
new
ArrayList
<
FgAboutListVo
>();
...
@@ -777,7 +777,7 @@ public class FgResourceLibraryController {
...
@@ -777,7 +777,7 @@ public class FgResourceLibraryController {
Ebook
ebook
=
ebookService
.
selectByPrimaryKey
(
id
);
Ebook
ebook
=
ebookService
.
selectByPrimaryKey
(
id
);
vo
.
setAuthor
(
book
.
getAuthor
());
vo
.
setAuthor
(
book
.
getAuthor
());
vo
.
setAuthorId
(
book
.
getAuthorId
());
vo
.
setAuthorId
(
book
.
getAuthorId
());
vo
.
setSummary
(
removeLabel
(
ebook
.
getS
ummary
()));
vo
.
setSummary
(
removeLabel
(
ebook
.
getS
ynopsis
()));
vo
.
setCover
(
ebook
.
getBookCover
());
vo
.
setCover
(
ebook
.
getBookCover
());
return
CallBack
.
success
(
vo
);
return
CallBack
.
success
(
vo
);
}
}
...
@@ -1462,7 +1462,7 @@ public class FgResourceLibraryController {
...
@@ -1462,7 +1462,7 @@ public class FgResourceLibraryController {
reslist
.
add
(
resultMap
);
reslist
.
add
(
resultMap
);
}
}
//专题
//专题
if
(
solrDocument
.
get
(
"resourceType"
).
equals
(
AllResourceTypeEnum
.
PROJECT
.
getCode
())){
/*
if(solrDocument.get("resourceType").equals(AllResourceTypeEnum.PROJECT.getCode())){
//存储每个高亮处理后的结果
//存储每个高亮处理后的结果
Map<String, Object> resultMap = new HashMap<String, Object>();
Map<String, Object> resultMap = new HashMap<String, Object>();
//查询结果的id,存入map
//查询结果的id,存入map
...
@@ -1486,7 +1486,7 @@ public class FgResourceLibraryController {
...
@@ -1486,7 +1486,7 @@ public class FgResourceLibraryController {
}
}
}
}
reslist.add(resultMap);
reslist.add(resultMap);
}
}
*/
//课程
//课程
if
(
solrDocument
.
get
(
"resourceType"
).
equals
(
AllResourceTypeEnum
.
COURSE
.
getCode
())){
if
(
solrDocument
.
get
(
"resourceType"
).
equals
(
AllResourceTypeEnum
.
COURSE
.
getCode
())){
//存储每个高亮处理后的结果
//存储每个高亮处理后的结果
...
...
app/resource/src/main/java/com/zrqx/resource/fg/service/FgResourceRelationServiceImpl.java
浏览文件 @
db48f7fa
...
@@ -187,18 +187,18 @@ public class FgResourceRelationServiceImpl extends BaseServiceImpl<ResourceRelat
...
@@ -187,18 +187,18 @@ public class FgResourceRelationServiceImpl extends BaseServiceImpl<ResourceRelat
e.setResourceType_zh(RelationResourceTypeEnum.YIJIA.getName());*/
e.setResourceType_zh(RelationResourceTypeEnum.YIJIA.getName());*/
}
}
}
}
if
(
e
.
getResourceType
().
equals
(
AllResourceTypeEnum
.
PROJECT
.
getCode
()))
{
/*
if (e.getResourceType().equals(AllResourceTypeEnum.PROJECT.getCode())) {
ProjectLibrary sc = projectLibraryMapper.selectByPrimaryKey(e.getResourceId());
ProjectLibrary sc = projectLibraryMapper.selectByPrimaryKey(e.getResourceId());
if (sc != null) {
if (sc != null) {
e.setName(sc.getName());
e.setName(sc.getName());
e.setCover(sc.getCover());
e.setCover(sc.getCover());
e.setAuthor(sc.getAuthor());
e.setAuthor(sc.getAuthor());
/*
if(StringUtils.isNotBlank(sc.getSynopsis())){
if(StringUtils.isNotBlank(sc.getSynopsis())){
e.setSynopsis(sc.getSynopsis().replaceAll("\\<.*?>", ""));
e.setSynopsis(sc.getSynopsis().replaceAll("\\<.*?>", ""));
}
}
e.setResourceType_zh(RelationResourceTypeEnum.YIJIA.getName());
*/
e.setResourceType_zh(RelationResourceTypeEnum.YIJIA.getName());
}
}
}
}
*/
}
}
});
});
return
list
;
return
list
;
...
...
app/resource/src/main/java/com/zrqx/resource/fg/service/authorlibrary/FgAuthorLibraryServiceImpl.java
浏览文件 @
db48f7fa
...
@@ -205,7 +205,7 @@ public class FgAuthorLibraryServiceImpl extends BaseServiceImpl<AuthorLibrary, S
...
@@ -205,7 +205,7 @@ public class FgAuthorLibraryServiceImpl extends BaseServiceImpl<AuthorLibrary, S
BeanUtils
.
copyProperties
(
book
,
aboutListVO
);
BeanUtils
.
copyProperties
(
book
,
aboutListVO
);
Ebook
ebook
=
ebookMapper
.
selectByPrimaryKey
(
resource
.
getResourceId
());
Ebook
ebook
=
ebookMapper
.
selectByPrimaryKey
(
resource
.
getResourceId
());
BeanUtils
.
copyProperties
(
ebook
,
aboutListVO
);
BeanUtils
.
copyProperties
(
ebook
,
aboutListVO
);
aboutListVO
.
setS
ummary
(
ebook
.
getSummary
()
==
null
?
""
:
ebook
.
getSummary
().
replaceAll
(
"\\<.*?>"
,
""
));
aboutListVO
.
setS
ynopsis
(
StringUtils
.
isBlank
(
ebook
.
getSynopsis
())
?
""
:
ebook
.
getSynopsis
().
replaceAll
(
"\\<.*?>"
,
""
));
list
.
add
(
aboutListVO
);
list
.
add
(
aboutListVO
);
}
}
if
(
resource
.
getResourceType
()
==
AllResourceTypeEnum
.
ARTICLE
.
getCode
()){
if
(
resource
.
getResourceType
()
==
AllResourceTypeEnum
.
ARTICLE
.
getCode
()){
...
...
app/resource/src/main/java/com/zrqx/resource/fg/service/record/FgRecordServiceImpl.java
浏览文件 @
db48f7fa
...
@@ -151,7 +151,7 @@ public class FgRecordServiceImpl extends BaseServiceImpl<Record, Integer>
...
@@ -151,7 +151,7 @@ public class FgRecordServiceImpl extends BaseServiceImpl<Record, Integer>
if
(
book
!=
null
){
if
(
book
!=
null
){
vo
.
setName
(
book
.
getName
());
vo
.
setName
(
book
.
getName
());
vo
.
setImg
(
ebook
.
getBookCover
());
vo
.
setImg
(
ebook
.
getBookCover
());
vo
.
setText
(
ebook
.
getS
ummary
());
vo
.
setText
(
ebook
.
getS
ynopsis
());
vo
.
setAuthor
(
book
.
getAuthor
());
vo
.
setAuthor
(
book
.
getAuthor
());
vo
.
setAuthorId
(
book
.
getAuthorId
());
vo
.
setAuthorId
(
book
.
getAuthorId
());
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论