优化快手云领取发货校验

This commit is contained in:
yml2213
2026-05-26 16:24:50 +08:00
parent 604f1bbf54
commit dfcc8982c6
5 changed files with 331 additions and 26 deletions
@@ -1,4 +1,5 @@
import { createHttpError } from '../../../utils/http.js'
import { logInfo } from '../../../utils/logger.js'
import { cloudtentaclesRequest } from './http-client.js'
import { resolveCloudtentaclesConfig } from './helpers.js'
@@ -67,12 +68,23 @@ export async function listCloudtentaclesDeliveryRecords(
const data = isPlainObject(result.payload?.data) ? result.payload.data : {}
const values = Array.isArray(data.values) ? data.values : []
const total = normalizeNonNegativeInteger(data.total, values.length)
logInfo('[cloudtentacles/records]', '发货记录查询完成', {
page,
size,
recordCode: normalizePositiveInteger(payload.recordCode, 4),
startDate,
endDate,
total,
returnedCount: values.length,
})
return {
baseUrl: config.baseUrl,
page,
size,
total: normalizeNonNegativeInteger(data.total, values.length),
total,
items: values.map(mapCloudtentaclesDeliveryRecord),
raw: data,
}