From 3b856cd25c43e99a1264d85e2b31eb12495d6fb8 Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Mon, 18 Dec 2023 16:23:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=AE=89=E6=8E=92-=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E4=BB=BB=E5=8A=A1=E6=97=B6=E9=80=89=E6=8B=A9=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E5=88=9B=E5=BB=BA=E6=A8=A1=E6=9D=BF=EF=BC=8C=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=A1=AB=E5=85=85=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lists/create_task_template/CreateTaskTemplateLists.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/adminapi/lists/create_task_template/CreateTaskTemplateLists.php b/app/adminapi/lists/create_task_template/CreateTaskTemplateLists.php index 8acb2eb2b..906e0447f 100644 --- a/app/adminapi/lists/create_task_template/CreateTaskTemplateLists.php +++ b/app/adminapi/lists/create_task_template/CreateTaskTemplateLists.php @@ -16,6 +16,7 @@ namespace app\adminapi\lists\create_task_template; use app\adminapi\lists\BaseAdminDataLists; +use app\common\model\auth\Admin; use app\common\model\create_task_template\CreateTaskTemplate; use app\common\lists\ListsSearchInterface; @@ -56,8 +57,12 @@ class CreateTaskTemplateLists extends BaseAdminDataLists implements ListsSearchI { return CreateTaskTemplate::where($this->searchWhere) ->field(['id', 'title', 'admin_id', 'task_role_id', 'type', 'stage_day_one', 'money', 'proportion_one', 'stage_day_two', 'proportion_two', 'money_two', 'stage_day_three', 'new_money_three', 'money_longtime', 'types', 'extend', 'recharge', 'content']) + ->append(['admin_name']) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) + ->withAttr('admin_name', function ($value, $data) { + return Admin::where('id', $data['admin_id'])->value('name'); + }) ->select() ->toArray(); }