获取用户当前培训班最低价格

This commit is contained in:
wuchunlei
2025-04-14 15:50:27 +08:00
parent a73500ee32
commit 2b57f006a5
10 changed files with 142 additions and 40 deletions

View File

@@ -38,7 +38,7 @@ public class PsycheCourseController {
MPJLambdaWrapper<CourseEntity> wrapper = new MPJLambdaWrapper<>();
wrapper.distinct();
wrapper.rightJoin(CourseToPsyche.class,CourseToPsyche::getCourseId,CourseEntity::getId);
if (!userVipService.isPsycheVip()){
if (!userVipService.isPsycheVip(ShiroUtils.getUId())){
wrapper.leftJoin(UserCourseBuyEntity.class,UserCourseBuyEntity::getCourseId,CourseEntity::getId);
wrapper.eq(UserCourseBuyEntity::getUserId,ShiroUtils.getUId());
}
@@ -87,7 +87,7 @@ public class PsycheCourseController {
wrapper.orderByAsc(CourseCatalogueEntity::getSort);
List<Map<String,Object>> list = courseService.listMaps(wrapper);
for (Map<String,Object> courseEntity : list) {
if (!userVipService.isPsycheVip()){
if (!userVipService.isPsycheVip(ShiroUtils.getUId())){
courseEntities.add(courseEntity);
}
}