修复过期课程查询有重复课程
This commit is contained in:
@@ -288,10 +288,10 @@ public class CourseServiceImpl extends ServiceImpl<CourseDao, CourseEntity> impl
|
||||
List<Map<String,Object>> res = new ArrayList<>();
|
||||
//如果过期又开通,去除
|
||||
for (Map<String,Object> c : courseEntities) {
|
||||
UserCourseBuyEntity ucb = userCourseBuyDao.selectOne(new LambdaQueryWrapper<UserCourseBuyEntity>()
|
||||
int ucb = userCourseBuyDao.selectCount(new LambdaQueryWrapper<UserCourseBuyEntity>()
|
||||
.eq(UserCourseBuyEntity::getUserId,param.get("userId"))
|
||||
.eq(UserCourseBuyEntity::getCatalogueId,c.get("catalogueId")));
|
||||
if (ucb == null) {
|
||||
if (ucb == 0) {
|
||||
res.add(c);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user