diff --git a/src/controllers/04-product-controller.ts b/src/controllers/04-product-controller.ts index cd0b52c..01095d2 100644 --- a/src/controllers/04-product-controller.ts +++ b/src/controllers/04-product-controller.ts @@ -134,7 +134,13 @@ export class ProductController extends Controller { @Query() pageSize: number = 30, ) { const where = { - OR: query ? [{ name: { contains: query } }, { detail: { contains: query } }] : undefined, + OR: query + ? [ + { name: { contains: query } }, + { detail: { contains: query } }, + { code: { contains: query } }, + ] + : undefined, AND: { ...filterStatus(status), productGroupId, diff --git a/src/controllers/04-service-controller.ts b/src/controllers/04-service-controller.ts index 5e5c335..a60fd31 100644 --- a/src/controllers/04-service-controller.ts +++ b/src/controllers/04-service-controller.ts @@ -123,7 +123,13 @@ export class ServiceController extends Controller { @Query() fullDetail?: boolean, ) { const where = { - OR: query ? [{ name: { contains: query } }, { detail: { contains: query } }] : undefined, + OR: query + ? [ + { name: { contains: query } }, + { detail: { contains: query } }, + { code: { contains: query } }, + ] + : undefined, AND: { ...filterStatus(status), productGroupId,