修改评价
This commit is contained in:
@@ -716,7 +716,7 @@ class UserDoctorService extends BaseService
|
||||
$avg_score_params = [80, 100];
|
||||
} elseif ($evaluation_type == 3) {
|
||||
// 中/差评
|
||||
$avg_score_params = [0, 80];
|
||||
$avg_score_params = [0, 79];
|
||||
} else {
|
||||
return fail();
|
||||
}
|
||||
@@ -730,28 +730,28 @@ class UserDoctorService extends BaseService
|
||||
}
|
||||
|
||||
// 获取其他类型评论总数
|
||||
if ($evaluation_type != 1) {
|
||||
if ($evaluation_type == 1) {
|
||||
// 好评
|
||||
$avg_score_params = [80, 100];
|
||||
$good_quantity = OrderEvaluation::getScoreCount($params, $avg_score_params);
|
||||
|
||||
// 中/差评
|
||||
$avg_score_params = [0, 80];
|
||||
$avg_score_params = [0, 79];
|
||||
$bad_quantity = OrderEvaluation::getScoreCount($params, $avg_score_params);
|
||||
}
|
||||
|
||||
if ($evaluation_type != 2) {
|
||||
if ($evaluation_type == 2) {
|
||||
// 全部+
|
||||
$avg_score_params = [0, 100];
|
||||
$total_quantity = OrderEvaluation::getScoreCount($params, $avg_score_params);
|
||||
|
||||
// 中/差评
|
||||
$avg_score_params = [0, 80];
|
||||
$avg_score_params = [0, 79];
|
||||
$bad_quantity = OrderEvaluation::getScoreCount($params, $avg_score_params);
|
||||
|
||||
}
|
||||
|
||||
if ($evaluation_type != 3) {
|
||||
if ($evaluation_type == 3) {
|
||||
// 全部+
|
||||
$avg_score_params = [0, 100];
|
||||
$total_quantity = OrderEvaluation::getScoreCount($params, $avg_score_params);
|
||||
|
||||
Reference in New Issue
Block a user