123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- import 'dart:core';
- import 'package:fis_jsonrpc/client_base.dart';
- import 'package:fis_common/json_convert.dart';
- import 'identityApplyDB.m.dart';
- import 'device.m.dart';
- import 'identityApply.m.dart';
- class IdentityApplyDBService extends JsonRpcClientBase {
- IdentityApplyDBService(
- String host, {
- String serviceName = "IIdentityApplyDBService",
- Map<String, String>? headers,
- int? timeout,
- }) : super(
- host,
- serviceName,
- headers: headers,
- timeout: timeout,
- ) {
- /// 注册响应实体反序列化处理器
- FJsonConvert.setDecoder((map) => IdentityApplyDTO.fromJson(map));
- FJsonConvert.setDecoder((map) => PageCollection<IdentityApplyDTO>.fromJson(map));
- }
- Future<String> insertIdentityApplyAsync(CreateIdentityApplyDBRequest request) async {
- var rpcRst = await call("InsertIdentityApplyAsync", request);
- return rpcRst;
- }
- Future<IdentityApplyDTO> findIdentityApplyByNameAsync(String name) async {
- var rpcRst = await call("FindIdentityApplyByNameAsync", name);
- var result = IdentityApplyDTO.fromJson(rpcRst as Map<String, dynamic>);
- return result;
- }
- Future<IdentityApplyDTO> findIdentityApplyByCodeAsync(String code) async {
- var rpcRst = await call("FindIdentityApplyByCodeAsync", code);
- var result = IdentityApplyDTO.fromJson(rpcRst as Map<String, dynamic>);
- return result;
- }
- Future<PageCollection<IdentityApplyDTO>> findIdentityApplyPagesAsync(PageRequest request) async {
- var rpcRst = await call("FindIdentityApplyPagesAsync", request);
- var result = PageCollection<IdentityApplyDTO>.fromJson(rpcRst as Map<String, dynamic>);
- return result;
- }
- Future<bool> deleteIdentityApplyByCodeAsync(String code) async {
- var rpcRst = await call("DeleteIdentityApplyByCodeAsync", code);
- return rpcRst;
- }
- Future<bool> updateIdentityApplyByCodeAsync(String code,IdentityApplyDTO data,String extensionData) async {
- var rpcRst = await call("UpdateIdentityApplyByCodeAsync", [code,data,extensionData]);
- return rpcRst;
- }
- Future<List<IdentityApplyDTO>> getIdentityApplyByUserCode(String userCode) async {
- var rpcRst = await call("GetIdentityApplyByUserCode", userCode);
- var result = (rpcRst as List).map((e)=>IdentityApplyDTO.fromJson(e as Map<String, dynamic>)).toList();
- return result;
- }
- Future<List<IdentityApplyDTO>> findIdentityApplyListByUserCodeAsync(List<String> userCodes) async {
- var rpcRst = await call("FindIdentityApplyListByUserCodeAsync", userCodes);
- var result = (rpcRst as List).map((e)=>IdentityApplyDTO.fromJson(e as Map<String, dynamic>)).toList();
- return result;
- }
- }
|