<?php
 namespace App\Http\Controllers\Admin; use App\Types\VipArticleOrderStatus; use TechOnline\Laravel\Dao\ModelUtil; use TechOnline\Laravel\Type\TypeUtil; use TechSoft\Laravel\Admin\Cms\BasicCms; use TechSoft\Laravel\Admin\Cms\Field\FieldDate; use TechSoft\Laravel\Admin\Cms\Field\FieldRichtext; use TechSoft\Laravel\Admin\Cms\Field\FieldSelect; use TechSoft\Laravel\Admin\Cms\Field\FieldText; use TechSoft\Laravel\Admin\Support\AdminCheckController; use TechSoft\Laravel\Admin\Util\AdminCmsUtil; use TechSoft\Laravel\Shop\Types\OrderStatus; class VipArticleOrderController extends AdminCheckController { private $cmsConfigData = [ 'model' => 'vip_article_order', 'pageTitle' => '付费文章订单', 'group' => 'data', 'fields' => [ 'memberUserId' => ['type' => FieldText::class, 'title' => '用户', 'list' => true, 'add' => true, 'edit' => true, 'view' => true,], 'articleId' => ['type' => FieldText::class, 'title' => '文章ID', 'list' => true, 'add' => true, 'edit' => true, 'view' => true,], 'payFee' => ['type' => FieldText::class, 'title' => '支付金额', 'list' => true, 'add' => true, 'edit' => true, 'view' => true,], 'status' => ['type' => FieldSelect::class, 'title' => '状态', 'list' => true, 'add' => true, 'edit' => true, 'view' => true, 'search' => true, 'optionType' => VipArticleOrderStatus::class,], ] ]; public function dataProcessView(&$item, &$record) { $item['memberUserId'] = AdminCmsUtil::memberUserId($record['memberUserId'], '\App\Http\Controllers\Admin\MemberController@dataView'); $item['status'] = AdminCmsUtil::colorText($record['status'], VipArticleOrderStatus::class); } public function dataList(BasicCms $basicCms) { return $basicCms->executeList($this, $this->cmsConfigData); } public function dataAdd(BasicCms $basicCms) { return $basicCms->executeAdd($this, $this->cmsConfigData); } public function dataEdit(BasicCms $basicCms) { return $basicCms->executeEdit($this, $this->cmsConfigData); } public function dataDelete(BasicCms $basicCms) { return $basicCms->executeDelete($this, $this->cmsConfigData); } public function dataView(BasicCms $basicCms) { return $basicCms->executeView($this, $this->cmsConfigData); } }