12345678910111213141516171819202122232425 |
- <?php
- declare(strict_types=1);
- namespace app\logics;
- use app\model\Tracking as Model;
- class TrackingLogic
- {
- public static function list($condition = [], $page, $limit, $order = 'addtime desc')
- {
- $page = intval($page);
- $limit = intval($limit);
- $data = Model::field('id, employee_id,type, state, related_pics, addtime, remark')
- ->where($condition)->with('employee')->page($page, $limit)->order($order)->select();
- return $data;
- }
- public static function count($condition = [])
- {
- return Model::where($condition)->count();
- }
- }
|