fix service relation in servicetype

This commit is contained in:
avicenan
2026-05-26 17:34:32 +09:00
parent d1c839b931
commit 441fe18f14
2 changed files with 4 additions and 2 deletions

View File

@ -55,7 +55,6 @@ export class ServiceController {
const res_count = query;
const res_list = query
.leftJoinAndSelect("Service.serviceType", "serviceType")
.orderBy("Service." + param.order_field, param.order_direction)
.offset(offset)
.limit(limit);

View File

@ -27,7 +27,10 @@ export class ServiceModel {
}
}
var query = repo.createQueryBuilder("Service");
var query = repo
.createQueryBuilder("Service")
.leftJoinAndSelect("Service.serviceType", "serviceType")
if (whereAttr.length != 0) {
query = query.where(whereAttr.join(" and "), whereVal);
}