toArray(); } /** * @notes 更改服务商状态 * @param array $params * @return bool * @author heshihu * @date 2022/2/21 18:04 */ public static function updateStatus(array $params) { SupplyDemandInfo::update([ 'id' => $params['id'], 'status' => $params['status'] ]); return true; } /** * @notes 有效用户数据 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author 段誉 * @date 2022/10/13 10:53 */ public static function getValidUserData() { $list = User::where(['is_disable' => YesNoEnum::NO]) ->field('id,sn,nickname') ->order([ 'id' => 'desc']) ->select() ->toArray(); return $list; } }