|
@@ -167,6 +167,25 @@ class MonthCountLogic extends BaseLogic |
|
@@ -167,6 +167,25 @@ class MonthCountLogic extends BaseLogic |
|
167
|
$startTime = date("Y-m-d", strtotime("-9 months", mktime(0, 0, 0)));
|
167
|
$startTime = date("Y-m-d", strtotime("-9 months", mktime(0, 0, 0)));
|
|
168
|
$ensTime = date('Y-m-d',time());
|
168
|
$ensTime = date('Y-m-d',time());
|
|
169
|
$lists = $count->list(['date'=>['between',[$startTime,$ensTime]],'project_id'=>$this->user['project_id']]);
|
169
|
$lists = $count->list(['date'=>['between',[$startTime,$ensTime]],'project_id'=>$this->user['project_id']]);
|
|
170
|
- return $this->success($lists);
|
170
|
+ $groupedData = [];
|
|
|
|
171
|
+ foreach ($lists as $k=>$v){
|
|
|
|
172
|
+ $month = date('Y-m', strtotime($v['date']));
|
|
|
|
173
|
+ if(!isset($groupedData[$month])){
|
|
|
|
174
|
+ $groupedData[$month] = [];
|
|
|
|
175
|
+ }
|
|
|
|
176
|
+ $groupedData[$month][] = $v;
|
|
|
|
177
|
+ }
|
|
|
|
178
|
+ return $this->success($groupedData);
|
|
|
|
179
|
+ }
|
|
|
|
180
|
+
|
|
|
|
181
|
+ /**
|
|
|
|
182
|
+ * @remark :获取关键字列表
|
|
|
|
183
|
+ * @name :getKeywordLists
|
|
|
|
184
|
+ * @author :lyh
|
|
|
|
185
|
+ * @method :post
|
|
|
|
186
|
+ * @time :2023/7/4 10:19
|
|
|
|
187
|
+ */
|
|
|
|
188
|
+ public function getKeywordLists(){
|
|
|
|
189
|
+ $optimizeModel = new index();
|
|
171
|
}
|
190
|
}
|
|
172
|
} |
191
|
} |