From 5e54859a30da6d36ce83fc65b73bd63337115fd2 Mon Sep 17 00:00:00 2001 From: zhenhui <1276357500@qq.com> Date: Fri, 5 Jun 2026 10:17:37 +0800 Subject: [PATCH] =?UTF-8?q?1.=E7=8E=A9=E5=AE=B6=E6=8A=BD=E5=A5=96=E8=AE=B0?= =?UTF-8?q?=E5=BD=95/dice/play=5Frecord/index=E6=96=B0=E5=A2=9E=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../locales/langs/en/dice/play_record.json | 1 + .../locales/langs/zh/dice/play_record.json | 1 + .../plugin/dice/play_record/index/index.vue | 44 +++++++++++++++++-- .../index/modules/table-search.vue | 13 ++++++ .../play_record/DicePlayRecordController.php | 2 + .../dice/model/play_record/DicePlayRecord.php | 16 +++++++ 6 files changed, 73 insertions(+), 4 deletions(-) diff --git a/saiadmin-artd/src/locales/langs/en/dice/play_record.json b/saiadmin-artd/src/locales/langs/en/dice/play_record.json index 4e6f77c..962782c 100644 --- a/saiadmin-artd/src/locales/langs/en/dice/play_record.json +++ b/saiadmin-artd/src/locales/langs/en/dice/play_record.json @@ -57,6 +57,7 @@ "rollNumber": "Roll Number", "rewardTier": "Reward Tier", "rewardConfig": "Reward Config", + "createTime": "Created At", "usernameFuzzy": "Username (fuzzy)", "nameFuzzy": "Name (fuzzy)", "uiTextFuzzy": "UI Text (fuzzy)", diff --git a/saiadmin-artd/src/locales/langs/zh/dice/play_record.json b/saiadmin-artd/src/locales/langs/zh/dice/play_record.json index 0242bb8..bc5c0dc 100644 --- a/saiadmin-artd/src/locales/langs/zh/dice/play_record.json +++ b/saiadmin-artd/src/locales/langs/zh/dice/play_record.json @@ -57,6 +57,7 @@ "rollNumber": "摇取点数和", "rewardTier": "中奖档位", "rewardConfig": "奖励配置", + "createTime": "创建时间", "usernameFuzzy": "用户名模糊", "nameFuzzy": "名称模糊", "uiTextFuzzy": "前端显示文本模糊", diff --git a/saiadmin-artd/src/views/plugin/dice/play_record/index/index.vue b/saiadmin-artd/src/views/plugin/dice/play_record/index/index.vue index cfc2d85..9c4d6cd 100644 --- a/saiadmin-artd/src/views/plugin/dice/play_record/index/index.vue +++ b/saiadmin-artd/src/views/plugin/dice/play_record/index/index.vue @@ -1,7 +1,7 @@ diff --git a/server/app/dice/controller/play_record/DicePlayRecordController.php b/server/app/dice/controller/play_record/DicePlayRecordController.php index 416064d..0a49e52 100644 --- a/server/app/dice/controller/play_record/DicePlayRecordController.php +++ b/server/app/dice/controller/play_record/DicePlayRecordController.php @@ -51,6 +51,8 @@ class DicePlayRecordController extends BaseController ['reward_ui_text', ''], ['reward_tier', ''], ['direction', ''], + ['create_time_min', ''], + ['create_time_max', ''], ]); $query = $this->logic->search($where); AdminScopeHelper::applyAdminScope($query, $this->adminInfo ?? null, $request->input('dept_id')); diff --git a/server/app/dice/model/play_record/DicePlayRecord.php b/server/app/dice/model/play_record/DicePlayRecord.php index 54c14d0..27a0b58 100644 --- a/server/app/dice/model/play_record/DicePlayRecord.php +++ b/server/app/dice/model/play_record/DicePlayRecord.php @@ -286,4 +286,20 @@ class DicePlayRecord extends DiceModel $query->where('roll_number', '<=', $value); } } + + /** 创建时间起始 */ + public function searchCreateTimeMinAttr($query, $value) + { + if ($value !== '' && $value !== null) { + $query->where('create_time', '>=', $value); + } + } + + /** 创建时间结束 */ + public function searchCreateTimeMaxAttr($query, $value) + { + if ($value !== '' && $value !== null) { + $query->where('create_time', '<=', $value); + } + } }