对接连续任务列表接口和连续任务下发,便捷操作中暂停任务的对接,底部导航tab项的设置根据用户角色显示和设置
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import 'package:fpdart/fpdart.dart';
|
||||
import '../../../../core/error/failure.dart';
|
||||
import '../../domain/entities/work_history_record.dart';
|
||||
import '../../domain/repositories/work_history_repository.dart';
|
||||
import '../datasources/work_history_remote_datasource.dart';
|
||||
|
||||
class WorkHistoryRepositoryImpl implements WorkHistoryRepository {
|
||||
WorkHistoryRepositoryImpl(this.remote);
|
||||
final WorkHistoryRemoteDatasource remote;
|
||||
|
||||
@override
|
||||
Future<Either<Failure, WorkHistoryPage>> load({
|
||||
required int siteId,
|
||||
required int orgId,
|
||||
required int pageNum,
|
||||
required int pageSize,
|
||||
}) async {
|
||||
try {
|
||||
return Right(
|
||||
await remote.load(
|
||||
siteId: siteId,
|
||||
orgId: orgId,
|
||||
pageNum: pageNum,
|
||||
pageSize: pageSize,
|
||||
),
|
||||
);
|
||||
} catch (error) {
|
||||
return Left(Failure(error.toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user