Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -23,7 +23,7 @@ List<SectionAndFieldsMapping> findSectionIdAndSectionNameAndServiceProviderId(
@Query("SELECT sfm FROM SectionAndFieldsMapping sfm WHERE sfm.id = :id")
SectionAndFieldsMapping getById(@Param("id") Integer id);

@Query("SELECT sfm FROM SectionAndFieldsMapping sfm WHERE sfm.fieldName = :fieldName")
List<SectionAndFieldsMapping> getByFieldName(@Param("fieldName") String fieldName);
@Query("SELECT sfm FROM SectionAndFieldsMapping sfm WHERE sfm.fieldName = :fieldName and sfm.serviceProviderId = :serviceProviderId")
List<SectionAndFieldsMapping> getByFieldName(@Param("fieldName") String fieldName,@Param("serviceProviderId") Integer serviceProviderId);

}
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public String saveSectionAndFields(SectionFieldsMappingDTO sectionFieldsMappingD
List<SectionAndFieldsMapping> sectionAndFieldsMappingList = new ArrayList<>();
for (SectionAndFieldsMapping sectionFieldsMapping : sectionFieldsMappingDTO.getFields()) {
List<SectionAndFieldsMapping> byFieldName = sectionAndFieldsMappingRepo
.getByFieldName(sectionFieldsMapping.getFieldName());
.getByFieldName(sectionFieldsMapping.getFieldName(),sectionFieldsMapping.getServiceProviderId());
sectionAndFieldsMapping = new SectionAndFieldsMapping();
sectionAndFieldsMapping.setSectionId(sectionFieldsMappingDTO.getSectionId());
sectionAndFieldsMapping.setCreatedBy(sectionFieldsMappingDTO.getCreatedBy());
Expand Down
Loading