Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
aaf3d0e2
提交
aaf3d0e2
authored
1月 06, 2021
作者:
吴德鹏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
属性管理
上级
7826f795
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
33 行增加
和
2 行删除
+33
-2
AttributesController.java
...in/java/com/platform/controller/AttributesController.java
+16
-2
TbCfItemParamEntity.java
...rc/main/java/com/platform/entity/TbCfItemParamEntity.java
+17
-0
没有找到文件。
platform-admin/src/main/java/com/platform/controller/AttributesController.java
浏览文件 @
aaf3d0e2
...
...
@@ -288,6 +288,7 @@ public class AttributesController {
// param.setAttrId(attributes.getId());
// paramList.add(param);
// });
List
<
AttributesEntity
>
list
=
attributesService
.
queryList
(
null
);
List
<
TbCfItemParamEntity
>
paramList
=
itemParamService
.
queryParamByItemId
(
itemId
);
List
<
TbCfItemParamEntity
>
collect
=
paramList
.
stream
()
.
filter
(
p
->
StringUtils
.
isNotBlank
(
p
.
getAttrId
()))
...
...
@@ -298,7 +299,8 @@ public class AttributesController {
AttributesEntity
attr
=
attributesService
.
queryObject
(
param
.
getAttrId
());
if
(
attr
!=
null
&&
"1"
.
equals
(
attr
.
getStatus
().
toString
()))
{
param
.
setAttrId
(
attr
.
getId
());
param
.
setNeed
(
attr
.
isNeed
());
param
.
setParamName
(
attr
.
getAttrName
());
String
[]
arr
=
param
.
getAttrDescId
().
split
(
","
);
List
<
AttributesDescEntity
>
descEntities
=
attributesDescService
.
queryDescByIds
(
arr
);
...
...
@@ -317,7 +319,19 @@ public class AttributesController {
}
});
List
<
String
>
ids
=
collect
.
stream
().
map
(
TbCfItemParamEntity:
:
getAttrId
).
collect
(
Collectors
.
toList
());
List
<
TbCfItemParamEntity
>
extraList
=
new
ArrayList
();
list
.
stream
().
filter
(
s
->
s
.
getStatus
()
==
1
&&
!
ids
.
contains
(
s
.
getId
()))
.
forEach
(
s
->
{
TbCfItemParamEntity
param
=
new
TbCfItemParamEntity
();
param
.
setAttrId
(
s
.
getId
());
param
.
setNeed
(
s
.
isNeed
());
param
.
setItemId
(
itemId
);
param
.
setParamName
(
s
.
getAttrName
());
extraList
.
add
(
param
);
});
collect
.
addAll
(
extraList
);
// collect.forEach(p -> {
// p.setParamName(null);
// p.setParamValue(null);
...
...
platform-admin/src/main/java/com/platform/entity/TbCfItemParamEntity.java
浏览文件 @
aaf3d0e2
...
...
@@ -51,6 +51,16 @@ public class TbCfItemParamEntity implements Serializable {
private
String
descValue
;
private
boolean
isNeed
;
public
boolean
isNeed
()
{
return
isNeed
;
}
public
void
setNeed
(
boolean
need
)
{
isNeed
=
need
;
}
public
String
getDescValue
()
{
return
descValue
;
}
...
...
@@ -72,6 +82,7 @@ public class TbCfItemParamEntity implements Serializable {
public
String
getId
()
{
return
id
;
}
/**
* 设置:参数名
*/
...
...
@@ -85,6 +96,7 @@ public class TbCfItemParamEntity implements Serializable {
public
String
getParamName
()
{
return
paramName
;
}
/**
* 设置:参数值
*/
...
...
@@ -98,6 +110,7 @@ public class TbCfItemParamEntity implements Serializable {
public
String
getParamValue
()
{
return
paramValue
;
}
/**
* 设置:商品ID
*/
...
...
@@ -111,6 +124,7 @@ public class TbCfItemParamEntity implements Serializable {
public
String
getItemId
()
{
return
itemId
;
}
/**
* 设置:创建时间
*/
...
...
@@ -124,6 +138,7 @@ public class TbCfItemParamEntity implements Serializable {
public
Date
getCreateTime
()
{
return
createTime
;
}
/**
* 设置:更新时间
*/
...
...
@@ -137,6 +152,7 @@ public class TbCfItemParamEntity implements Serializable {
public
Date
getUpdateTime
()
{
return
updateTime
;
}
/**
* 设置:属性ID
*/
...
...
@@ -150,6 +166,7 @@ public class TbCfItemParamEntity implements Serializable {
public
String
getAttrId
()
{
return
attrId
;
}
/**
* 设置:属性描述ID
*/
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论