mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-25 02:32:57 +08:00
学员案例列表查询逻辑优化
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package com.xboe.module.boecase.dao;
|
||||
|
||||
import com.xboe.module.boecase.entity.CasesMajorType;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.ActiveProfiles;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
@SpringBootTest
|
||||
@ActiveProfiles("dev")
|
||||
class CasesMajorTypeRepoDaoTest {
|
||||
|
||||
@Autowired
|
||||
private CasesMajorTypeRepoDao casesMajorTypeRepoDao;
|
||||
|
||||
@Test
|
||||
void findCasesBy() {
|
||||
ArrayList<String> params = new ArrayList<>();
|
||||
params.add("27737267694995149");
|
||||
List<CasesMajorType> majorTypes = casesMajorTypeRepoDao.findCasesBy(params);
|
||||
System.out.println(majorTypes);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.xboe.module.boecase.dao;
|
||||
|
||||
import com.xboe.module.boecase.dto.CasePageVo;
|
||||
import com.xboe.module.boecase.entity.Cases;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.test.context.ActiveProfiles;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
@SpringBootTest
|
||||
@ActiveProfiles("dev")
|
||||
class CasesRecordDaoTest {
|
||||
|
||||
@Autowired
|
||||
private CasesRecordDao casesRecordDao;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.xboe.module.boecase.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import com.xboe.common.PageList;
|
||||
import com.xboe.module.boecase.dto.CasePageVo;
|
||||
import com.xboe.module.boecase.entity.Cases;
|
||||
import com.xboe.module.boecase.service.ICasesService;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.ActiveProfiles;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
@SpringBootTest
|
||||
@ActiveProfiles("dev")
|
||||
class CasesServiceImplTest {
|
||||
|
||||
@Autowired
|
||||
private ICasesService casesService;
|
||||
|
||||
@Test
|
||||
void queryPageCasesV2() {
|
||||
CasePageVo pageVo = new CasePageVo();
|
||||
// pageVo.setYears(ListUtil.toList(2023));
|
||||
pageVo.setPageIndex(1);
|
||||
pageVo.setPageSize(10);
|
||||
pageVo.setExcellent(Boolean.TRUE);
|
||||
PageList<Cases> casesV2 = casesService.queryPageCasesV2(pageVo);
|
||||
System.out.println(casesV2);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user