|
|
@@ -18,6 +18,8 @@ import org.apache.struts2.ServletActionContext;
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.math.BigDecimal;
|
|
|
+import java.text.DecimalFormat;
|
|
|
import java.text.ParseException;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
@@ -237,15 +239,16 @@ public class HousePriceAction extends BaseController implements ModelDriven<Hous
|
|
|
*/
|
|
|
Double minPrice = houseService.getHouseMinPrice(merchantId);
|
|
|
|
|
|
+ DecimalFormat decimalFormat = new DecimalFormat("#####.##");
|
|
|
for (String str : dateStrs) {
|
|
|
HousePriceResultVo data = new HousePriceResultVo();
|
|
|
data.setDate(str);
|
|
|
List<HousePriceOneDataVo> priceDatas = oneDatas.stream().filter(e -> e.getSetDate().equals(str)).sorted(Comparator.comparing(HousePriceOneDataVo::getPrice)).collect(Collectors.toList());
|
|
|
|
|
|
if (priceDatas.size() > 0) {
|
|
|
- data.setTopinfo("¥" + priceDatas.get(0).getPrice() + "起");
|
|
|
+ data.setTopinfo("¥" + decimalFormat.format(priceDatas.get(0).getPrice()) + "起");
|
|
|
} else {
|
|
|
- data.setTopinfo("¥" + minPrice + "起");
|
|
|
+ data.setTopinfo("¥" + decimalFormat.format(minPrice) + "起");
|
|
|
}
|
|
|
result.add(data);
|
|
|
}
|