Commit 90987c31 authored by shiyu's avatar shiyu

查价横向类目

parent b7659c08
...@@ -3,6 +3,7 @@ package com.wwdz.ch.wx.entity; ...@@ -3,6 +3,7 @@ package com.wwdz.ch.wx.entity;
import com.wwdz.ch.db.domain.Category; import com.wwdz.ch.db.domain.Category;
import com.xxdxxs.entity.Entity; import com.xxdxxs.entity.Entity;
import lombok.Data; import lombok.Data;
import org.springframework.util.StringUtils;
@Data @Data
public class TransverseCategory implements Entity { public class TransverseCategory implements Entity {
...@@ -17,6 +18,8 @@ public class TransverseCategory implements Entity { ...@@ -17,6 +18,8 @@ public class TransverseCategory implements Entity {
private Boolean isLeaf; private Boolean isLeaf;
private String cion;
public TransverseCategory() { public TransverseCategory() {
} }
...@@ -37,6 +40,7 @@ public class TransverseCategory implements Entity { ...@@ -37,6 +40,7 @@ public class TransverseCategory implements Entity {
transverseCategory.setLevel(category.getLevel()); transverseCategory.setLevel(category.getLevel());
transverseCategory.setIsLeaf(category.getIsLeaf()); transverseCategory.setIsLeaf(category.getIsLeaf());
transverseCategory.setPid(category.getPid()); transverseCategory.setPid(category.getPid());
transverseCategory.setCion(StringUtils.isEmpty(category.getIcon())?"":category.getIcon().split(";")[0]);
return transverseCategory; return transverseCategory;
} }
......
...@@ -75,7 +75,7 @@ public class QueryPriceServiceImpl implements QueryPriceService { ...@@ -75,7 +75,7 @@ public class QueryPriceServiceImpl implements QueryPriceService {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
String time = date.format(formatter); String time = date.format(formatter);
xData.add(time); xData.add(time);
totalPrice += bidRecord.getPrice() / (double)100; totalPrice += (bidRecord.getPrice() / (double)100);
valueList.add(bidRecord.getPrice() / (double)100 / (double)10000); valueList.add(bidRecord.getPrice() / (double)100 / (double)10000);
} }
double averagePrice = totalPrice / bidRecordList.size(); double averagePrice = totalPrice / bidRecordList.size();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment