feat: integrate analytics and fragment receipt improvements
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { BadRequestException, Injectable, NotFoundException } from '@nestjs/common';
|
||||
import { Prisma } from '@prisma/client';
|
||||
import { PrismaService } from '../prisma/prisma.service';
|
||||
import { shanghaiDateRange } from '../common/shanghai-date-range';
|
||||
|
||||
export interface SubmitCertificationDto {
|
||||
tenantId: string;
|
||||
@@ -20,11 +21,12 @@ export interface ReviewCertificationDto {
|
||||
export class CertificationService {
|
||||
constructor(private readonly prisma: PrismaService) {}
|
||||
|
||||
async list(tenantId?: string, status?: string, keyword?: string) {
|
||||
async list(tenantId?: string, status?: string, keyword?: string, submittedAtFrom?: string, submittedAtTo?: string) {
|
||||
const records = await this.prisma.enterpriseCertification.findMany({
|
||||
where: {
|
||||
tenantId,
|
||||
status: status && status !== 'all' ? status : undefined,
|
||||
submittedAt: shanghaiDateRange(submittedAtFrom, submittedAtTo),
|
||||
OR: keyword ? [
|
||||
{ companyName: { contains: keyword } },
|
||||
{ licenseNo: { contains: keyword } },
|
||||
|
||||
Reference in New Issue
Block a user