12345678910111213141516171819202122232425262728293031 |
- import 'dart:core';
- import 'package:fis_jsonrpc/client_base.dart';
- import 'package:fis_common/json_convert.dart';
- import 'user.m.dart';
- class UserService extends JsonRpcClientBase {
- UserService(
- String host, {
- String serviceName = "IUserService",
- Map<String, String>? headers,
- int? timeout,
- }) : super(
- host,
- serviceName,
- headers: headers,
- timeout: timeout,
- ) {
- /// 注册响应实体反序列化处理器
- FJsonConvert.setDecoder((map) => UserInfo.fromJson(map));
- }
- Future<UserInfo> getUserInfoAsync(String userCode,String sessionId) async {
- var rpcRst = await call("GetUserInfoAsync", [userCode,sessionId]);
- var result = UserInfo.fromJson(rpcRst as Map<String, dynamic>);
- return result;
- }
- }
|