| 12345678910111213141516171819202122232425262728293031323334 |
- <?php
- /**
- * @author 林海涛
- * @date 2024/7/28 上午11:30
- */
- namespace app\workerapi\lists;
- use app\common\model\master_worker\MasterWorkerRetentionMoneyLog;
- class MasterWorkerRetentionMoneyLogLists extends BaseWorkerDataLists
- {
- public function queryWhere()
- {
- $where = [];
- $where[] = ['worker_id', '=', $this->userId];
- return $where;
- }
- public function lists(): array
- {
- return MasterWorkerRetentionMoneyLog::where($this->searchWhere)
- ->where($this->queryWhere())
- ->append(['action_text'])
- ->field(['id', 'action','amount','remark','create_time','update_time'])
- ->order(['id' => 'dsc'])
- ->select()
- ->toArray();
- }
- public function count(): int
- {
- return MasterWorkerRetentionMoneyLog::where($this->queryWhere())->count();
- }
- }
|