作者 lyh

gx

... ... @@ -44,13 +44,14 @@ class MonthCountController extends BaseController
}
/**
* @remark :获取关键字解锁
* @remark :获取关键字
* @name :getKeyword
* @author :lyh
* @method :post
* @time :2023/7/4 9:58
*/
public function getKeyword(){
public function getKeyword(MonthCountLogic $monthCountLogic){
$data = $monthCountLogic->getKeywordLists();
$this->response('success',Code::SUCCESS,$data);
}
}
... ...
... ... @@ -167,6 +167,25 @@ class MonthCountLogic extends BaseLogic
$startTime = date("Y-m-d", strtotime("-9 months", mktime(0, 0, 0)));
$ensTime = date('Y-m-d',time());
$lists = $count->list(['date'=>['between',[$startTime,$ensTime]],'project_id'=>$this->user['project_id']]);
return $this->success($lists);
$groupedData = [];
foreach ($lists as $k=>$v){
$month = date('Y-m', strtotime($v['date']));
if(!isset($groupedData[$month])){
$groupedData[$month] = [];
}
$groupedData[$month][] = $v;
}
return $this->success($groupedData);
}
/**
* @remark :获取关键字列表
* @name :getKeywordLists
* @author :lyh
* @method :post
* @time :2023/7/4 10:19
*/
public function getKeywordLists(){
$optimizeModel = new index();
}
}
... ...