| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- namespace app\workerapi\lists;
- use app\common\model\works\ServiceWork;
- class ServiceWorkGrabOrderLists extends BaseWorkerDataLists
- {
- /**
- * 获取列表
- * @return array
- * @author liugc <466014217@qq.com>
- * @date 2025/5/8 9:16
- */
- public function lists(): array
- {
- return ServiceWork::where('appointment_time','>',time())
- ->where(['work_status'=>0,'service_status'=>0,'work_pay_status'=>1,'master_worker_id'=>0])
- ->field(['id', 'work_sn', 'address', 'title', 'work_status', 'service_status','work_pay_status', 'appointment_time','receive_time','base_service_fee','service_fee'])
- ->append(['work_status_text','service_status_text'])
- ->limit($this->limitOffset, $this->limitLength)
- ->order(['appointment_time' => 'asc'])
- ->select()
- ->toArray();
- }
- /**
- * 获取数量
- * @return int
- * @author liugc <466014217@qq.com>
- * @date 2025/5/8 9:16
- */
- public function count(): int
- {
- return ServiceWork::where('appointment_time','>',time())->where(['work_status'=>0,'service_status'=>0,'work_pay_status'=>1,'master_worker_id'=>0])->count();
- }
- }
|