更新java17,springboot3.3.9,maven3.9.10,

This commit is contained in:
wuchunlei
2025-07-07 09:55:09 +08:00
parent 596922cf83
commit 1fae61bfec
150 changed files with 422 additions and 3697 deletions

View File

@@ -7,7 +7,6 @@ import com.peanut.common.utils.ShiroUtils;
import com.peanut.modules.common.entity.*;
import com.peanut.modules.common.service.UserCourseStudyingService;
import com.peanut.modules.common.service.UserVipService;
import com.peanut.modules.master.service.CourseCatalogueService;
import com.peanut.modules.master.service.CourseService;
import com.peanut.modules.master.service.UserCourseBuyService;
import lombok.extern.slf4j.Slf4j;
@@ -15,7 +14,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -48,7 +46,7 @@ public class PsycheCourseController {
wrapper.orderByAsc(CourseEntity::getSort);
List<CourseEntity> courseList = courseService.list(wrapper);
for (CourseEntity c:courseList){
int i = userCourseStudyingService.count(new LambdaQueryWrapper<UserCourseStudying>()
Long i = userCourseStudyingService.count(new LambdaQueryWrapper<UserCourseStudying>()
.eq(UserCourseStudying::getCourseId,c.getId())
.eq(UserCourseStudying::getUserId,ShiroUtils.getUId()));
c.setIsStudying(i>0?1:0);
@@ -90,7 +88,7 @@ public class PsycheCourseController {
List<Map<String,Object>> list = courseService.listMaps(wrapper);
for (Map<String,Object> courseEntity : list) {
if (!userVipService.isPsycheVip(ShiroUtils.getUId())){
int ucb = userCourseBuyService.count(new LambdaQueryWrapper<UserCourseBuyEntity>()
Long ucb = userCourseBuyService.count(new LambdaQueryWrapper<UserCourseBuyEntity>()
.eq(UserCourseBuyEntity::getUserId,ShiroUtils.getUId())
.eq(UserCourseBuyEntity::getCatalogueId,courseEntity.get("catalogueId")));
if (ucb == 0) {
@@ -117,7 +115,7 @@ public class PsycheCourseController {
//加入收藏(加入正在学习)
@RequestMapping("/addUserCourseStudying")
public R addUserCourseStudying(@RequestBody Map<String,Integer> map){
int isExist = userCourseStudyingService.count(new LambdaQueryWrapper<UserCourseStudying>()
Long isExist = userCourseStudyingService.count(new LambdaQueryWrapper<UserCourseStudying>()
.eq(UserCourseStudying::getUserId,ShiroUtils.getUId())
.eq(UserCourseStudying::getCourseId,map.get("courseId")));
if (isExist>0){