Commit 2b93b18c by zhiwj

添加评价人数

parent 7864002c
......@@ -513,19 +513,23 @@ public class EvaluateOutApiServiceImpl implements EvaluateOutApiService {
int count = 0;
// 评价总分
double sumScore = 0;
if (Constants.OPEN.equals(evaluateOrderConfig.getGoods())) {
if (Constants.OPEN.equals(evaluateOrderConfig.getGoods()) && goodsScore != null) {
count++;
sumScore += goodsScore;
}
if (Constants.OPEN.equals(evaluateOrderConfig.getStore())) {
if (Constants.OPEN.equals(evaluateOrderConfig.getStore()) && storeScore != null) {
count++;
sumScore += storeScore;
}
if (Constants.OPEN.equals(evaluateOrderConfig.getService())) {
if (Constants.OPEN.equals(evaluateOrderConfig.getService()) && serviceScore != null) {
count++;
sumScore += serviceScore;
}
return sumScore / count;
if (count > 0) {
return sumScore / count;
} else {
return 0;
}
}
private boolean matchConfigValue(Integer computeType, Integer computeScore, Integer score) {
......
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