fix(mining-admin): 修复 Prisma 查询 null 值的语法
Prisma 查询 null 值需要使用 { equals: null } 而不是直接 null
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
27a045e082
commit
495a1445fd
|
|
@ -326,9 +326,10 @@ export class SystemAccountsService {
|
||||||
page: number = 1,
|
page: number = 1,
|
||||||
pageSize: number = 20,
|
pageSize: number = 20,
|
||||||
) {
|
) {
|
||||||
|
// Prisma 查询 null 值需要用 { equals: null }
|
||||||
const whereClause = regionCode
|
const whereClause = regionCode
|
||||||
? { accountType, regionCode }
|
? { accountType, regionCode }
|
||||||
: { accountType, regionCode: null };
|
: { accountType, regionCode: { equals: null } };
|
||||||
|
|
||||||
const [records, total] = await Promise.all([
|
const [records, total] = await Promise.all([
|
||||||
this.prisma.syncedSystemContributionRecord.findMany({
|
this.prisma.syncedSystemContributionRecord.findMany({
|
||||||
|
|
@ -380,7 +381,7 @@ export class SystemAccountsService {
|
||||||
|
|
||||||
const whereClause = regionCode
|
const whereClause = regionCode
|
||||||
? { accountType, regionCode }
|
? { accountType, regionCode }
|
||||||
: { accountType, regionCode: null };
|
: { accountType, regionCode: { equals: null } };
|
||||||
|
|
||||||
// 获取明细记录统计
|
// 获取明细记录统计
|
||||||
const recordStats = await this.prisma.syncedSystemContributionRecord.aggregate({
|
const recordStats = await this.prisma.syncedSystemContributionRecord.aggregate({
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue