Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
jgjy
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
jgjy
Commits
cb94092e
提交
cb94092e
authored
12月 23, 2020
作者:
zhouzhigang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
资源导入添加字段:目录、简介、分类
上级
7e7320fa
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
46 行增加
和
1 行删除
+46
-1
PhyResourceMapper.java
.../resource/mapper/goods/phyresource/PhyResourceMapper.java
+1
-1
PhyResourceServiceImpl.java
...rce/service/goods/phyresource/PhyResourceServiceImpl.java
+23
-0
PhyResourcePageVo.java
...e/vo/resource/bg/goods/phyresource/PhyResourcePageVo.java
+10
-0
PhyResourcePageVoExcelVo.java
...source/bg/goods/phyresource/PhyResourcePageVoExcelVo.java
+12
-0
没有找到文件。
com.zrqx.bg.resource/src/main/java/com/zrqx/bg/resource/mapper/goods/phyresource/PhyResourceMapper.java
浏览文件 @
cb94092e
...
...
@@ -19,7 +19,7 @@ import java.util.List;
public
interface
PhyResourceMapper
extends
BaseMapper
<
PhyResource
>
{
@Select
(
" <script> "
+
" SELECT a.id, a.type, NAME, author, isbn, price, a.createTime, a.updateTime, a.STATUS "
+
" SELECT a.id, a.type, NAME, author, isbn, price, a.createTime, a.updateTime, a.STATUS
,a.introduction, a.menu
"
+
" FROM res_physical_resource a "
// 自定义分类
+
" <if test = '"
+
NOTBLANK
+
"(query.diyTypeCode)'> "
...
...
com.zrqx.bg.resource/src/main/java/com/zrqx/bg/resource/service/goods/phyresource/PhyResourceServiceImpl.java
浏览文件 @
cb94092e
...
...
@@ -772,10 +772,33 @@ public class PhyResourceServiceImpl extends BaseModelServiceImpl<PhyResource, St
phyResourcePageVos
.
parallelStream
().
forEach
(
phyResourcePageVo
->
{
phyResourcePageVo
.
setStatusZh
(
GoodsStatusEnum
.
getName
(
phyResourcePageVo
.
getStatus
()));
//获取图书的自定义分类
GoodsDiyTypeRelation
entity
=
new
GoodsDiyTypeRelation
();
entity
.
setGoodsid
(
phyResourcePageVo
.
getId
());
List
<
GoodsDiyTypeRelation
>
voList
=
goodsDiyTypeRelationMapper
.
select
(
entity
);
if
(
voList
!=
null
&&
voList
.
size
()
>
0
){
String
diyTypes
=
this
.
getDiyTypes
(
voList
.
get
(
0
).
getDiytypeid
(),
new
StringBuffer
());
phyResourcePageVo
.
setDiyTypes
(
diyTypes
);
}
});
return
phyResourcePageVos
;
}
public
String
getDiyTypes
(
Integer
diyTypeId
,
StringBuffer
sb
){
DiyType
diyType
=
diyTypeMapper
.
selectByPrimaryKey
(
diyTypeId
);
if
(
diyType
==
null
||
diyType
.
getParentId
()
==
null
){
return
null
;
}
if
(
diyType
.
getParentId
()
!=
0
){
sb
.
insert
(
0
,
"-"
+
diyType
.
getShowName
());
}
if
(
diyType
.
getParentId
()
==
0
){
sb
.
insert
(
0
,
diyType
.
getShowName
()
+
""
);
return
new
String
(
sb
);
}
return
getDiyTypes
(
diyType
.
getParentId
(),
sb
);
}
...
...
com.zrqx.core/src/main/java/com/zrqx/core/vo/resource/bg/goods/phyresource/PhyResourcePageVo.java
浏览文件 @
cb94092e
package
com
.
zrqx
.
core
.
vo
.
resource
.
bg
.
goods
.
phyresource
;
import
com.zrqx.core.util.excelutil.ExcelResources
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.math.BigDecimal
;
...
...
@@ -50,6 +51,15 @@ public class PhyResourcePageVo {
private
String
isRelation
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
@ApiModelProperty
(
"简介"
)
private
String
introduction
;
@ApiModelProperty
(
"目录"
)
private
String
menu
;
@ApiModelProperty
(
"分类"
)
private
String
diyTypes
;
...
...
com.zrqx.core/src/main/java/com/zrqx/core/vo/resource/bg/goods/phyresource/PhyResourcePageVoExcelVo.java
浏览文件 @
cb94092e
...
...
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModel;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
com.zrqx.core.util.excelutil.ExcelResources
;
...
...
@@ -41,4 +42,15 @@ public class PhyResourcePageVoExcelVo {
@ExcelResources
(
title
=
"状态"
)
private
String
statusZh
;
@ExcelResources
(
title
=
"简介"
)
private
String
introduction
;
@ExcelResources
(
title
=
"目录"
)
private
String
menu
;
@ExcelResources
(
title
=
"分类"
)
private
String
diyTypes
;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论