melon.yin 3 năm trước cách đây
mục cha
commit
0c2f25d260

+ 4 - 4
lib/services/identityApply.dart

@@ -18,12 +18,12 @@ class IdentityApplyService extends JsonRpcClientBase {
 						timeout: timeout,
 				) {
 		/// 注册响应实体反序列化处理器
-		FJsonConvert.setDecoder((map) => IdentityApplyInfo.fromJson(map));
+		FJsonConvert.setDecoder((map) => IdentityApplyStateInfo.fromJson(map));
 	}
 
-	Future<List<IdentityApplyInfo>> getIdentityApplys(String sessionId,String userCode) async {
-		var rpcRst = await call("GetIdentityApplys", [sessionId,userCode]);
-		var result = (rpcRst as List).map((e)=>IdentityApplyInfo.fromJson(e as Map<String, dynamic>)).toList();
+	Future<List<IdentityApplyStateInfo>> getIdentityApplys(String sessionId) async {
+		var rpcRst = await call("GetIdentityApplys", sessionId);
+		var result = (rpcRst as List).map((e)=>IdentityApplyStateInfo.fromJson(e as Map<String, dynamic>)).toList();
 		return result;
 	}
 

+ 40 - 34
lib/services/identityApply.m.dart

@@ -4,31 +4,57 @@ import 'package:fis_jsonrpc/utils.dart';

enum ApplyStateEnum {
 	Passed,
 }
 
+class IdentityApplyStateInfo {
+	String? applyPosition;
+	ApplyStateEnum applyState;
+	String? applyNote;
+	DateTime? createTime;
+	DateTime? updateTime;
+
+	IdentityApplyStateInfo({
+		this.applyPosition,
+		this.applyState=ApplyStateEnum.Applying,
+		this.applyNote,
+		this.createTime,
+		this.updateTime,
+	});
+
+	factory IdentityApplyStateInfo.fromJson(Map<String, dynamic> map) {
+		return IdentityApplyStateInfo( 
+			applyPosition: map['ApplyPosition'],
+			applyState: ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']),
+			applyNote: map['ApplyNote'],
+			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
+			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(applyPosition != null)
+			map['ApplyPosition'] = applyPosition;
+		map['ApplyState'] = applyState.index;
+		if(applyNote != null)
+			map['ApplyNote'] = applyNote;
+		if(createTime != null)
+			map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
+		if(updateTime != null)
+			map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
+		return map;
+	}
+}
+
 class IdentityApplyInfo {
-	String? identityApplyCode;
-	String? userCode;
-	String? realName;
-	String? emailAddress;
-	String? organizationCode;
 	String? applyPosition;
 	List<String>? identityCard;
 	List<String>? licenseCard;
-	ApplyStateEnum applyState;
-	String? applyNote;
 	DateTime? createTime;
 	DateTime? updateTime;
 
 	IdentityApplyInfo({
-		this.identityApplyCode,
-		this.userCode,
-		this.realName,
-		this.emailAddress,
-		this.organizationCode,
 		this.applyPosition,
 		this.identityCard,
 		this.licenseCard,
-		this.applyState=ApplyStateEnum.Applying,
-		this.applyNote,
 		this.createTime,
 		this.updateTime,
 	});
@@ -37,16 +63,9 @@ class IdentityApplyInfo {
 		final identityCardData = map['IdentityCard'];
 		final licenseCardData = map['LicenseCard'];
 		return IdentityApplyInfo( 
-			identityApplyCode: map['IdentityApplyCode'],
-			userCode: map['UserCode'],
-			realName: map['RealName'],
-			emailAddress: map['EmailAddress'],
-			organizationCode: map['OrganizationCode'],
 			applyPosition: map['ApplyPosition'],
 			identityCard: identityCardData != null ? (identityCardData as List).map((e) => e as String).toList(): null,
 			licenseCard: licenseCardData != null ? (licenseCardData as List).map((e) => e as String).toList(): null,
-			applyState: ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']),
-			applyNote: map['ApplyNote'],
 			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
 			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
 		);
@@ -54,25 +73,12 @@ class IdentityApplyInfo {
 
 	Map<String, dynamic> toJson() {
 		final map = Map<String, dynamic>();
-		if(identityApplyCode != null)
-			map['IdentityApplyCode'] = identityApplyCode;
-		if(userCode != null)
-			map['UserCode'] = userCode;
-		if(realName != null)
-			map['RealName'] = realName;
-		if(emailAddress != null)
-			map['EmailAddress'] = emailAddress;
-		if(organizationCode != null)
-			map['OrganizationCode'] = organizationCode;
 		if(applyPosition != null)
 			map['ApplyPosition'] = applyPosition;
 		if(identityCard != null)
 			map['IdentityCard'] = identityCard;
 		if(licenseCard != null)
 			map['LicenseCard'] = licenseCard;
-		map['ApplyState'] = applyState.index;
-		if(applyNote != null)
-			map['ApplyNote'] = applyNote;
 		if(createTime != null)
 			map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
 		if(updateTime != null)

+ 9 - 9
lib/services/login.m.dart

@@ -167,12 +167,12 @@ class UserInfo {
 	String? email;
 	String? nickName;
 	String? fullName;
-	String? headImageToken;
+	String? headImageUrl;
 	String? organizationCode;
 	List<String>? authorityGroups;
 	List<String>? bindDevices;
-	int score;
 	String? lastIP;
+	int logintimes;
 	UserInfoStateEnum userState;
 	List<String>? roleCodes;
 	List<String>? rankCodes;
@@ -188,12 +188,12 @@ class UserInfo {
 		this.email,
 		this.nickName,
 		this.fullName,
-		this.headImageToken,
+		this.headImageUrl,
 		this.organizationCode,
 		this.authorityGroups,
 		this.bindDevices,
-		this.score=0,
 		this.lastIP,
+		this.logintimes=0,
 		this.userState=UserInfoStateEnum.Nonactivated,
 		this.roleCodes,
 		this.rankCodes,
@@ -211,12 +211,12 @@ class UserInfo {
 			email: map['Email'],
 			nickName: map['NickName'],
 			fullName: map['FullName'],
-			headImageToken: map['HeadImageToken'],
+			headImageUrl: map['HeadImageUrl'],
 			organizationCode: map['OrganizationCode'],
 			authorityGroups: map['AuthorityGroups'].cast<String>().toList(),
 			bindDevices: map['BindDevices'].cast<String>().toList(),
-			score: map['Score'],
 			lastIP: map['LastIP'],
+			logintimes: map['Logintimes'],
 			userState: UserInfoStateEnum.values.firstWhere((e) => e.index == map['UserState']),
 			roleCodes: map['RoleCodes'].cast<String>().toList(),
 			rankCodes: map['RankCodes'].cast<String>().toList(),
@@ -241,17 +241,17 @@ class UserInfo {
 			map['NickName'] = nickName;
 		if(fullName != null)
 			map['FullName'] = fullName;
-		if(headImageToken != null)
-			map['HeadImageToken'] = headImageToken;
+		if(headImageUrl != null)
+			map['HeadImageUrl'] = headImageUrl;
 		if(organizationCode != null)
 			map['OrganizationCode'] = organizationCode;
 		if(authorityGroups != null)
 			map['AuthorityGroups'] = authorityGroups;
 		if(bindDevices != null)
 			map['BindDevices'] = bindDevices;
-		map['Score'] = score;
 		if(lastIP != null)
 			map['LastIP'] = lastIP;
+		map['Logintimes'] = logintimes;
 		map['UserState'] = userState.index;
 		if(roleCodes != null)
 			map['RoleCodes'] = roleCodes;

+ 9 - 9
lib/services/management.m.dart

@@ -117,12 +117,12 @@ class UserInfo {
 	String? email;
 	String? nickName;
 	String? fullName;
-	String? headImageToken;
+	String? headImageUrl;
 	String? organizationCode;
 	List<String>? authorityGroups;
 	List<String>? bindDevices;
-	int score;
 	String? lastIP;
+	int logintimes;
 	UserInfoStateEnum userState;
 	List<String>? roleCodes;
 	List<String>? rankCodes;
@@ -138,12 +138,12 @@ class UserInfo {
 		this.email,
 		this.nickName,
 		this.fullName,
-		this.headImageToken,
+		this.headImageUrl,
 		this.organizationCode,
 		this.authorityGroups,
 		this.bindDevices,
-		this.score=0,
 		this.lastIP,
+		this.logintimes=0,
 		this.userState=UserInfoStateEnum.Nonactivated,
 		this.roleCodes,
 		this.rankCodes,
@@ -161,12 +161,12 @@ class UserInfo {
 			email: map['Email'],
 			nickName: map['NickName'],
 			fullName: map['FullName'],
-			headImageToken: map['HeadImageToken'],
+			headImageUrl: map['HeadImageUrl'],
 			organizationCode: map['OrganizationCode'],
 			authorityGroups: map['AuthorityGroups'].cast<String>().toList(),
 			bindDevices: map['BindDevices'].cast<String>().toList(),
-			score: map['Score'],
 			lastIP: map['LastIP'],
+			logintimes: map['Logintimes'],
 			userState: UserInfoStateEnum.values.firstWhere((e) => e.index == map['UserState']),
 			roleCodes: map['RoleCodes'].cast<String>().toList(),
 			rankCodes: map['RankCodes'].cast<String>().toList(),
@@ -191,17 +191,17 @@ class UserInfo {
 			map['NickName'] = nickName;
 		if(fullName != null)
 			map['FullName'] = fullName;
-		if(headImageToken != null)
-			map['HeadImageToken'] = headImageToken;
+		if(headImageUrl != null)
+			map['HeadImageUrl'] = headImageUrl;
 		if(organizationCode != null)
 			map['OrganizationCode'] = organizationCode;
 		if(authorityGroups != null)
 			map['AuthorityGroups'] = authorityGroups;
 		if(bindDevices != null)
 			map['BindDevices'] = bindDevices;
-		map['Score'] = score;
 		if(lastIP != null)
 			map['LastIP'] = lastIP;
+		map['Logintimes'] = logintimes;
 		map['UserState'] = userState.index;
 		if(roleCodes != null)
 			map['RoleCodes'] = roleCodes;

+ 3 - 3
lib/services/region.dart

@@ -21,9 +21,9 @@ class RegionService extends JsonRpcClientBase {
 		FJsonConvert.setDecoder((map) => RegionInfo.fromJson(map));
 	}
 
-	Future<List<RegionInfo>> getRegionsByFatherCode(String fatherCode) async {
-		var rpcRst = await call("GetRegionsByFatherCode", fatherCode);
-		var result = (rpcRst as List).map((e)=>RegionInfo.fromJson(e as Map<String, dynamic>)).toList();
+	Future<RegionInfo> getRegions(String version,String languageType) async {
+		var rpcRst = await call("GetRegions", [version,languageType]);
+		var result = RegionInfo.fromJson(rpcRst as Map<String, dynamic>);
 		return result;
 	}
 

+ 16 - 22
lib/services/region.m.dart

@@ -1,30 +1,23 @@
-import 'package:fis_jsonrpc/utils.dart';

enum RegionGradeEnum {
-	Country,
-	Province,
-	City,
-	Area,
-}
-
-class RegionInfo {
-	String? regionCode;
-	RegionGradeEnum regionGrade;
-	String? fatherCode;
+import 'package:fis_jsonrpc/utils.dart';

class RegionInfo {
+	String? regionVersion;
+	String? languageType;
+	String? reginData;
 	DateTime? createTime;
 	DateTime? updateTime;
 
 	RegionInfo({
-		this.regionCode,
-		this.regionGrade=RegionGradeEnum.Country,
-		this.fatherCode,
+		this.regionVersion,
+		this.languageType,
+		this.reginData,
 		this.createTime,
 		this.updateTime,
 	});
 
 	factory RegionInfo.fromJson(Map<String, dynamic> map) {
 		return RegionInfo( 
-			regionCode: map['RegionCode'],
-			regionGrade: RegionGradeEnum.values.firstWhere((e) => e.index == map['RegionGrade']),
-			fatherCode: map['FatherCode'],
+			regionVersion: map['RegionVersion'],
+			languageType: map['LanguageType'],
+			reginData: map['ReginData'],
 			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
 			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
 		);
@@ -32,11 +25,12 @@ class RegionInfo {
 
 	Map<String, dynamic> toJson() {
 		final map = Map<String, dynamic>();
-		if(regionCode != null)
-			map['RegionCode'] = regionCode;
-		map['RegionGrade'] = regionGrade.index;
-		if(fatherCode != null)
-			map['FatherCode'] = fatherCode;
+		if(regionVersion != null)
+			map['RegionVersion'] = regionVersion;
+		if(languageType != null)
+			map['LanguageType'] = languageType;
+		if(reginData != null)
+			map['ReginData'] = reginData;
 		if(createTime != null)
 			map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
 		if(updateTime != null)

+ 1 - 15
lib/services/role.m.dart

@@ -1,21 +1,12 @@
-import 'package:fis_jsonrpc/utils.dart';

enum RoleTypeEnum {
-	Default,
-	Authentication,
-}
-
-class RoleInfo {
+import 'package:fis_jsonrpc/utils.dart';

class RoleInfo {
 	String? roleCode;
 	String? roleName;
-	String? frontGroupCode;
-	RoleTypeEnum roleType;
 	DateTime? createTime;
 	DateTime? updateTime;
 
 	RoleInfo({
 		this.roleCode,
 		this.roleName,
-		this.frontGroupCode,
-		this.roleType=RoleTypeEnum.Default,
 		this.createTime,
 		this.updateTime,
 	});
@@ -24,8 +15,6 @@ class RoleInfo {
 		return RoleInfo( 
 			roleCode: map['RoleCode'],
 			roleName: map['RoleName'],
-			frontGroupCode: map['FrontGroupCode'],
-			roleType: RoleTypeEnum.values.firstWhere((e) => e.index == map['RoleType']),
 			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
 			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
 		);
@@ -37,9 +26,6 @@ class RoleInfo {
 			map['RoleCode'] = roleCode;
 		if(roleName != null)
 			map['RoleName'] = roleName;
-		if(frontGroupCode != null)
-			map['FrontGroupCode'] = frontGroupCode;
-		map['RoleType'] = roleType.index;
 		if(createTime != null)
 			map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
 		if(updateTime != null)

+ 21 - 19
lib/services/storage.dart

@@ -5,25 +5,27 @@ import 'package:fis_jsonrpc/client_base.dart';
 import 'storage.m.dart';
 
 class StorageService extends JsonRpcClientBase {
-  StorageService(
-    String host, {
-    String serviceName = "IStorageService",
-    Map<String, String>? headers,
-    int? timeout,
-  }) : super(
-          host,
-          serviceName,
-          headers: headers,
-          timeout: timeout,
-        );
+	StorageService(
+		String host, {
+		String serviceName = "IStorageService",
+		Map<String, String>? headers,
+		int? timeout,
+	}) : super(
+						host,
+						serviceName,
+						headers: headers,
+						timeout: timeout,
+				);
 
-  Future<String> uploadAsync(StorageFileInfo fileInfo) async {
-    var rpcRst = await call("UploadAsync", fileInfo);
-    return rpcRst;
-  }
+	Future<String> uploadAsync(StorageFileInfo fileInfo) async {
+		var rpcRst = await call("UploadAsync", fileInfo);
+		return rpcRst;
+	}
+
+	Future<List<int>> getAsync(String fileToken) async {
+		var rpcRst = await call("GetAsync", fileToken);
+		return rpcRst;
+	}
 
-  Future<List<int>> getAsync(String fileToken) async {
-    var rpcRst = await call("GetAsync", fileToken);
-    return rpcRst;
-  }
 }
+

+ 34 - 32
lib/services/storage.m.dart

@@ -1,40 +1,42 @@
 enum UploadDataType {
-  Base64String,
-  ByteArray,
+	Base64String,
+	ByteArray,
 }
 
 class StorageFileInfo {
-  UploadDataType uploadDataCategory;
-  List<int>? fileData;
-  String? fileBase64String;
-  String? fileExtension;
+	UploadDataType uploadDataCategory;
+	List<int>? fileData;
+	String? fileBase64String;
+	String? fileName;
 
-  StorageFileInfo({
-    this.uploadDataCategory = UploadDataType.Base64String,
-    this.fileData,
-    this.fileBase64String,
-    this.fileExtension,
-  });
+	StorageFileInfo({
+		this.uploadDataCategory=UploadDataType.Base64String,
+		this.fileData,
+		this.fileBase64String,
+		this.fileName,
+	});
 
-  factory StorageFileInfo.fromJson(Map<String, dynamic> map) {
-    final fileDataData = map['FileData'];
-    return StorageFileInfo(
-      uploadDataCategory: UploadDataType.values
-          .firstWhere((e) => e.index == map['UploadDataCategory']),
-      fileData: fileDataData != null
-          ? (fileDataData as List).map((e) => e as int).toList()
-          : null,
-      fileBase64String: map['FileBase64String'],
-      fileExtension: map['FileExtension'],
-    );
-  }
+	factory StorageFileInfo.fromJson(Map<String, dynamic> map) {
+		final fileDataData = map['FileData'];
+		return StorageFileInfo( 
+			uploadDataCategory: UploadDataType.values.firstWhere((e) => e.index == map['UploadDataCategory']),
+			fileData: fileDataData != null ? (fileDataData as List).map((e) => e as int).toList(): null,
+			fileBase64String: map['FileBase64String'],
+			fileName: map['FileName'],
+		);
+	}
 
-  Map<String, dynamic> toJson() {
-    final map = Map<String, dynamic>();
-    map['UploadDataCategory'] = uploadDataCategory.index;
-    if (fileData != null) map['FileData'] = fileData;
-    if (fileBase64String != null) map['FileBase64String'] = fileBase64String;
-    if (fileExtension != null) map['FileExtension'] = fileExtension;
-    return map;
-  }
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		map['UploadDataCategory'] = uploadDataCategory.index;
+		if(fileData != null)
+			map['FileData'] = fileData;
+		if(fileBase64String != null)
+			map['FileBase64String'] = fileBase64String;
+		if(fileName != null)
+			map['FileName'] = fileName;
+		return map;
+	}
 }
+
+

+ 9 - 9
lib/services/user.m.dart

@@ -16,12 +16,12 @@ class UserInfo {
 	String? email;
 	String? nickName;
 	String? fullName;
-	String? headImageToken;
+	String? headImageUrl;
 	String? organizationCode;
 	List<String>? authorityGroups;
 	List<String>? bindDevices;
-	int score;
 	String? lastIP;
+	int logintimes;
 	UserInfoStateEnum userState;
 	List<String>? roleCodes;
 	List<String>? rankCodes;
@@ -37,12 +37,12 @@ class UserInfo {
 		this.email,
 		this.nickName,
 		this.fullName,
-		this.headImageToken,
+		this.headImageUrl,
 		this.organizationCode,
 		this.authorityGroups,
 		this.bindDevices,
-		this.score=0,
 		this.lastIP,
+		this.logintimes=0,
 		this.userState=UserInfoStateEnum.Nonactivated,
 		this.roleCodes,
 		this.rankCodes,
@@ -60,12 +60,12 @@ class UserInfo {
 			email: map['Email'],
 			nickName: map['NickName'],
 			fullName: map['FullName'],
-			headImageToken: map['HeadImageToken'],
+			headImageUrl: map['HeadImageUrl'],
 			organizationCode: map['OrganizationCode'],
 			authorityGroups: map['AuthorityGroups'].cast<String>().toList(),
 			bindDevices: map['BindDevices'].cast<String>().toList(),
-			score: map['Score'],
 			lastIP: map['LastIP'],
+			logintimes: map['Logintimes'],
 			userState: UserInfoStateEnum.values.firstWhere((e) => e.index == map['UserState']),
 			roleCodes: map['RoleCodes'].cast<String>().toList(),
 			rankCodes: map['RankCodes'].cast<String>().toList(),
@@ -90,17 +90,17 @@ class UserInfo {
 			map['NickName'] = nickName;
 		if(fullName != null)
 			map['FullName'] = fullName;
-		if(headImageToken != null)
-			map['HeadImageToken'] = headImageToken;
+		if(headImageUrl != null)
+			map['HeadImageUrl'] = headImageUrl;
 		if(organizationCode != null)
 			map['OrganizationCode'] = organizationCode;
 		if(authorityGroups != null)
 			map['AuthorityGroups'] = authorityGroups;
 		if(bindDevices != null)
 			map['BindDevices'] = bindDevices;
-		map['Score'] = score;
 		if(lastIP != null)
 			map['LastIP'] = lastIP;
+		map['Logintimes'] = logintimes;
 		map['UserState'] = userState.index;
 		if(roleCodes != null)
 			map['RoleCodes'] = roleCodes;