|
|
@@ -15,12 +15,19 @@ class Issue extends BaseController
|
|
|
* @api {get} /issue/history 天机
|
|
|
* @apiGroup Issue
|
|
|
* @apiVersion 1.0.0
|
|
|
+ *
|
|
|
+ * @apiParam {String} [date] 日期 默认当天
|
|
|
+ * - 格式:yyyy-mm-dd
|
|
|
*/
|
|
|
function history()
|
|
|
{
|
|
|
try {
|
|
|
-
|
|
|
- CaoHistory::
|
|
|
+ request()->validate([
|
|
|
+ 'date' => ['nullable', 'date', 'date_format:-m-d']
|
|
|
+ ]);
|
|
|
+ $date = request()->input('date', null);
|
|
|
+ if (!$date) $date = date("Y-m-d");
|
|
|
+// CaoHistory::
|
|
|
|
|
|
|
|
|
$list = [];
|
|
|
@@ -159,8 +166,8 @@ class Issue extends BaseController
|
|
|
// 'status'=>3
|
|
|
];
|
|
|
$res = IssueService::paginate($params);
|
|
|
- foreach ($res['data'] as &$item){
|
|
|
- $item['day'] = date("m-d H:i",strtotime($item['end_time']));
|
|
|
+ foreach ($res['data'] as &$item) {
|
|
|
+ $item['day'] = date("m-d H:i", strtotime($item['end_time']));
|
|
|
}
|
|
|
} catch (ValidationException $e) {
|
|
|
return $this->error($e->validator->errors()->first());
|