mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-09 19:06:49 +08:00
最佳案例
This commit is contained in:
@@ -11,8 +11,7 @@ import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import javax.transaction.Transactional;
|
||||
|
||||
import javafx.util.Builder;
|
||||
import org.apache.lucene.util.QueryBuilder;
|
||||
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.core.PreparedStatementCallback;
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
package com.xboe.module.boecase.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import cn.hutool.json.JSON;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.xboe.common.PageList;
|
||||
import com.xboe.module.boecase.dto.CasePageVo;
|
||||
import com.xboe.module.boecase.entity.Cases;
|
||||
@@ -20,13 +25,33 @@ class CasesServiceImplTest {
|
||||
private ICasesService casesService;
|
||||
|
||||
@Test
|
||||
void queryPageCasesV2() {
|
||||
CasePageVo pageVo = new CasePageVo();
|
||||
// pageVo.setYears(ListUtil.toList(2023));
|
||||
pageVo.setPageIndex(1);
|
||||
pageVo.setPageSize(10);
|
||||
pageVo.setUserId("199");
|
||||
pageVo.setExcellent(Boolean.TRUE);
|
||||
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" +
|
||||
"}";
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,false);
|
||||
CasePageVo pageVo = mapper.readValue(jsonStr, CasePageVo.class);
|
||||
PageList<Cases> casesV2 = casesService.queryPageCasesV2(pageVo);
|
||||
System.out.println(casesV2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user