feat:机器上可以查询全部订单
This commit is contained in:
1 parent
88ff8988fb
commit
a6fc25ddce
13 files changed
+956
-388
No files matched your search
@@ -660,6 +660,7 @@ class VerificationRecordQueryRequest {
|
||||
required this.startDate,
|
||||
required this.endDate,
|
||||
this.verificationType,
|
||||
this.scope,
|
||||
});
|
||||
|
||||
final int hardId;
|
||||
@@ -667,12 +668,118 @@ class VerificationRecordQueryRequest {
|
||||
final String endDate;
|
||||
final String? verificationType;
|
||||
|
||||
/// 数据范围:留空仅本机,MERCHANT 按终端所属商户查询全部设备。
|
||||
final String? scope;
|
||||
|
||||
factory VerificationRecordQueryRequest.fromJson(Map<String, dynamic> json) =>
|
||||
_$VerificationRecordQueryRequestFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$VerificationRecordQueryRequestToJson(this);
|
||||
}
|
||||
|
||||
/// 终端交易记录的服务端查询参数,数据范围由服务端按设备归属解析。
|
||||
@JsonSerializable(includeIfNull: false)
|
||||
class TerminalOrderRecordQueryRequest {
|
||||
const TerminalOrderRecordQueryRequest({
|
||||
required this.hardId,
|
||||
required this.startDate,
|
||||
required this.endDate,
|
||||
this.scope,
|
||||
this.orderStatusCodes,
|
||||
this.hourType,
|
||||
});
|
||||
|
||||
final int hardId;
|
||||
final String startDate;
|
||||
final String endDate;
|
||||
|
||||
/// 数据范围:留空仅本机,MERCHANT 按终端所属商户查询全部设备。
|
||||
final String? scope;
|
||||
|
||||
/// 订单状态编码集合,留空查询全部状态。
|
||||
final List<String>? orderStatusCodes;
|
||||
|
||||
/// 用餐时段编码,留空或 -1 不区分。
|
||||
final String? hourType;
|
||||
|
||||
factory TerminalOrderRecordQueryRequest.fromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$TerminalOrderRecordQueryRequestFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() =>
|
||||
_$TerminalOrderRecordQueryRequestToJson(this);
|
||||
}
|
||||
|
||||
/// 交易记录远端行只承载列表展示字段,金额与时间口径和本地订单一致。
|
||||
@JsonSerializable()
|
||||
class ServiceTerminalOrderRecord {
|
||||
const ServiceTerminalOrderRecord({
|
||||
required this.orderId,
|
||||
required this.orderNo,
|
||||
required this.orderType,
|
||||
required this.orderTypeName,
|
||||
required this.orderStatus,
|
||||
required this.orderStatusName,
|
||||
required this.payType,
|
||||
required this.payTypeName,
|
||||
required this.username,
|
||||
required this.productDesc,
|
||||
required this.totalPrice,
|
||||
required this.extraPrice,
|
||||
required this.payPrice,
|
||||
this.userDeptName,
|
||||
this.hourType,
|
||||
this.hardName,
|
||||
this.createTime,
|
||||
});
|
||||
|
||||
/// 后端 Long 为避免跨端精度丢失可能序列化为字符串,终端同时兼容数字返回。
|
||||
@JsonKey(fromJson: JsonTool.anyToInt)
|
||||
final int orderId;
|
||||
final String orderNo;
|
||||
final String orderType;
|
||||
final String orderTypeName;
|
||||
final String orderStatus;
|
||||
final String orderStatusName;
|
||||
final String payType;
|
||||
final String payTypeName;
|
||||
final String username;
|
||||
final String? userDeptName;
|
||||
final String productDesc;
|
||||
final String? hourType;
|
||||
|
||||
/// 完成交易的设备名称;全部数据范围下用于区分不同机器。
|
||||
final String? hardName;
|
||||
|
||||
/// 金额仍按整数分使用,同时兼容部分环境将数值序列化为字符串。
|
||||
@JsonKey(fromJson: JsonTool.anyToInt)
|
||||
final int totalPrice;
|
||||
@JsonKey(fromJson: JsonTool.anyToInt)
|
||||
final int extraPrice;
|
||||
@JsonKey(fromJson: JsonTool.anyToInt)
|
||||
final int payPrice;
|
||||
final DateTime? createTime;
|
||||
|
||||
factory ServiceTerminalOrderRecord.fromJson(Map<String, dynamic> json) =>
|
||||
_$ServiceTerminalOrderRecordFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ServiceTerminalOrderRecordToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class ServiceTerminalOrderRecordPage extends ServicePageBase {
|
||||
ServiceTerminalOrderRecordPage({this.records});
|
||||
|
||||
final List<ServiceTerminalOrderRecord>? records;
|
||||
|
||||
factory ServiceTerminalOrderRecordPage.fromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ServiceTerminalOrderRecordPageFromJson(json);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() => _$ServiceTerminalOrderRecordPageToJson(this);
|
||||
}
|
||||
|
||||
/// 核销记录只承载列表展示字段,不复用本地订单实体,避免混淆远端与本地状态。
|
||||
@JsonSerializable()
|
||||
class ServiceVerificationRecord {
|
||||
|
||||
Reference in new issue
Block a user