|
@@ -55,14 +55,14 @@ class CheckAchievement extends Command
|
|
|
$output->info($this->log($v['uid'] . '总业绩:' . $achievement . '月业绩:' . $month_achievement));
|
|
|
$output->info($this->log($v['uid'] . '月业绩未达标,执行降级'));
|
|
|
|
|
|
-// $userLevel = $levelService->getUerLevelInfoByUid($v['uid']);
|
|
|
-// $levelService->search()->where('uid', $v['uid'])->where('level_id', $userLevel['level_id'])->update(['status' => 0, 'is_del' => 1]);
|
|
|
-// $output->info($this->log($v['uid'] . '原等级' . $userLevel['level_id']));
|
|
|
-//
|
|
|
-// $now_level = $levelService->getUerLevelInfoByUid($v['uid']);
|
|
|
-// User::where('uid', $v['uid'])->update(['level' => $now_level['level_id'] ?? 0]);
|
|
|
-//
|
|
|
-// $output->info($this->log($v['uid'] . '降级为' . ($now_level['level_id'] ?? 0)));
|
|
|
+ $userLevel = $levelService->getUerLevelInfoByUid($v['uid']);
|
|
|
+ $levelService->search()->where('uid', $v['uid'])->where('level_id', $userLevel['level_id'])->update(['status' => 0, 'is_del' => 1]);
|
|
|
+ $output->info($this->log($v['uid'] . '原等级' . $userLevel['level_id']));
|
|
|
+
|
|
|
+ $now_level = $levelService->getUerLevelInfoByUid($v['uid']);
|
|
|
+ User::where('uid', $v['uid'])->update(['level' => $now_level['level_id'] ?? 0]);
|
|
|
+
|
|
|
+ $output->info($this->log($v['uid'] . '降级为' . ($now_level['level_id'] ?? 0)));
|
|
|
|
|
|
$output->info($this->log($v['uid'] . '降级完成'));
|
|
|
// return;
|