['mailId'], '%like%' => ['title'], 'between_time' => ['at'], ]; } /** * @notes 获取business列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author likeadmin * @date 2024/03/13 09:30 */ public function lists(): array { return UserMails::where($this->searchWhere) ->field(['id', 'uid', 'type', 'title', 'content', 'rewards', 'got', 'at', 'deleted', 'mailId']) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select() ->toArray(); } /** * @notes 获取business数量 * @return int * @author likeadmin * @date 2024/03/13 09:30 */ public function count(): int { return UserMails::where($this->searchWhere)->count(); } }