|
@@ -63,7 +63,7 @@ public class SecondRecommendServiceImpl extends ServiceImpl<SecondRecommendMappe
|
|
|
IPage<SecondGoodsRecommendVo> result = mapper.getSecondRecommendByPage(page, userId, longitude + "," + latitude, typeId, "user_" + phoneId);
|
|
|
for (SecondGoodsRecommendVo row : result.getRecords()) {
|
|
|
// 价格保留两位小数
|
|
|
- row.setPrice(row.getPrice() != null ? row.getAmount().setScale(2, BigDecimal.ROUND_HALF_UP).toString() : null);
|
|
|
+ row.setPrice(row.getAmount() != null ? row.getAmount().setScale(2, BigDecimal.ROUND_HALF_UP).toString() : null);
|
|
|
// 距离拼接
|
|
|
if (StringUtil.isNotBlank(row.getDist())) {
|
|
|
row.setPosition("距离" + row.getDist() + "km");
|
|
@@ -106,7 +106,7 @@ public class SecondRecommendServiceImpl extends ServiceImpl<SecondRecommendMappe
|
|
|
item.setPosition("距离" + item.getDist() + "km");
|
|
|
}
|
|
|
// 价格保留两位小数
|
|
|
- item.setPrice(item.getPrice() != null ? item.getAmount().setScale(2, BigDecimal.ROUND_HALF_UP).toString() : null);
|
|
|
+ item.setPrice(item.getAmount() != null ? item.getAmount().setScale(2, BigDecimal.ROUND_HALF_UP).toString() : null);
|
|
|
|
|
|
// 评论列表
|
|
|
List<SecondCommentVo> cList = new ArrayList<>();
|
|
@@ -159,7 +159,7 @@ public class SecondRecommendServiceImpl extends ServiceImpl<SecondRecommendMappe
|
|
|
item.setPosition("距离" + item.getDist() + "km");
|
|
|
}
|
|
|
// 价格保留两位小数
|
|
|
- item.setPrice(item.getPrice() != null ? item.getAmount().setScale(2, BigDecimal.ROUND_HALF_UP).toString() : null);
|
|
|
+ item.setPrice(item.getAmount() != null ? item.getAmount().setScale(2, BigDecimal.ROUND_HALF_UP).toString() : null);
|
|
|
|
|
|
// 评论列表
|
|
|
List<SecondCommentVo> cList = new ArrayList<>();
|
|
@@ -232,7 +232,7 @@ public class SecondRecommendServiceImpl extends ServiceImpl<SecondRecommendMappe
|
|
|
if (StringUtil.isNotBlank(item.getDist())) {
|
|
|
item.setPosition("距离" + item.getDist() + "km");
|
|
|
}
|
|
|
- item.setPrice(item.getPrice() != null ? item.getAmount().setScale(2, BigDecimal.ROUND_HALF_UP).toString() : null);
|
|
|
+ item.setPrice(item.getAmount() != null ? item.getAmount().setScale(2, BigDecimal.ROUND_HALF_UP).toString() : null);
|
|
|
}
|
|
|
|
|
|
return item;
|