1
This commit is contained in:
@@ -4,7 +4,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
public class ObjectUtils {
|
public class ObjectUtils {
|
||||||
|
|
||||||
public boolean isNotBlank(Map<String,Object> m, String key){
|
public static boolean isNotBlank(Map<String,Object> m, String key){
|
||||||
if(!m.containsKey(key)){
|
if(!m.containsKey(key)){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,8 +31,6 @@ public class CourseServiceImpl extends ServiceImpl<CourseDao, CourseEntity> impl
|
|||||||
private CourseToSociologyDao courseToSociologyDao;
|
private CourseToSociologyDao courseToSociologyDao;
|
||||||
@Autowired
|
@Autowired
|
||||||
private CourseCatalogueDao courseCatalogueDao;
|
private CourseCatalogueDao courseCatalogueDao;
|
||||||
@Autowired
|
|
||||||
private ObjectUtils objectUtils;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page getCourseList(Map<String,Object> map) {
|
public Page getCourseList(Map<String,Object> map) {
|
||||||
@@ -70,7 +68,7 @@ public class CourseServiceImpl extends ServiceImpl<CourseDao, CourseEntity> impl
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wrapper.like(objectUtils.isNotBlank(map,"keywords"),CourseEntity::getTitle,map.get("keywords").toString());
|
wrapper.like(ObjectUtils.isNotBlank(map,"keywords"),CourseEntity::getTitle,map.get("keywords").toString());
|
||||||
Page<CourseEntity> courseEntityPage = this.getBaseMapper().selectPage(new Page<>(page, limit), wrapper);
|
Page<CourseEntity> courseEntityPage = this.getBaseMapper().selectPage(new Page<>(page, limit), wrapper);
|
||||||
for (CourseEntity c:courseEntityPage.getRecords()){
|
for (CourseEntity c:courseEntityPage.getRecords()){
|
||||||
List<CourseCatalogueEntity> courseCatalogueEntities = courseCatalogueDao.selectList(new LambdaQueryWrapper<CourseCatalogueEntity>().eq(CourseCatalogueEntity::getCourseId, c.getId()).orderByAsc(CourseCatalogueEntity::getSort));
|
List<CourseCatalogueEntity> courseCatalogueEntities = courseCatalogueDao.selectList(new LambdaQueryWrapper<CourseCatalogueEntity>().eq(CourseCatalogueEntity::getCourseId, c.getId()).orderByAsc(CourseCatalogueEntity::getSort));
|
||||||
|
|||||||
Reference in New Issue
Block a user