mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-09 10:56:50 +08:00
提交修改
This commit is contained in:
@@ -568,16 +568,16 @@ public class StudyCourseApi extends ApiBaseController{
|
||||
return badRequest("无关注人");
|
||||
}
|
||||
List<StudyCourse> studyCouseDtos = service.followids(studyCourseQuery);
|
||||
List<String> ids=new ArrayList<String>();
|
||||
for(StudyCourse scourse:studyCouseDtos) {
|
||||
ids.add(scourse.getCourseId());
|
||||
}
|
||||
Map<String,Object> maps = courseService.findImages(ids);
|
||||
for(StudyCourse scourse:studyCouseDtos) {
|
||||
if(maps.containsKey(scourse.getCourseId())) {
|
||||
scourse.setCourseImage((String)maps.get(scourse.getCourseId()));
|
||||
}
|
||||
}
|
||||
// List<String> ids=new ArrayList<String>();
|
||||
// for(StudyCourse scourse:studyCouseDtos) {
|
||||
// ids.add(scourse.getCourseId());
|
||||
// }
|
||||
// Map<String,Object> maps = courseService.findImages(ids);
|
||||
// for(StudyCourse scourse:studyCouseDtos) {
|
||||
// if(maps.containsKey(scourse.getCourseId())) {
|
||||
// scourse.setCourseImage((String)maps.get(scourse.getCourseId()));
|
||||
// }
|
||||
// }
|
||||
|
||||
return success(studyCouseDtos);
|
||||
}
|
||||
|
||||
@@ -316,6 +316,7 @@ public class StudyCourseServiceImpl implements IStudyCourseService{
|
||||
builder.addOrder(OrderCondition.desc("sc.lastTime"));
|
||||
builder.addFields("sc");
|
||||
builder.addFields("c.score");
|
||||
builder.addFields("c.coverImg");
|
||||
//List<StudyCourse> list = studyCourseDao.findList(builder.builder());
|
||||
List<StudyCourse> rs=new ArrayList<StudyCourse>();
|
||||
Set<String> checkSet=new HashSet<String>();
|
||||
@@ -325,7 +326,9 @@ public class StudyCourseServiceImpl implements IStudyCourseService{
|
||||
StudyCourse sc=(StudyCourse)objs[0];
|
||||
if(!checkSet.contains(sc.getCourseId())) {
|
||||
Float score=(Float)objs[1];
|
||||
String img=(String)objs[2];
|
||||
sc.setLastScore(score);
|
||||
sc.setCourseImage(img);
|
||||
rs.add(sc);
|
||||
checkSet.add(sc.getCourseId());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user