71 lines
1.7 KiB
PHP
71 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace app\admin\lists\retail;
|
|
|
|
|
|
use app\admin\lists\BaseAdminDataLists;
|
|
use app\common\model\retail\Cashierclass;
|
|
use app\common\lists\ListsSearchInterface;
|
|
|
|
|
|
/**
|
|
* 零售订单列表
|
|
* Class CashierclassLists
|
|
* @package app\admin\listsretail
|
|
*/
|
|
class CashierclassLists extends BaseAdminDataLists implements ListsSearchInterface
|
|
{
|
|
|
|
|
|
/**
|
|
* @notes 设置搜索条件
|
|
* @return \string[][]
|
|
* @author likeadmin
|
|
* @date 2024/04/24 09:57
|
|
*/
|
|
public function setSearch(): array
|
|
{
|
|
$search= [
|
|
'=' => ['merchant', 'store_id', 'customer', 'time', 'number', 'user', 'pay_type', 'type', 'auditinguser'],
|
|
];
|
|
return $search;
|
|
}
|
|
|
|
public function queryWhere(): array
|
|
{
|
|
$where=['ass'];
|
|
return $where;
|
|
}
|
|
|
|
/**
|
|
* @notes 获取零售订单列表
|
|
* @return array
|
|
* @throws \think\db\exception\DataNotFoundException
|
|
* @throws \think\db\exception\DbException
|
|
* @throws \think\db\exception\ModelNotFoundException
|
|
* @author likeadmin
|
|
* @date 2024/04/24 09:57
|
|
*/
|
|
public function lists(): array
|
|
{
|
|
return Cashierclass::where($this->searchWhere)
|
|
->field(['id', 'merchant', 'store_id', 'customer', 'time', 'number', 'total', 'deduction_price', 'actual', 'money', 'user', 'pay_type', 'type', 'auditinguser', 'auditingtime'])
|
|
->limit($this->limitOffset, $this->limitLength)
|
|
->order(['id' => 'desc'])
|
|
->select()
|
|
->toArray();
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 获取零售订单数量
|
|
* @return int
|
|
* @author likeadmin
|
|
* @date 2024/04/24 09:57
|
|
*/
|
|
public function count(): int
|
|
{
|
|
return Cashierclass::where($this->searchWhere)->count();
|
|
}
|
|
|
|
} |