Skip to content

Commit

Permalink
fix: serch moog upper case
Browse files Browse the repository at this point in the history
  • Loading branch information
BettyB979 committed Sep 20, 2024
1 parent 5018aae commit 57ed52c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.3</version>
<version>3.3.4</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>fr.insee.survey</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;
Expand Down Expand Up @@ -53,12 +54,11 @@ public ResponseEntity<Page<MoogSearchDto>> moogSearch(@RequestParam(required = f
@RequestParam(defaultValue = "0", required = false) int pageNo,
@RequestParam(defaultValue = "20", required = false) int pageSize) {

List<View> listView = moogService.moogSearch(filter1);
List<View> listView = moogService.moogSearch(StringUtils.upperCase(filter1));

Pageable pageable = PageRequest.of(pageNo, pageSize);
int start = (int) pageable.getOffset();
int end = (start + pageable.getPageSize()) > listView.size() ? listView.size()
: (start + pageable.getPageSize());
int end = Math.min((start + pageable.getPageSize()), listView.size());

if (start <= end) {
Page<MoogSearchDto> page = new PageImpl<>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ public interface MoogService {

Collection<MoogExtractionRowDto> getSurveyUnitsToFollowUp(String idCampaign);

public String getReadOnlyUrl(String idCampaign, String surveyUnitId) throws NotFoundException;
String getReadOnlyUrl(String idCampaign, String surveyUnitId) throws NotFoundException;
}

0 comments on commit 57ed52c

Please sign in to comment.