Merge branch 'zcwy-0913-yang-case'

This commit is contained in:
nisen
2024-09-14 13:26:46 +08:00
4 changed files with 9 additions and 5 deletions

View File

@@ -686,7 +686,7 @@ public class CasesApi extends ApiBaseController {
@SuppressWarnings("unchecked")
@GetMapping("/queryPopularityOfMajor")
public JsonResponse<List<Cases>> queryPopularityOfMajor(@RequestParam(required = false) Integer pageSize,
@RequestParam Long majorId,
@RequestParam String majorId,
@RequestParam LocalDateTime rankMonth) {
String accountId = getCurrent().getAccountId();
List<Cases> caseRankingVoList =casesService.queryPopularityOfMajor(pageSize,majorId,rankMonth,accountId);

View File

@@ -63,7 +63,7 @@ public class CasesRankDao extends BaseDao<CasesRank> {
}
public List<HashMap<String, Object>> findPopularityOfMajor(Integer pageSize, LocalDateTime startTime, LocalDateTime endTime, Long majorId) {
public List<HashMap<String, Object>> findPopularityOfMajor(Integer pageSize, LocalDateTime startTime, LocalDateTime endTime, String majorId) {
String sql =
"SELECT bcr.case_id,bcr.rank\n" +

View File

@@ -133,7 +133,7 @@ public interface ICasesService{
List<CaseRankingVo> queryRank(Integer pageSize, Integer rankType);
List<Cases> queryPopularityOfMajor(Integer pageSize, Long majorId, LocalDateTime month, String accountId);
List<Cases> queryPopularityOfMajor(Integer pageSize, String majorId, LocalDateTime month, String accountId);
PageList<FavoriteCaseOfIndexVo> queryFavoriteCaseOfIndex(Integer pageIndex, Integer pageSize, String accountId);

View File

@@ -509,7 +509,11 @@ public class CasesServiceImpl implements ICasesService {
// 拼接生成年度最佳标签
if (e.getExcellent()!=null && e.getExcellent()) {
e.setExcellentTag(e.getExcellentTime().format(DateTimeFormatter.ofPattern("yy年"))+"度最佳");
if (e.getDraftingTime()!=null){
e.setExcellentTag(e.getDraftingTime().format(DateTimeFormatter.ofPattern("yy年"))+"度最佳");
} else {
e.setExcellentTag(e.getSysCreateTime().format(DateTimeFormatter.ofPattern("yy年"))+"度最佳");
}
}
List<String> authorTags = new ArrayList<>();
@@ -1268,7 +1272,7 @@ public class CasesServiceImpl implements ICasesService {
@Override
public List<Cases> queryPopularityOfMajor(Integer pageSize, Long majorId, LocalDateTime month, String accountId) {
public List<Cases> queryPopularityOfMajor(Integer pageSize, String majorId, LocalDateTime month, String accountId) {
if (pageSize == null) {
pageSize = 10;
}