|
@@ -16,6 +16,7 @@ import org.springframework.beans.factory.annotation.Qualifier;
|
|
|
import org.springframework.boot.origin.Origin;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.*;
|
|
|
|
|
|
@Service
|
|
@@ -261,7 +262,9 @@ public class ChannelAnalyseServiceImpl implements ChannelAnalyseService {
|
|
|
else
|
|
|
tagAnalyse.setName("");
|
|
|
tagAnalyse.setCount(hashMap.get(s));
|
|
|
- tagAnalyse.setRadio((double) tagAnalyse.getCount() / total);
|
|
|
+ BigDecimal bigDecimal = new BigDecimal((double) tagAnalyse.getCount() / total);
|
|
|
+ double v = bigDecimal.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
|
|
|
+ tagAnalyse.setRadio(v);
|
|
|
list.add(tagAnalyse);
|
|
|
}
|
|
|
|
|
@@ -281,7 +284,7 @@ public class ChannelAnalyseServiceImpl implements ChannelAnalyseService {
|
|
|
start=end;
|
|
|
end+=6;
|
|
|
}
|
|
|
- result.put("pages",i);
|
|
|
+ result.put("pages",i-1);
|
|
|
result.put("total",list.size());
|
|
|
return result;
|
|
|
}
|