From 98a5c4f73f9586428236957fe2619e4f4943d892 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Mon, 23 Dec 2024 13:58:19 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=AF=E5=88=86=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/controller/PointLog.php | 20 ++++++++ .../src/model/PointsMallUserPointLog.php | 6 +++ .../src/view/point/index_search.html | 7 --- .../src/view/point_log/index.html | 51 +++++++++++++++++++ .../src/view/point_log/index_search.html | 10 ++++ 5 files changed, 87 insertions(+), 7 deletions(-) create mode 100644 plugs/think-plugs-points-mall/src/controller/PointLog.php create mode 100644 plugs/think-plugs-points-mall/src/view/point_log/index.html create mode 100644 plugs/think-plugs-points-mall/src/view/point_log/index_search.html diff --git a/plugs/think-plugs-points-mall/src/controller/PointLog.php b/plugs/think-plugs-points-mall/src/controller/PointLog.php new file mode 100644 index 0000000..396495e --- /dev/null +++ b/plugs/think-plugs-points-mall/src/controller/PointLog.php @@ -0,0 +1,20 @@ +title = '积分记录'; + PointsMallUserPointLog::mQuery()->layTable(function () { + }, static function (QueryHelper $query) { + $query->with('user'); + $query->dateBetween('create_at'); + }); + } +} \ No newline at end of file diff --git a/plugs/think-plugs-points-mall/src/model/PointsMallUserPointLog.php b/plugs/think-plugs-points-mall/src/model/PointsMallUserPointLog.php index b61b271..765502e 100644 --- a/plugs/think-plugs-points-mall/src/model/PointsMallUserPointLog.php +++ b/plugs/think-plugs-points-mall/src/model/PointsMallUserPointLog.php @@ -2,9 +2,15 @@ namespace plugin\points_mall\model; +use plugin\account\model\PluginAccountBind; use think\admin\Model; class PointsMallUserPointLog extends Model { protected $pk = 'uid'; + + public function user() + { + return $this->belongsTo(PluginAccountBind::class, 'uid'); + } } \ No newline at end of file diff --git a/plugs/think-plugs-points-mall/src/view/point/index_search.html b/plugs/think-plugs-points-mall/src/view/point/index_search.html index bc5a08c..28b4b6c 100644 --- a/plugs/think-plugs-points-mall/src/view/point/index_search.html +++ b/plugs/think-plugs-points-mall/src/view/point/index_search.html @@ -1,13 +1,6 @@