diff --git a/app/service/user/IndexService.php b/app/service/user/IndexService.php index 8968437..9714088 100644 --- a/app/service/user/IndexService.php +++ b/app/service/user/IndexService.php @@ -34,21 +34,24 @@ class IndexService extends BaseService */ public function processStatistic() { + $query = [ + 'delete_time' => 0 + ]; return [ //蒸馏词 - 'word' => $this->distillationWordDao->count(), + 'word' => $this->distillationWordDao->count($query), //图库 - 'library' => $this->portraitLibraryDao->count(), + 'library' => $this->portraitLibraryDao->count($query), //指令 - 'command' => $this->aiCommandDao->count(), + 'command' => $this->aiCommandDao->count($query), //AI创作 - 'ai' => $this->creationArticleDao->count(), + 'ai' => $this->creationArticleDao->count($query), //授权账号 'account' => 0, //投喂任务 'task' => 0, //训练问题 - 'question' => $this->questionDao->count(), + 'question' => $this->questionDao->count($query), //收录问题 'collect' => 0, //媒体投喂 @@ -80,15 +83,17 @@ class IndexService extends BaseService public function createStatistic() { $dates = []; + $query = [ + 'delete_time' => 0 + ]; for ($i = 0; $i < 5; $i++) { $dates[]['date'] = date('Y-m-d', strtotime("-{$i} days")); } foreach ($dates as &$date) { $begin = strtotime($date['date']); $end = strtotime("+1 day", $begin); - $date['count'] = $this->creationArticleDao->count([ - ['create_time', 'between', [$begin, $end]], - ]); + $query[] = ['create_time', 'between', [$begin, $end]]; + $date['count'] = $this->creationArticleDao->count($query); } return $dates; }