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

属性管理

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