投诉反馈

This commit is contained in:
chenbo 2023-09-25 12:00:17 +08:00
parent 88ebf59278
commit 2c2296db20

View File

@ -1,77 +1,84 @@
<?php <?php
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版 // | likeadmin快速开发前后端分离管理后台PHP版
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力 // | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo // | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin // | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin // | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn // | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权 // | likeadmin团队 版权所有 拥有最终解释权
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | author: likeadminTeam // | author: likeadminTeam
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
namespace app\adminapi\lists; namespace app\adminapi\lists;
use app\adminapi\lists\BaseAdminDataLists; use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\CompanyComplaintFeedback; use app\common\model\Company;
use app\common\lists\ListsSearchInterface; use app\common\model\CompanyComplaintFeedback;
use app\common\lists\ListsSearchInterface;
/**
* CompanyComplaintFeedback列表 /**
* Class CompanyComplaintFeedbackLists * CompanyComplaintFeedback列表
* @package app\adminapi\lists * Class CompanyComplaintFeedbackLists
*/ * @package app\adminapi\lists
class CompanyComplaintFeedbackLists extends BaseAdminDataLists implements ListsSearchInterface */
{ class CompanyComplaintFeedbackLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 设置搜索条件 /**
* @return \string[][] * @notes 设置搜索条件
* @author likeadmin * @return \string[][]
* @date 2023/09/23 15:14 * @author likeadmin
*/ * @date 2023/09/23 15:14
public function setSearch(): array */
{ public function setSearch(): array
return [ {
'=' => ['company_id', 'content'], return [
]; '=' => ['company_id', 'content'],
}
];
}
/**
* @notes 获取列表
* @return array /**
* @throws \think\db\exception\DataNotFoundException * @notes 获取列表
* @throws \think\db\exception\DbException * @return array
* @throws \think\db\exception\ModelNotFoundException * @throws \think\db\exception\DataNotFoundException
* @author likeadmin * @throws \think\db\exception\DbException
* @date 2023/09/23 15:14 * @throws \think\db\exception\ModelNotFoundException
*/ * @author likeadmin
public function lists(): array * @date 2023/09/23 15:14
{ */
return CompanyComplaintFeedback::where($this->searchWhere) public function lists(): array
->field(['id', 'company_id', 'content']) {
->limit($this->limitOffset, $this->limitLength) return CompanyComplaintFeedback::where($this->searchWhere)
->order(['id' => 'desc']) ->field(['id', 'company_id', 'content'])
->select() ->append(['company_name'], true)
->toArray(); ->limit($this->limitOffset, $this->limitLength)
} ->order(['id' => 'desc'])
->withAttr('company_name', function ($value, $data) {
$company = Company::where('id', $data['company_id'])->find();
/** return $company['company_name'];
* @notes 获取数量 })
* @return int ->select()
* @author likeadmin ->toArray();
* @date 2023/09/23 15:14 }
*/
public function count(): int
{ /**
return CompanyComplaintFeedback::where($this->searchWhere)->count(); * @notes 获取数量
} * @return int
* @author likeadmin
* @date 2023/09/23 15:14
*/
public function count(): int
{
return CompanyComplaintFeedback::where($this->searchWhere)->count();
}
} }