学员案例列表查询逻辑优化

This commit is contained in:
Boolean
2023-06-22 15:10:04 +08:00
parent a6b8584fef
commit 7a697ff604
11 changed files with 227 additions and 17 deletions

View File

@@ -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);
}
}

View File

@@ -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;
}

View File

@@ -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);
}
}