feat:医院支付,选择支付钱包支付

This commit is contained in:
dzc committed 2025-08-14 20:05:56 +08:00
1 parent c2707899db
commit 3a7ca1e5be
17 files changed
+441 -117

No files matched your search

@@ -94,3 +94,43 @@ class ServiceMchRule {
Map<String, dynamic> toJson() => _$ServiceMchRuleToJson(this);
}
@JsonSerializable()
class ServiceWallet {
/// 钱包id
String id;
/// 唯一编号
String walletTypeUniqueCode;
/// 用户id
String userId;
/// 钱包类型
String walletTypeId;
/// 余额(单位分)
int balance = 0;
/// 卡号
String? cardNumber;
/// 是否冻结饭卡
@JsonKey(fromJson: JsonTool.stringToBoolean, toJson: JsonTool.booleanToString)
bool? walletIsFreeze;
ServiceWallet({
required this.id,
required this.walletTypeUniqueCode,
required this.userId,
required this.walletTypeId,
required this.balance,
this.cardNumber,
this.walletIsFreeze,
});
factory ServiceWallet.fromJson(Map<String, dynamic> json) =>
_$ServiceWalletFromJson(json);
Map<String, dynamic> toJson() => _$ServiceWalletToJson(this);
}
@@ -58,3 +58,24 @@ Map<String, dynamic> _$ServiceMchRuleToJson(ServiceMchRule instance) =>
'basePrice': JsonTool.intToString(instance.basePrice),
'multiple': JsonTool.intToString(instance.multiple),
};
ServiceWallet _$ServiceWalletFromJson(Map<String, dynamic> json) =>
ServiceWallet(
id: json['id'] as String,
walletTypeUniqueCode: json['walletTypeUniqueCode'] as String,
userId: json['userId'] as String,
walletTypeId: json['walletTypeId'] as String,
balance: (json['balance'] as num).toInt(),
walletIsFreeze:
JsonTool.stringToBoolean(json['walletIsFreeze'] as String),
);
Map<String, dynamic> _$ServiceWalletToJson(ServiceWallet instance) =>
<String, dynamic>{
'id': instance.id,
'walletTypeUniqueCode': instance.walletTypeUniqueCode,
'userId': instance.userId,
'walletTypeId': instance.walletTypeId,
'balance': instance.balance,
'walletIsFreeze': JsonTool.booleanToString(instance.walletIsFreeze),
};