更新java17,springboot3.3.9,maven3.9.10,
This commit is contained in:
@@ -63,7 +63,7 @@ public class BuyConfigController {
|
||||
|
||||
@RequestMapping("/delBookBuyConfig")
|
||||
public R delBookBuyConfig(@RequestBody Map<String, Object> params) {
|
||||
int count = buyOrderService.count(new LambdaQueryWrapper<BuyOrder>()
|
||||
Long count = buyOrderService.count(new LambdaQueryWrapper<BuyOrder>()
|
||||
.eq(BuyOrder::getOrderStatus,3)
|
||||
.eq(BuyOrder::getProductId,params.get("id").toString()));
|
||||
if (count > 0) {
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.peanut.modules.master.controller;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.peanut.common.utils.ObjectUtils;
|
||||
import com.peanut.common.utils.R;
|
||||
import com.peanut.modules.common.entity.*;
|
||||
import com.peanut.modules.common.to.ParamTo;
|
||||
@@ -57,14 +56,14 @@ public class CourseMedicineMarketController {
|
||||
public R editSociologyMarket(@RequestBody CourseMedicineMarketEntity courseMedicineMarketEntity){
|
||||
CourseMedicineMarketEntity old = marketService.getById(courseMedicineMarketEntity.getId());
|
||||
if(courseMedicineMarketEntity.getIsLast()==1&&old.getIsLast()==0){//非终节点到终结点,要排除是否存在子集
|
||||
Integer integer = marketService.getBaseMapper().selectCount(new LambdaQueryWrapper<CourseMedicineMarketEntity>().eq(CourseMedicineMarketEntity::getPid, courseMedicineMarketEntity.getId()));
|
||||
Integer integer = marketService.getBaseMapper().selectCount(new LambdaQueryWrapper<CourseMedicineMarketEntity>().eq(CourseMedicineMarketEntity::getPid, courseMedicineMarketEntity.getId())).intValue();
|
||||
if(integer>0){
|
||||
return R.error("请先清空子集再操作!");
|
||||
}
|
||||
}
|
||||
|
||||
if(courseMedicineMarketEntity.getIsLast()==0&&old.getIsLast()==1){
|
||||
Integer integer = toMarketService.getBaseMapper().selectCount(new LambdaQueryWrapper<CourseToMedicineMarketEntity>().eq(CourseToMedicineMarketEntity::getMedicineMarketId, courseMedicineMarketEntity.getId()));
|
||||
Integer integer = toMarketService.getBaseMapper().selectCount(new LambdaQueryWrapper<CourseToMedicineMarketEntity>().eq(CourseToMedicineMarketEntity::getMedicineMarketId, courseMedicineMarketEntity.getId())).intValue();
|
||||
if(integer>0){
|
||||
return R.error("请先清空绑定的课程后,再操作");
|
||||
}
|
||||
@@ -130,7 +129,7 @@ public class CourseMedicineMarketController {
|
||||
public R bindCourseAndMedicineMarket(@RequestBody Map<String,Integer> map){
|
||||
int marketId = map.get("marketId");
|
||||
int courseId = map.get("courseId");
|
||||
Integer integer = toMarketService.getBaseMapper().selectCount(new LambdaQueryWrapper<CourseToMedicineMarketEntity>().eq(CourseToMedicineMarketEntity::getMedicineMarketId, marketId).eq(CourseToMedicineMarketEntity::getCourseId, courseId));
|
||||
Integer integer = toMarketService.getBaseMapper().selectCount(new LambdaQueryWrapper<CourseToMedicineMarketEntity>().eq(CourseToMedicineMarketEntity::getMedicineMarketId, marketId).eq(CourseToMedicineMarketEntity::getCourseId, courseId)).intValue();
|
||||
if(integer>0){
|
||||
return R.error("不可重复绑定");
|
||||
}
|
||||
|
||||
@@ -58,14 +58,14 @@ public class CoursePsycheMarketController {
|
||||
public R editPsycheMarket(@RequestBody CoursePsycheMarket coursePsycheMarket){
|
||||
CoursePsycheMarket old = marketService.getById(coursePsycheMarket.getId());
|
||||
if(coursePsycheMarket.getIsLast()==1&&old.getIsLast()==0){//非终节点到终结点,要排除是否存在子集
|
||||
Integer integer = marketService.getBaseMapper().selectCount(new LambdaQueryWrapper<CoursePsycheMarket>().eq(CoursePsycheMarket::getPid, coursePsycheMarket.getId()));
|
||||
Integer integer = marketService.getBaseMapper().selectCount(new LambdaQueryWrapper<CoursePsycheMarket>().eq(CoursePsycheMarket::getPid, coursePsycheMarket.getId())).intValue();
|
||||
if(integer>0){
|
||||
return R.error("请先清空子集再操作!");
|
||||
}
|
||||
}
|
||||
|
||||
if(coursePsycheMarket.getIsLast()==0&&old.getIsLast()==1){
|
||||
Integer integer = toMarketService.getBaseMapper().selectCount(new LambdaQueryWrapper<CourseToPsycheMarket>().eq(CourseToPsycheMarket::getPsycheMarketId, coursePsycheMarket.getId()));
|
||||
Integer integer = toMarketService.getBaseMapper().selectCount(new LambdaQueryWrapper<CourseToPsycheMarket>().eq(CourseToPsycheMarket::getPsycheMarketId, coursePsycheMarket.getId())).intValue();
|
||||
if(integer>0){
|
||||
return R.error("请先清空绑定的课程后,再操作");
|
||||
}
|
||||
@@ -129,7 +129,7 @@ public class CoursePsycheMarketController {
|
||||
public R bindCourseAndPsycheMarket(@RequestBody Map<String,Integer> map){
|
||||
int marketId = map.get("marketId");
|
||||
int courseId = map.get("courseId");
|
||||
Integer integer = toMarketService.getBaseMapper().selectCount(new LambdaQueryWrapper<CourseToPsycheMarket>().eq(CourseToPsycheMarket::getPsycheMarketId, marketId).eq(CourseToPsycheMarket::getCourseId, courseId));
|
||||
Integer integer = toMarketService.getBaseMapper().selectCount(new LambdaQueryWrapper<CourseToPsycheMarket>().eq(CourseToPsycheMarket::getPsycheMarketId, marketId).eq(CourseToPsycheMarket::getCourseId, courseId)).intValue();
|
||||
if(integer>0){
|
||||
return R.error("不可重复绑定");
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.peanut.modules.master.controller;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.peanut.common.utils.ObjectUtils;
|
||||
import com.peanut.common.utils.R;
|
||||
import com.peanut.modules.common.entity.*;
|
||||
import com.peanut.modules.common.to.ParamTo;
|
||||
@@ -14,7 +13,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.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -56,14 +54,14 @@ public class CourseSociologyMarketController {
|
||||
public R editSociologyMarket(@RequestBody CourseSociologyMarketEntity courseSociologyMarketEntity){
|
||||
CourseSociologyMarketEntity old = marketService.getById(courseSociologyMarketEntity.getId());
|
||||
if(courseSociologyMarketEntity.getIsLast()==1&&old.getIsLast()==0){//非终节点到终结点,要排除是否存在子集
|
||||
Integer integer = marketService.getBaseMapper().selectCount(new LambdaQueryWrapper<CourseSociologyMarketEntity>().eq(CourseSociologyMarketEntity::getPid, courseSociologyMarketEntity.getId()));
|
||||
Integer integer = marketService.getBaseMapper().selectCount(new LambdaQueryWrapper<CourseSociologyMarketEntity>().eq(CourseSociologyMarketEntity::getPid, courseSociologyMarketEntity.getId())).intValue();
|
||||
if(integer>0){
|
||||
return R.error("请先清空子集再操作!");
|
||||
}
|
||||
}
|
||||
|
||||
if(courseSociologyMarketEntity.getIsLast()==0&&old.getIsLast()==1){
|
||||
Integer integer = toMarketService.getBaseMapper().selectCount(new LambdaQueryWrapper<CourseToSociologyMarketEntity>().eq(CourseToSociologyMarketEntity::getSociologyMarketId, courseSociologyMarketEntity.getId()));
|
||||
Integer integer = toMarketService.getBaseMapper().selectCount(new LambdaQueryWrapper<CourseToSociologyMarketEntity>().eq(CourseToSociologyMarketEntity::getSociologyMarketId, courseSociologyMarketEntity.getId())).intValue();
|
||||
if(integer>0){
|
||||
return R.error("请先清空绑定的课程后,再操作");
|
||||
}
|
||||
@@ -158,7 +156,7 @@ public class CourseSociologyMarketController {
|
||||
public R bindCourseAndSociologyMarket(@RequestBody Map<String,Integer> map){
|
||||
int marketId = map.get("marketId");
|
||||
int courseId = map.get("courseId");
|
||||
Integer integer = toMarketService.getBaseMapper().selectCount(new LambdaQueryWrapper<CourseToSociologyMarketEntity>().eq(CourseToSociologyMarketEntity::getSociologyMarketId, marketId).eq(CourseToSociologyMarketEntity::getCourseId, courseId));
|
||||
Integer integer = toMarketService.getBaseMapper().selectCount(new LambdaQueryWrapper<CourseToSociologyMarketEntity>().eq(CourseToSociologyMarketEntity::getSociologyMarketId, marketId).eq(CourseToSociologyMarketEntity::getCourseId, courseId)).intValue();
|
||||
if(integer>0){
|
||||
return R.error("不可重复绑定");
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ import com.peanut.modules.common.entity.CourseToTalent;
|
||||
import com.peanut.modules.common.service.CourseTaihumedService;
|
||||
import com.peanut.modules.common.service.CourseToTaihumedService;
|
||||
import com.peanut.modules.common.service.CourseToTalentService;
|
||||
import com.peanut.modules.common.to.ParamTo;
|
||||
import com.peanut.modules.master.service.CourseService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -20,7 +19,6 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -55,7 +53,7 @@ public class CourseTaihumedController {
|
||||
@RequestMapping("/delCourseTaihumed")
|
||||
public R delCourseTaihumed(@RequestBody Map<String,Object> params){
|
||||
//查看下一级是否存在
|
||||
int count = courseTaihumedService.count(new LambdaQueryWrapper<CourseTaihumed>()
|
||||
Long count = courseTaihumedService.count(new LambdaQueryWrapper<CourseTaihumed>()
|
||||
.eq(CourseTaihumed::getPid, params.get("id")));
|
||||
if(count>0){
|
||||
return R.error(501,"删除失败,请先删除子项目后再尝试");
|
||||
@@ -86,7 +84,7 @@ public class CourseTaihumedController {
|
||||
}
|
||||
}
|
||||
if(old.getIsLast()==1&& courseTaihumed.getIsLast()==0){
|
||||
Integer integer = courseToTaihumedService.count(new LambdaQueryWrapper<CourseToTaihumed>()
|
||||
Long integer = courseToTaihumedService.count(new LambdaQueryWrapper<CourseToTaihumed>()
|
||||
.eq(CourseToTaihumed::getTaihumedId, courseTaihumed.getId()));
|
||||
if(integer>0){
|
||||
return R.error(502,"更新失败,请先把此项与课程的关联关系清空后才可把此标签变成普通标签");
|
||||
|
||||
@@ -76,7 +76,7 @@ public class OfflineActivityController {
|
||||
|
||||
@RequestMapping("/updateOfflineActivity")
|
||||
public R updateOfflineActivity(@RequestBody OfflineActivity offlineActivity) {
|
||||
int count = toUserService.count(new LambdaQueryWrapper<OfflineActivityToUser>()
|
||||
Long count = toUserService.count(new LambdaQueryWrapper<OfflineActivityToUser>()
|
||||
.eq(OfflineActivityToUser::getActivityId,offlineActivity.getId()));
|
||||
if (count > 0) {
|
||||
return R.error("已有人报名禁止修改");
|
||||
@@ -87,7 +87,7 @@ public class OfflineActivityController {
|
||||
|
||||
@RequestMapping("/delOfflineActivity")
|
||||
public R delOfflineActivity(@RequestBody Map<String,Object> params) {
|
||||
int count = toUserService.count(new LambdaQueryWrapper<OfflineActivityToUser>()
|
||||
Long count = toUserService.count(new LambdaQueryWrapper<OfflineActivityToUser>()
|
||||
.eq(OfflineActivityToUser::getActivityId,params.get("id").toString()));
|
||||
if (count > 0) {
|
||||
return R.error("已有人报名禁止删除");
|
||||
|
||||
@@ -76,7 +76,7 @@ public class TaihuTalentController {
|
||||
if(one != null){
|
||||
return R.error(501,"绑定失败,绑定关系已将存在");
|
||||
}
|
||||
int count = courseToTalentService.count(new LambdaQueryWrapper<CourseToTalent>()
|
||||
Long count = courseToTalentService.count(new LambdaQueryWrapper<CourseToTalent>()
|
||||
.eq(CourseToTalent::getCourseId, courseToTalent.getCourseId()));
|
||||
List<CourseToTaihumed> ctts = courseToTaihumedService.list(new LambdaQueryWrapper<CourseToTaihumed>()
|
||||
.eq(CourseToTaihumed::getCourseId,courseToTalent.getCourseId()));
|
||||
|
||||
@@ -20,7 +20,7 @@ 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 javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URLEncoder;
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URLEncoder;
|
||||
@@ -224,7 +224,7 @@ public class UserCertificateController {
|
||||
}
|
||||
}
|
||||
if(oldLabel.getIsLast()==1&& label.getIsLast()==0){
|
||||
Integer integer = userCertificateService.count(new LambdaQueryWrapper<UserCertificate>()
|
||||
Long integer = userCertificateService.count(new LambdaQueryWrapper<UserCertificate>()
|
||||
.eq(UserCertificate::getLabelId, label.getId()));
|
||||
if(integer>0){
|
||||
return R.error("更新失败,标签下存在证书");
|
||||
@@ -238,13 +238,13 @@ public class UserCertificateController {
|
||||
@RequestMapping("/delUserCertificateLabel")
|
||||
public R delUserCertificateLabel(@RequestBody Map<String,Object> params) {
|
||||
//查看下一级是否存在
|
||||
int count = userCertificateLabelService.count(new LambdaQueryWrapper<UserCertificateLabel>()
|
||||
Long count = userCertificateLabelService.count(new LambdaQueryWrapper<UserCertificateLabel>()
|
||||
.eq(UserCertificateLabel::getPid, params.get("id")));
|
||||
if(count>0){
|
||||
return R.error("删除失败,请先删除子项目后再尝试");
|
||||
}
|
||||
//查看绑定关系是否存在
|
||||
Integer integer = userCertificateService.count(new LambdaQueryWrapper<UserCertificate>()
|
||||
Long integer = userCertificateService.count(new LambdaQueryWrapper<UserCertificate>()
|
||||
.eq(UserCertificate::getLabelId, params.get("id")));
|
||||
if(integer>0){
|
||||
return R.error("删除失败,标签下存在证书");
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.OutputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.net.URLEncoder;
|
||||
@@ -79,7 +79,7 @@ public class UserContributionController {
|
||||
@RequestMapping("/delUserContributionLabelList")
|
||||
public R delUserContributionLabelList(@RequestBody Map<String, Object> params) {
|
||||
SysDictDataEntity sysDictDataEntity = sysDictDataService.getById(params.get("id").toString());
|
||||
int count = contributionService.count(new LambdaQueryWrapper<UserContribution>()
|
||||
Long count = contributionService.count(new LambdaQueryWrapper<UserContribution>()
|
||||
.eq(UserContribution::getType,sysDictDataEntity.getDictType()));
|
||||
if (count > 0){
|
||||
return R.error("已存在湖分记录");
|
||||
|
||||
@@ -14,7 +14,7 @@ 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 javax.transaction.Transactional;
|
||||
import jakarta.transaction.Transactional;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user