|
|
@ -34,21 +34,24 @@ class IndexService extends BaseService |
|
|
*/ |
|
|
*/ |
|
|
public function processStatistic() |
|
|
public function processStatistic() |
|
|
{ |
|
|
{ |
|
|
|
|
|
$query = [ |
|
|
|
|
|
'delete_time' => 0 |
|
|
|
|
|
]; |
|
|
return [ |
|
|
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创作
|
|
|
'ai' => $this->creationArticleDao->count(), |
|
|
|
|
|
|
|
|
'ai' => $this->creationArticleDao->count($query), |
|
|
//授权账号
|
|
|
//授权账号
|
|
|
'account' => 0, |
|
|
'account' => 0, |
|
|
//投喂任务
|
|
|
//投喂任务
|
|
|
'task' => 0, |
|
|
'task' => 0, |
|
|
//训练问题
|
|
|
//训练问题
|
|
|
'question' => $this->questionDao->count(), |
|
|
|
|
|
|
|
|
'question' => $this->questionDao->count($query), |
|
|
//收录问题
|
|
|
//收录问题
|
|
|
'collect' => 0, |
|
|
'collect' => 0, |
|
|
//媒体投喂
|
|
|
//媒体投喂
|
|
|
@ -80,15 +83,17 @@ class IndexService extends BaseService |
|
|
public function createStatistic() |
|
|
public function createStatistic() |
|
|
{ |
|
|
{ |
|
|
$dates = []; |
|
|
$dates = []; |
|
|
|
|
|
$query = [ |
|
|
|
|
|
'delete_time' => 0 |
|
|
|
|
|
]; |
|
|
for ($i = 0; $i < 5; $i++) { |
|
|
for ($i = 0; $i < 5; $i++) { |
|
|
$dates[]['date'] = date('Y-m-d', strtotime("-{$i} days")); |
|
|
$dates[]['date'] = date('Y-m-d', strtotime("-{$i} days")); |
|
|
} |
|
|
} |
|
|
foreach ($dates as &$date) { |
|
|
foreach ($dates as &$date) { |
|
|
$begin = strtotime($date['date']); |
|
|
$begin = strtotime($date['date']); |
|
|
$end = strtotime("+1 day", $begin); |
|
|
$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; |
|
|
return $dates; |
|
|
} |
|
|
} |
|
|
|