|
@@ -179,7 +179,7 @@ class MassagerService extends BaseService
|
|
|
isset($params['free_travel']) && is_numeric($params['free_travel']) ? $params['free_travel'] : null,
|
|
isset($params['free_travel']) && is_numeric($params['free_travel']) ? $params['free_travel'] : null,
|
|
|
isset($params['hot']) && is_numeric($params['hot']) ? $params['hot'] : null,
|
|
isset($params['hot']) && is_numeric($params['hot']) ? $params['hot'] : null,
|
|
|
isset($params['service_id']) && is_numeric($params['service_id']) ? $params['service_id'] : null,
|
|
isset($params['service_id']) && is_numeric($params['service_id']) ? $params['service_id'] : null,
|
|
|
- isset($params['sort']) ? $params['sort'] : null,
|
|
|
|
|
|
|
+ $params['sort'] ?? null,
|
|
|
$params['page'] ?? 1,
|
|
$params['page'] ?? 1,
|
|
|
$params['size'] ?? 10,
|
|
$params['size'] ?? 10,
|
|
|
$user_id,
|
|
$user_id,
|
|
@@ -451,11 +451,11 @@ class MassagerService extends BaseService
|
|
|
{
|
|
{
|
|
|
$config = config("site.massager_review_score");
|
|
$config = config("site.massager_review_score");
|
|
|
$fmt_config = [
|
|
$fmt_config = [
|
|
|
- "duration" => explode("|", isset($config["时长/天"]) ? $config["时长/天"] : "6|2"),
|
|
|
|
|
- "praise" => explode("|", isset($config["评论/好评"]) ? $config["评论/好评"] : "1|2"),
|
|
|
|
|
- "negative" => explode("|", isset($config["评论/差评"]) ? $config["评论/差评"] : "1|-10"),
|
|
|
|
|
- "performance" => explode("|", isset($config["业绩/天"]) ? $config["业绩/天"] : "500|2"),
|
|
|
|
|
- "reorder" => explode("|", isset($config["项目加钟"]) ? $config["项目加钟"] : "1|2")
|
|
|
|
|
|
|
+ "duration" => explode("|", $config["时长/天"] ?? "6|2"),
|
|
|
|
|
+ "praise" => explode("|", $config["评论/好评"] ?? "1|2"),
|
|
|
|
|
+ "negative" => explode("|", $config["评论/差评"] ?? "1|-10"),
|
|
|
|
|
+ "performance" => explode("|", $config["业绩/天"] ?? "500|2"),
|
|
|
|
|
+ "reorder" => explode("|", $config["项目加钟"] ?? "1|2")
|
|
|
];
|
|
];
|
|
|
$byDuration = $this->interiorScoreByDuration($m_id, $year, $month, $fmt_config["duration"]);
|
|
$byDuration = $this->interiorScoreByDuration($m_id, $year, $month, $fmt_config["duration"]);
|
|
|
$byPraise = $this->interiorScoreByPraise($m_id, $year, $month, $fmt_config["praise"]);
|
|
$byPraise = $this->interiorScoreByPraise($m_id, $year, $month, $fmt_config["praise"]);
|
|
@@ -518,10 +518,10 @@ class MassagerService extends BaseService
|
|
|
$intersection = array_intersect($now_day_times, $clocks_times);
|
|
$intersection = array_intersect($now_day_times, $clocks_times);
|
|
|
$meet = count($intersection) >= (fixed2Float((($config[0] ?? 6) * 60) / 10) + 1);
|
|
$meet = count($intersection) >= (fixed2Float((($config[0] ?? 6) * 60) / 10) + 1);
|
|
|
if ($meet) {
|
|
if ($meet) {
|
|
|
- array_push($intersections, [
|
|
|
|
|
|
|
+ $intersections[] = [
|
|
|
"date" => $now_day,
|
|
"date" => $now_day,
|
|
|
"count" => count($intersection),
|
|
"count" => count($intersection),
|
|
|
- ]);
|
|
|
|
|
|
|
+ ];
|
|
|
$score += $config[1] ?? 2;
|
|
$score += $config[1] ?? 2;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -563,10 +563,10 @@ class MassagerService extends BaseService
|
|
|
$details = [];
|
|
$details = [];
|
|
|
foreach ($fmt as $key => $value) {
|
|
foreach ($fmt as $key => $value) {
|
|
|
if ($value >= $config[0]) {
|
|
if ($value >= $config[0]) {
|
|
|
- array_push($details, [
|
|
|
|
|
|
|
+ $details[] = [
|
|
|
"date" => $key,
|
|
"date" => $key,
|
|
|
"count" => $value,
|
|
"count" => $value,
|
|
|
- ]);
|
|
|
|
|
|
|
+ ];
|
|
|
$score += $config[1];
|
|
$score += $config[1];
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|