优化快手云领取发货校验
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user