优化小店报告订单状态展示
This commit is contained in:
@@ -289,7 +289,7 @@ func xiaodianSummaryRow(sequence int, report types.XiaodianRunReport, item xiaod
|
||||
exportText(account.Status),
|
||||
exportText(account.FailureReason),
|
||||
exportText(selectedRecordVerification(item)),
|
||||
exportText(orderStatusText(recordStatus(matched))),
|
||||
exportText(selectedRecordStatus(item, matched)),
|
||||
account.Attempts,
|
||||
exportText(remarks),
|
||||
exportText(formatReportTime(report.StartedAt)),
|
||||
@@ -403,11 +403,14 @@ func selectedRecordVerification(item xiaodianReportExportData) string {
|
||||
return "未发现订单"
|
||||
}
|
||||
|
||||
func recordStatus(record *types.XiaodianExchangeRecord) string {
|
||||
if record == nil {
|
||||
return ""
|
||||
func selectedRecordStatus(item xiaodianReportExportData, record *types.XiaodianExchangeRecord) string {
|
||||
if item.RecordError != "" {
|
||||
return "查询失败"
|
||||
}
|
||||
return record.Status
|
||||
if record == nil {
|
||||
return "无订单"
|
||||
}
|
||||
return orderStatusText(record.Status)
|
||||
}
|
||||
|
||||
func orderStatusText(status string) string {
|
||||
@@ -425,7 +428,7 @@ func orderStatusText(status string) string {
|
||||
case "5":
|
||||
return "已退款"
|
||||
case "":
|
||||
return "-"
|
||||
return "状态未知"
|
||||
default:
|
||||
return "状态 " + status
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user