fix(mining-service): 修复批量补发记录分页参数类型问题
Query 参数是字符串类型,需要显式转换为数字 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
c7f7c10d59
commit
ab320083f7
|
|
@ -784,11 +784,11 @@ export class AdminController {
|
||||||
@ApiQuery({ name: 'pageSize', required: false, type: Number })
|
@ApiQuery({ name: 'pageSize', required: false, type: Number })
|
||||||
async getUserBatchMiningRecords(
|
async getUserBatchMiningRecords(
|
||||||
@Param('accountSequence') accountSequence: string,
|
@Param('accountSequence') accountSequence: string,
|
||||||
@Query('page') page?: number,
|
@Query('page') page?: string,
|
||||||
@Query('pageSize') pageSize?: number,
|
@Query('pageSize') pageSize?: string,
|
||||||
) {
|
) {
|
||||||
const pageNum = page ?? 1;
|
const pageNum = page ? parseInt(page, 10) : 1;
|
||||||
const pageSizeNum = pageSize ?? 20;
|
const pageSizeNum = pageSize ? parseInt(pageSize, 10) : 20;
|
||||||
const skip = (pageNum - 1) * pageSizeNum;
|
const skip = (pageNum - 1) * pageSizeNum;
|
||||||
|
|
||||||
const [records, total] = await Promise.all([
|
const [records, total] = await Promise.all([
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue