吴门医述我的课程放开心理学模块

This commit is contained in:
wuchunlei
2025-03-13 13:32:30 +08:00
parent 32af78fca4
commit 62b42a1e7e
4 changed files with 81 additions and 65 deletions

View File

@@ -62,6 +62,10 @@ public class UserVipController {
@RequestMapping("/getUserVipType")
public R getUserVipType() {
List<Map<String,Object>> resList = new ArrayList();
//根部不同平台返回不同列表
HttpServletRequest request = HttpContextUtil.getHttpServletRequest();
String appType = request.getHeader("appType")==null?"":request.getHeader("appType");
if (!"psyche".equals(appType)){
List<UserVip> l4 = userVipService.list(new LambdaQueryWrapper<UserVip>().eq(UserVip::getUserId,ShiroUtils.getUId()).eq(UserVip::getType,4).orderByDesc(UserVip::getEndTime));
List<UserVip> l9 = userVipService.list(new LambdaQueryWrapper<UserVip>().eq(UserVip::getUserId,ShiroUtils.getUId()).eq(UserVip::getType,9).orderByDesc(UserVip::getEndTime));
List<UserVip> l5 = userVipService.list(new LambdaQueryWrapper<UserVip>().eq(UserVip::getUserId,ShiroUtils.getUId()).eq(UserVip::getType,5).orderByDesc(UserVip::getEndTime));
@@ -130,6 +134,7 @@ public class UserVipController {
}
}
}
List<UserVip> l7 = userVipService.list(new LambdaQueryWrapper<UserVip>().eq(UserVip::getUserId,ShiroUtils.getUId()).eq(UserVip::getType,7).orderByDesc(UserVip::getEndTime));
List<UserVip> l8 = userVipService.list(new LambdaQueryWrapper<UserVip>().eq(UserVip::getUserId,ShiroUtils.getUId()).eq(UserVip::getType,8).orderByDesc(UserVip::getEndTime));
if (l7.size()>0&&l8.size()>0){

View File

@@ -12,6 +12,7 @@ public interface UserVipService extends IService<UserVip> {
boolean noVip();
boolean noMedicalVip();
boolean isMedicalVip();
boolean isChineseWesternVip();
boolean isAcupunctureVip();
boolean istumorVip();
boolean isSociologyVip();

View File

@@ -60,6 +60,11 @@ public class UserVipServiceImpl extends ServiceImpl<UserVipDao, UserVip> impleme
return isVip(4);
}
@Override
public boolean isChineseWesternVip() {
return isVip(9);
}
@Override
public boolean isAcupunctureVip() {
return isVip(5);

View File

@@ -163,7 +163,7 @@ public class CourseServiceImpl extends ServiceImpl<CourseDao, CourseEntity> impl
public Page<CourseEntity> getUserCourseBuy(Map<String, Object> param) {
MPJLambdaWrapper<CourseEntity> wrapper = new MPJLambdaWrapper<>();
wrapper.leftJoin(CourseToMedicine.class,CourseToMedicine::getCourseId,CourseEntity::getId);
if (userVipService.noMedicalVip()){
if (userVipService.isSociologyVip()){
wrapper.leftJoin(CourseCatalogueEntity.class,CourseCatalogueEntity::getCourseId,CourseEntity::getId);
wrapper.leftJoin(UserCourseBuyEntity.class,UserCourseBuyEntity::getCatalogueId,CourseCatalogueEntity::getId);
wrapper.eq(UserCourseBuyEntity::getUserId,ShiroUtils.getUId());
@@ -171,6 +171,8 @@ public class CourseServiceImpl extends ServiceImpl<CourseDao, CourseEntity> impl
List list = new ArrayList<>();//通过顶级标签获取最下层标签
if (userVipService.isMedicalVip()){
userVipService.bottomLabel(1,list);
}
if (userVipService.isChineseWesternVip()){
userVipService.bottomLabel(74,list);
}
if (userVipService.isAcupunctureVip()){
@@ -179,6 +181,9 @@ public class CourseServiceImpl extends ServiceImpl<CourseDao, CourseEntity> impl
if (userVipService.istumorVip()){
userVipService.bottomLabel(5,list);
}
if (userVipService.isPsycheVip()){
userVipService.bottomLabel(4,list);
}
wrapper.in(CourseToMedicine::getMedicalId,list);
}
if (StringUtils.isNotEmpty(param.get("medicalId").toString())){