import 'dart:core'; import 'package:fis_jsonrpc/client_base.dart'; import 'package:fis_common/json_convert.dart'; import 'identityApply.m.dart'; class IdentityApplyService extends JsonRpcClientBase { IdentityApplyService( String host, { String serviceName = "IIdentityApplyService", Map? headers, int? timeout, }) : super( host, serviceName, headers: headers, timeout: timeout, ) { /// 注册响应实体反序列化处理器 FJsonConvert.setDecoder((map) => IdentityApplyStateDTO.fromJson(map)); } Future> getIdentityApplys(TokenRequest request) async { var rpcRst = await call("GetIdentityApplys", request); var result = (rpcRst as List).map((e)=>IdentityApplyStateDTO.fromJson(e as Map)).toList(); return result; } Future getLastIdentityApply(GetLastIdentityApplyRequest request) async { var rpcRst = await call("GetLastIdentityApply", request); var result = IdentityApplyStateDTO.fromJson(rpcRst as Map); return result; } Future applyFor(ApplyForRequest request) async { var rpcRst = await call("ApplyFor", request); return rpcRst; } }