frontAuthorityGroups.dart 898 B

12345678910111213141516171819202122232425262728293031
  1. import 'dart:core';
  2. import 'package:fis_jsonrpc/client_base.dart';
  3. import 'package:fis_common/json_convert.dart';
  4. import 'frontAuthorityGroups.m.dart';
  5. class FrontAuthorityGroupsService extends JsonRpcClientBase {
  6. FrontAuthorityGroupsService(
  7. String host, {
  8. String serviceName = "IFrontAuthorityGroupsService",
  9. Map<String, String>? headers,
  10. int? timeout,
  11. }) : super(
  12. host,
  13. serviceName,
  14. headers: headers,
  15. timeout: timeout,
  16. ) {
  17. /// 注册响应实体反序列化处理器
  18. FJsonConvert.setDecoder((map) => FrontAuthorityGroupInfo.fromJson(map));
  19. }
  20. Future<List<FrontAuthorityGroupInfo>> getNeedToDisplayAuthorityGroups(String sessionId) async {
  21. var rpcRst = await call("GetNeedToDisplayAuthorityGroups", sessionId);
  22. var result = (rpcRst as List).map((e)=>FrontAuthorityGroupInfo.fromJson(e as Map<String, dynamic>)).toList();
  23. return result;
  24. }
  25. }