Skip to content

Commit

Permalink
修复一下
Browse files Browse the repository at this point in the history
  • Loading branch information
doyouhaobaby committed Feb 17, 2023
1 parent 464f1cc commit 2e4e5a9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
20 changes: 0 additions & 20 deletions app/Domain/Entity/Product/BaseBrandModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,6 @@ class BaseBrandModel extends Model
],
];

/**
* 获取商品品牌列表.
*/
public function getList(array $arrIn = []): array
{
$arrIn['scope'] = 'list';

return $this->findListAndCount($arrIn);
}

/**
* 添加更新商品品牌信息.
*/
Expand Down Expand Up @@ -139,16 +129,6 @@ public function updateInfo(array $arrIn): int
return $intID;
}

/**
* 获取商品品牌信息.
*/
public function getInfo(array $arrIn): mixed
{
$arrIn['scope'] = 'one';

return $this->findOne($arrIn);
}

/**
* 删除一条记录.
*/
Expand Down
22 changes: 21 additions & 1 deletion app/Infra/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ public function index(string $index = ''): static
return $this;
}

public function sum(string $field = '*'): string|int|float
public function sum(string $field = '*'): string|int|float|null
{
return $this->callStatisticalQuery('sum', $field);
}
Expand Down Expand Up @@ -596,6 +596,26 @@ public function findOne(array $in = []): string|array
return $this->find();
}

/**
* 获取信息.
*/
public function getInfo(array $in, string $scope = 'one'): mixed
{
$in['scope'] = $scope;

return $this->findOne($in);
}

/**
* 获取列表.
*/
public function getList(array $in = [], string $scope = 'list'): array
{
$in['scope'] = $scope;

return $this->findListAndCount($in);
}

/**
* 查询数据.
*/
Expand Down

0 comments on commit 2e4e5a9

Please sign in to comment.