Authored by Lixiaodi

鉴定展示:二手信息

... ... @@ -111,6 +111,36 @@ public class SecondhandProductServiceImpl implements SecondhandProductService {
infos.add(new SkupImageInfo(ImageUrlAssist.getImageAbsoluteUrl(item.getImageUrl(), "goodsimg"), ""))
);
}
StringBuilder boxInfo = new StringBuilder();
StringBuilder qualityInfo = new StringBuilder();
if (org.apache.commons.lang3.StringUtils.isNotBlank(secondhandInfo.getFlawId())) {
List<SecondhandFlaw> flaws = secondhandFlawMapper.selectByIds(secondhandInfo.getFlawId());
for (SecondhandFlaw flaw : flaws) {
// 其他问题,文字不展示
if (flaw.getId() == 200) {
continue;
}
if (flaw.getType() == 1) {
boxInfo.append(",").append(flaw.getName());
}
if (flaw.getType() == 2) {
qualityInfo.append(",").append(flaw.getName());
}
}
if(org.apache.commons.lang3.StringUtils.isNotBlank(secondhandInfo.getFlawAttr())) {
qualityInfo.append(",").append(secondhandInfo.getFlawAttr());
}
if (boxInfo.length() > 0) {
resp.setShoeBoxDesc(boxInfo.substring(1));
}
if (qualityInfo.length() > 0) {
resp.setShoeQualityDesc(qualityInfo.substring(1));
} else {
resp.setShoeQualityDesc("该商品没有明显瑕疵");
}
}
resp.setImageInfoList(infos);
return resp;
}
... ...