Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ SELECT f.id AS id, f.question AS question, f.field_type AS type, f.section AS se
SELECT *
FROM form_field f
WHERE f.form_id = :formId
AND (f.section = :section OR f.section = :defaultSection)
AND f.section = :section
""", nativeQuery = true)
List<FormField> findAllByFormAndSection(
@Param("formId") Long formId,
@Param("section") String section,
@Param("defaultSection") String defaultSection
@Param("section") String section
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
@Transactional(readOnly = true)
public class GeneralFormFieldService implements FormFieldService {

private static final String FORM_DEFAULT_SECTION = "공통";

private final FormFieldRepository formFieldRepository;

@Transactional
Expand Down Expand Up @@ -44,6 +42,6 @@ public void deleteAll(List<FormField> originFormFields) {

@Override
public List<FormField> getAllByFormAndSection(Form form, String section) {
return formFieldRepository.findAllByFormAndSection(form.getId(), section, FORM_DEFAULT_SECTION);
return formFieldRepository.findAllByFormAndSection(form.getId(), section);
}
}