提交 9d5dd71b authored 作者: 吴德鹏's avatar 吴德鹏

属性管理

上级 d6ffff24
...@@ -297,23 +297,21 @@ public class AttributesController { ...@@ -297,23 +297,21 @@ public class AttributesController {
AttributesEntity attr = attributesService.queryObject(param.getAttrId()); AttributesEntity attr = attributesService.queryObject(param.getAttrId());
if (attr != null) { if (attr != null) {
param.setAttrId(attr.getId()); param.setAttrId(attr.getId());
param.setParamName(attr.getAttrName());
String[] arr = param.getAttrDescId().split(","); String[] arr = param.getAttrDescId().split(",");
List<AttributesDescEntity> descEntities = attributesDescService.queryDescByIds(arr); List<AttributesDescEntity> descEntities = attributesDescService.queryDescByIds(arr);
List<AttributesDescVo> list = new ArrayList<>();
param.setAttrDescId(param.getAttrDescId()); param.setAttrDescId(param.getAttrDescId());
StringBuffer descValue = new StringBuffer();
descEntities.forEach(desc -> { descEntities.forEach(desc -> {
AttributesDescVo attVo = new AttributesDescVo(); descValue.append(desc.getAttrValue());
String value = desc.getAttrValue();
attVo.setAttrDescId(desc.getAttrDescId());
if (StringUtils.isNotBlank(desc.getAttrDesc())) { if (StringUtils.isNotBlank(desc.getAttrDesc())) {
value = value + "(" + desc.getAttrDesc() + ")"; descValue.append("(" + desc.getAttrDesc() + ")");
} }
attVo.setAttrValue(value); descValue.append(",");
list.add(attVo);
}); });
param.setList(list);
param.setDescValue(descValue.substring(0, descValue.length() - 1));
} }
......
...@@ -49,14 +49,14 @@ public class TbCfItemParamEntity implements Serializable { ...@@ -49,14 +49,14 @@ public class TbCfItemParamEntity implements Serializable {
*/ */
private String attrDescId; private String attrDescId;
private List<AttributesDescVo> list; private String descValue;
public List<AttributesDescVo> getList() { public String getDescValue() {
return list; return descValue;
} }
public void setList(List<AttributesDescVo> list) { public void setDescValue(String descValue) {
this.list = list; this.descValue = descValue;
} }
/** /**
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论