mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-07 01:46:47 +08:00
全部
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.xboe.module.interaction.service.impl;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@@ -137,6 +138,8 @@ public class FavoritesServiceImpl implements IFavoritesService{
|
||||
Set<String> caseList = new HashSet<>();
|
||||
// Map<String,FavoriteTotalDto> map = new HashMap<>();
|
||||
|
||||
Set<String> noteList = new HashSet<>();
|
||||
|
||||
for (Favorites f: page.getList()) {
|
||||
FavoriteTotalDto favoriteTotalDto = new FavoriteTotalDto();
|
||||
favoriteTotalDto.setFavoritesTime(f.getSysCreateTime());
|
||||
@@ -158,6 +161,11 @@ public class FavoritesServiceImpl implements IFavoritesService{
|
||||
if(f.getObjType()==3){
|
||||
caseList.add(f.getObjId());
|
||||
}
|
||||
if(f.getObjType()==6){
|
||||
noteList.add(f.getObjId());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -254,6 +262,32 @@ public class FavoritesServiceImpl implements IFavoritesService{
|
||||
}
|
||||
}
|
||||
|
||||
if(!noteList.isEmpty()){
|
||||
StringBuilder ids=new StringBuilder();
|
||||
for (String s:noteList) {
|
||||
ids.append("'");
|
||||
ids.append(s);
|
||||
ids.append("'");
|
||||
ids.append(",");
|
||||
}
|
||||
ids.deleteCharAt(ids.length()-1);
|
||||
String sql="select id,course_name,content,sys_create_aid,sys_create_by,sys_create_time from boe_note_info where id in("+ids+")";
|
||||
List<Object[]> list1 = dao.sqlFindList(sql);
|
||||
for (Object[] o:list1){
|
||||
for (FavoriteTotalDto favoriteTotalDto : list.getList()) {
|
||||
if(o[0].equals(favoriteTotalDto.getId())){
|
||||
favoriteTotalDto.setTitle((String) o[1]);
|
||||
favoriteTotalDto.setContent((String) o[2]);
|
||||
favoriteTotalDto.setAuthorId((String) o[3]);
|
||||
favoriteTotalDto.setAuthorName((String) o[4]);
|
||||
Timestamp time = (Timestamp)o[5];
|
||||
|
||||
favoriteTotalDto.setPublishTime(time.toLocalDateTime());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
list.setCount(page.getCount());
|
||||
list.setPageSize(pageSize);
|
||||
return list;
|
||||
|
||||
Reference in New Issue
Block a user