调整代码格式及使用常量去替换常用值

This commit is contained in:
柳清爽
2025-05-08 10:39:53 +08:00
parent b5939b36b3
commit 0426485177
31 changed files with 230 additions and 191 deletions

View File

@@ -57,9 +57,9 @@ class GetCompanyListController extends BaseController
protected function getCompanyList(array $where): \think\Paginator
{
$query = CompanyModel::alias('c')
->field(
'id, name, status, companyId, memo, createTime'
);
->field([
'c.id', 'c.name', 'c.status', 'c.companyId', 'c.memo', 'c.createTime'
]);
foreach ($where as $key => $value) {
if (is_numeric($key) && is_array($value) && isset($value[0]) && $value[0] === 'exp') {
@@ -118,7 +118,7 @@ class GetCompanyListController extends BaseController
return ResponseHelper::success(
[
'list' => $this->makeReturnedResult($result),
'list' => $this->makeReturnedResult($result),
'total' => $result->total(),
]
);