Commit cba5fa7b by zhiwj

修改门店分数的取值

parent 58db4b7a
......@@ -239,13 +239,16 @@ public class EvaluateManageApiServiceImpl implements EvaluateManageApiService {
count++;
sum += Double.valueOf(serviceScore.toString());
}
if (count > 0) {
Object storeId = stringObjectMap.get("storeId");
if (storeId != null) {
Integer storeIdInt = Integer.valueOf(storeId.toString());
Object storeId = stringObjectMap.get("storeId");
if (storeId != null) {
Integer storeIdInt = Integer.valueOf(storeId.toString());
if (count > 0) {
evaluateQO.setStoreIdList(Collections.singletonList(storeIdInt));
Integer evaluateCount = this.evaluateService.countEvaluate(evaluateQO);
storeApiService.updateScore(enterpriseId, storeIdInt, sum / count, evaluateCount);
} else {
// 如果是没有评价过的门店 默认给10分
storeApiService.updateScore(enterpriseId, storeIdInt, 10, 0);
}
}
}
......
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