fix(page): 일괄 발행/미발행 시 활동 이력이 기록되도록 after_publish 훅 발화
페이지 목록 일괄 발행/미발행이 after_publish 훅을 발화하지 않아 활동로그에 발행/미발행이 기록되지 않던 문제를 수정한다. - bulkChangePublishStatus 를 DB::transaction 내부에서 페이지별로 before_publish -> update -> after_publish 발화하도록 재작성 (per-item 로그) - 존재하지 않는 id 가 섞이면 전체 롤백 (all-or-nothing) - 단일 mass UPDATE 전용 bulkUpdatePublished 제거 (dead code, 의존 확장 영향 없음) - 일괄 발행 성공 응답 메시지의 :count 미치환 정정 (success 의 4번째 인자 messageParams 로 치환 파라미터 전달) - 회귀 테스트 추가 (훅 발화 횟수/published 인자/롤백/메시지 치환)
This commit is contained in:
1 parent
0de58baf46
commit
bb654fb56c
7 files changed
+144
-32
No files matched your search
@@ -289,18 +289,6 @@ class PageRepository implements PageRepositoryInterface
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 여러 페이지의 발행 상태를 일괄 변경합니다.
|
||||
*
|
||||
* @param array $ids 페이지 ID 목록
|
||||
* @param array $data 업데이트할 데이터 (published, updated_by 등)
|
||||
* @return int 변경된 페이지 수
|
||||
*/
|
||||
public function bulkUpdatePublished(array $ids, array $data): int
|
||||
{
|
||||
return Page::whereIn('id', $ids)->update($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* filters 배열을 search/search_field로 정규화합니다.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user