告警中心的二级详情页面+信息中心的页面+对接机器人接口
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
|
||||
import 'package:fpdart/fpdart.dart';
|
||||
import '../../../../../core/error/failure.dart';
|
||||
import '../../data/datasources/site_datasource.dart';
|
||||
import '../../domain/entities/site_entity.dart';
|
||||
import '../../domain/repositories/site_repository.dart';
|
||||
|
||||
class SiteRepositoryImpl implements SiteRepository {
|
||||
final SiteDataSource dataSource;
|
||||
|
||||
SiteRepositoryImpl(this.dataSource);
|
||||
|
||||
@override
|
||||
Future<Either<Failure, List<SiteEntity>>> getSiteList(int orgId) async {
|
||||
try {
|
||||
final sites = await dataSource.getSiteList(orgId);
|
||||
return Right(sites);
|
||||
} catch (e) {
|
||||
return Left(Failure(e.toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user