学员案例查询

This commit is contained in:
buerjun
2023-06-27 13:53:54 +08:00
parent 4639772025
commit 3053545ef5
4 changed files with 20 additions and 31 deletions

View File

@@ -26,32 +26,11 @@ class CasesServiceImplTest {
@Test
void queryPageCasesV2() throws JsonProcessingException {
String jsonStr = "{\n" +
"\t\"pageIndex\": 1,\n" +
"\t\"pageSize\": 10,\n" +
"\t\"isTop\": false,\n" +
"\t\"orderField\": \"excellent\",\n" +
"\t\"majorType\": \"\",\n" +
"\t\"orgDomainDtos\": [],\n" +
"\t\"orderAsc\": false,\n" +
"\t\"excellent\": true,\n" +
"\t\"years\": [2023],\n" +
"\t\"breCommend\": true,\n" +
"\t\"caseType\": \"\",\n" +
"\t\"authorName\": \"\",\n" +
"\t\"notInIds\": [],\n" +
"\t\"type\": \"recommend\",\n" +
"\t\"userId\": \"\",\n" +
"\t\"parent\": \"\",\n" +
"\t\"children\": [],\n" +
"\t\"name\": \"\",\n" +
"\t\"firstId\": \"\",\n" +
"\t\"secondId\": \"\",\n" +
"\t\"threeId\": \"\"\n" +
"}";
String jsonStr = "{\"pageIndex\":1,\"pageSize\":10,\"orderField\":\"excellent\",\"majorType\":\"\",\"orgDomainDtos\":[],\"orderAsc\":false,\"excellent\":true,\"breCommend\":true,\"caseType\":\"\",\"authorName\":\"\",\"notInIds\":[],\"type\":\"recommend\",\"userId\":\"\",\"parent\":\"\",\"children\":[],\"name\":\"\",\"years\":[2023,2022,2020,2021]}";
ObjectMapper mapper = new ObjectMapper();
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,false);
CasePageVo pageVo = mapper.readValue(jsonStr, CasePageVo.class);
pageVo.setUserId("965342027497607168");
PageList<Cases> casesV2 = casesService.queryPageCasesV2(pageVo);
System.out.println(casesV2);
}