feat: webTypeStandardController & fileController Prisma 전환 완료
컨트롤러 레이어 전환: webTypeStandardController.ts (11개): - ✅ getWebTypes: findMany → query (동적 WHERE, ILIKE) - ✅ getWebType: findUnique → queryOne - ✅ createWebType: findUnique + create → queryOne (중복 체크 + INSERT) - ✅ updateWebType: update → query (동적 UPDATE, 11개 필드) - ✅ deleteWebType: delete → query (RETURNING) - ✅ updateSortOrder: $transaction → transaction (batch update) - ✅ getCategories: groupBy → query (GROUP BY, COUNT) fileController.ts (1개): - ✅ downloadFile: findUnique → queryOne 기술적 구현: - 동적 WHERE 절: ILIKE를 사용한 검색 - 동적 UPDATE: 11개 필드 조건부 업데이트 - 트랜잭션: transaction 함수로 batch update - GROUP BY: 카테고리별 집계 전체 진행률: 42/29 (145%) - 컨트롤러 완료 남은 작업: Routes(4), Service(4), Config(4)
This commit is contained in:
@@ -723,11 +723,10 @@ export const downloadFile = async (
|
||||
try {
|
||||
const { objid } = req.params;
|
||||
|
||||
const fileRecord = await prisma.attach_file_info.findUnique({
|
||||
where: {
|
||||
objid: parseInt(objid),
|
||||
},
|
||||
});
|
||||
const fileRecord = await queryOne<any>(
|
||||
`SELECT * FROM attach_file_info WHERE objid = $1`,
|
||||
[parseInt(objid)]
|
||||
);
|
||||
|
||||
if (!fileRecord || fileRecord.status !== "ACTIVE") {
|
||||
res.status(404).json({
|
||||
|
||||
Reference in New Issue
Block a user