diff --git a/src/main/java/club/joylink/rtss/services/IOrderService.java b/src/main/java/club/joylink/rtss/services/IOrderService.java index c77efed45..ba1cdf399 100644 --- a/src/main/java/club/joylink/rtss/services/IOrderService.java +++ b/src/main/java/club/joylink/rtss/services/IOrderService.java @@ -27,8 +27,7 @@ public interface IOrderService { /** * 创建订单 - * @param createVO - * @param user + * @return orderCode */ String createOrder(OrderCreateVO createVO, UserVO user); diff --git a/src/main/java/club/joylink/rtss/services/IPermissionService.java b/src/main/java/club/joylink/rtss/services/IPermissionService.java index eb8224d83..5a8f54b92 100644 --- a/src/main/java/club/joylink/rtss/services/IPermissionService.java +++ b/src/main/java/club/joylink/rtss/services/IPermissionService.java @@ -1,5 +1,6 @@ package club.joylink.rtss.services; +import club.joylink.rtss.entity.Permission; import club.joylink.rtss.vo.UserVO; import club.joylink.rtss.vo.client.PageVO; import club.joylink.rtss.vo.client.permission.PermissionCreateVO; @@ -30,21 +31,10 @@ public interface IPermissionService { List findByMapId(Long mapId); - List findPermissionPackageOrBasePermission(Boolean isPackage); - PermissionVO getById(Long permissionId); List findPermissionByRelPermissionIds(List asList); - List getPermissionByRelPermissionIds(List relPermissionIds); - - /** - * 查询包含该权限的权限包 - * @param id 被包含的权限的id - * @return - */ - List findPackageContainsPermission(Long id); - PermissionVO getJointSimulationPermissionByMapId(Long mapId); PermissionVO getTeachPermissionByMapId(Long mapId); @@ -54,4 +44,14 @@ public interface IPermissionService { * @param user */ void realGenerate(UserVO user); + + /** + * 根据mapIds查询教学权限 + */ + List findTeachPermissionEntity(List mapIds); + + /** + * 根据mapId查询教学权限 + */ + Permission findTeachPermissionEntity(Long mapId); } diff --git a/src/main/java/club/joylink/rtss/services/IUserPermissionService.java b/src/main/java/club/joylink/rtss/services/IUserPermissionService.java index d4a983f7f..5c3e45f34 100644 --- a/src/main/java/club/joylink/rtss/services/IUserPermissionService.java +++ b/src/main/java/club/joylink/rtss/services/IUserPermissionService.java @@ -2,6 +2,7 @@ package club.joylink.rtss.services; import club.joylink.rtss.constants.StatusEnum; import club.joylink.rtss.entity.PermissionDistribute; +import club.joylink.rtss.entity.UserPermission; import club.joylink.rtss.vo.UserVO; import club.joylink.rtss.vo.client.PageVO; import club.joylink.rtss.vo.client.permission.DistributeSelectVO; @@ -53,10 +54,6 @@ public interface IUserPermissionService { List queryByDistribute(Long id); - List getByDistributeId(Long id); - - List findByDistributeId(Long distributeId); - void restorePermissionToDistribute(Long userPermissionId); List findByDistributeIdAndStatus(Long distributeId, StatusEnum status); @@ -72,14 +69,6 @@ public interface IUserPermissionService { */ void invalidateUserPermissionByDistributeId(Long distributeId); - /** - * 查询这张地图下该用户可用的综合演练权限 - * @param mapId - * @param userId - * @return - */ - List findValidJointTrainingUserPermissionByMapIdAndUserId(Long mapId, Long userId); - /** * 获取个人所有用户权限 * @param user @@ -93,4 +82,9 @@ public interface IUserPermissionService { * @param permissionConfigVOList */ void generateUserPermissions(UserVO userVO, List permissionConfigVOList); + + /** + * 查询有效的用户教学权限 + */ + List findEntity(List userIds, Boolean valid); } diff --git a/src/main/java/club/joylink/rtss/services/PermissionService.java b/src/main/java/club/joylink/rtss/services/PermissionService.java index dc0d7dc3b..81a05a330 100644 --- a/src/main/java/club/joylink/rtss/services/PermissionService.java +++ b/src/main/java/club/joylink/rtss/services/PermissionService.java @@ -463,13 +463,6 @@ public class PermissionService implements IPermissionService { return voList; } - @Override - public List getPermissionByRelPermissionIds(List relPermissionIds) { - List voList = findPermissionByRelPermissionIds(relPermissionIds); - BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertCollectionNotEmpty(voList); - return voList; - } - @Override public List findByMapId(Long mapId) { PermissionExample example = new PermissionExample(); @@ -517,6 +510,31 @@ public class PermissionService implements IPermissionService { } } + @Override + public List findTeachPermissionEntity(List mapIds) { + PermissionExample example = new PermissionExample(); + example.createCriteria() + .andMapIdIn(mapIds) + .andTypeEqualTo(PermissionTypeEnum.Teaching_Package.getCode()) + .andIsPackageEqualTo(true); + return permissionDAO.selectByExample(example); + } + + @Override + public Permission findTeachPermissionEntity(Long mapId) { + PermissionExample example = new PermissionExample(); + example.createCriteria() + .andMapIdEqualTo(mapId) + .andTypeEqualTo(PermissionTypeEnum.Teaching_Package.getCode()) + .andIsPackageEqualTo(true); + List permissions = permissionDAO.selectByExample(example); + if (CollectionUtils.isEmpty(permissions)) { + return null; + } else { + return permissions.get(0); + } + } + /** * 根据mapId获取该地图下的综合演练权限 */ @@ -534,25 +552,4 @@ public class PermissionService implements IPermissionService { return new PermissionVO(permissions.get(0)); } - /** - * 查询所有权限包或所有基础权限 - * - * @return - */ - @Override - public List findPermissionPackageOrBasePermission(Boolean isPackage) { - PermissionExample example = new PermissionExample(); - example.createCriteria() - .andIsPackageEqualTo(isPackage); - List permissionList = permissionDAO.selectByExample(example); - List voList = permissionList.stream().map(permission -> new PermissionVO(permission)).collect(Collectors.toList()); - return voList; - } - - public List findPackageContainsPermission(Long relPermissionId) { - PermissionExample example = new PermissionExample(); - example.createCriteria().andRelPermissionsLike(String.format("%%%s%%", relPermissionId)); - List permissionList = permissionDAO.selectByExample(example); - return PermissionVO.convert2VOList(permissionList); - } } diff --git a/src/main/java/club/joylink/rtss/services/UserPermissionService.java b/src/main/java/club/joylink/rtss/services/UserPermissionService.java index 8a5738581..0c8459058 100644 --- a/src/main/java/club/joylink/rtss/services/UserPermissionService.java +++ b/src/main/java/club/joylink/rtss/services/UserPermissionService.java @@ -341,15 +341,6 @@ public class UserPermissionService implements IUserPermissionService { return userPermissionDAO.selectByExample(example); } - @Override - public List getByDistributeId(Long distributeId) { - List userPermissionList = this.findEntityByDistributeId(distributeId); - BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertCollectionNotEmpty(userPermissionList, - String.format("distributeId为[%s]的用户权限不存在", distributeId)); - List voList = userPermissionList.stream().map(userPermission -> new UserPermissionVO(userPermission)).collect(Collectors.toList()); - return voList; - } - public List findByPermissionIdAndUserId(Long permissionId, Long userId) { UserPermissionExample example = new UserPermissionExample(); example.createCriteria() @@ -447,12 +438,6 @@ public class UserPermissionService implements IUserPermissionService { return this.findByPermissionIdAndUserId(permission.getId(), userId); } - @Override - public List findByDistributeId(Long distributeId) { - List upList = findEntityByDistributeId(distributeId); - return upList.stream().map(UserPermissionVO::new).collect(Collectors.toList()); - } - @Transactional @Override public void restorePermissionToDistribute(Long userPermissionId) { @@ -495,19 +480,6 @@ public class UserPermissionService implements IUserPermissionService { userPermissionDAO.updateInvalidByDistributeId(distributeId); } - @Override - public List findValidJointTrainingUserPermissionByMapIdAndUserId(Long mapId, Long userId) { - PermissionVO permission = iPermissionService.getJointSimulationPermissionByMapId(mapId); - UserPermissionExample example = new UserPermissionExample(); - example.createCriteria() - .andPermissionIdEqualTo(permission.getId()) - .andUserIdEqualTo(userId) - .andStatusEqualTo(StatusEnum.Valid.getCode()) - .andRemainsGreaterThan(0); - List userPermissionList = userPermissionDAO.selectByExample(example); - return userPermissionList.stream().map(UserPermissionVO::new).collect(Collectors.toList()); - } - @Override public List queryPersonalUserPermission(UserVO user) { List voList = findByUserId(user.getId()); @@ -526,6 +498,20 @@ public class UserPermissionService implements IUserPermissionService { } } + @Override + public List findEntity(List userIds, Boolean valid) { + StatusEnum status = null; + if (valid != null) { + status = valid ? StatusEnum.Valid : StatusEnum.Invalid; + } + UserPermissionExample example = new UserPermissionExample(); + UserPermissionExample.Criteria criteria = example.createCriteria().andUserIdIn(userIds); + if (status != null) { + criteria.andStatusEqualTo(status.getCode()); + } + return userPermissionDAO.selectByExample(example); + } + private List findByUserId(Long userId) { UserPermissionExample example = new UserPermissionExample(); example.createCriteria().andUserIdEqualTo(userId); diff --git a/src/main/java/club/joylink/rtss/services/student/ClassStudentUserServiceImpl.java b/src/main/java/club/joylink/rtss/services/student/ClassStudentUserServiceImpl.java index 3e11ea2ce..5f47edbc9 100644 --- a/src/main/java/club/joylink/rtss/services/student/ClassStudentUserServiceImpl.java +++ b/src/main/java/club/joylink/rtss/services/student/ClassStudentUserServiceImpl.java @@ -1,27 +1,37 @@ package club.joylink.rtss.services.student; -import club.joylink.rtss.constants.BusinessConsts; -import club.joylink.rtss.constants.Client; +import club.joylink.rtss.constants.*; import club.joylink.rtss.dao.*; import club.joylink.rtss.entity.*; import club.joylink.rtss.exception.BusinessExceptionAssertEnum; -import club.joylink.rtss.services.ILessonService; +import club.joylink.rtss.services.*; import club.joylink.rtss.vo.UserVO; import club.joylink.rtss.vo.client.LessonVO; +import club.joylink.rtss.vo.client.goods.GoodsVO; +import club.joylink.rtss.vo.client.map.MapVO; +import club.joylink.rtss.vo.client.order.OrderCreateVO; +import club.joylink.rtss.vo.client.order.OrderDetailCreateVO; +import club.joylink.rtss.vo.client.permissionDistribute.DistributeVO; import club.joylink.rtss.vo.client.student.*; +import club.joylink.rtss.vo.client.userPermission.UserPermissionAndAmountVO; +import club.joylink.rtss.vo.client.userPermission.UserPermissionDistributeVO; +import club.joylink.rtss.vo.client.userPermission.UserPermissionVO; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; +import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; -/**处理 学生-用户-班级-课程 试卷子数据及关系*/ +/** + * 处理 学生-用户-班级-课程 试卷子数据及关系 + */ @Slf4j @Service public class ClassStudentUserServiceImpl implements IClassStudentUserService { @@ -57,7 +67,28 @@ public class ClassStudentUserServiceImpl implements IClassStudentUserService { private ILessonService lessonService; @Autowired - private StudentRelExamClassDAO studentRelExamClassDAO; + private StudentRelExamClassDAO studentRelExamClassDAO; + + @Autowired + private IPermissionService iPermissionService; + + @Autowired + private IMapService iMapService; + + @Autowired + private IUserPermissionService iUserPermissionService; + + @Autowired + private IPermissionDistributeService iPermissionDistributeService; + + @Autowired + private IGoodsService iGoodsService; + + @Autowired + private ISysUserService iSysUserService; + + @Autowired + private IOrderService iOrderService; @Override @Transactional @@ -97,8 +128,8 @@ public class ClassStudentUserServiceImpl implements IClassStudentUserService { List users = this.sysUserDAO.selectByExample(userExample); if (!CollectionUtils.isEmpty(users)) { oldSysUsers.add(users.get(0)); - StudentRelIdClassExample relIdClassExample = new StudentRelIdClassExample(); - relIdClassExample.createCriteria().andStudentUserIdEqualTo(users.get(0).getId()).andClassIdNotEqualTo(studentClass.getId()); + StudentRelIdClassExample relIdClassExample = new StudentRelIdClassExample(); + relIdClassExample.createCriteria().andStudentUserIdEqualTo(users.get(0).getId()).andClassIdNotEqualTo(studentClass.getId()); BusinessExceptionAssertEnum.DATA_ALREADY_EXIST.assertTrue(this.studentRelIdClassDAO.countByExample(relIdClassExample) <= 0, "其他班级已存在相同学号的学生!"); // relIdClassExample.clear(); @@ -114,17 +145,31 @@ public class ClassStudentUserServiceImpl implements IClassStudentUserService { } oldSysUsers.addAll(newSysUsers); //增加班级-用户关系 - (finalClassExist?newSysUsers:oldSysUsers).forEach(sysUser -> { + (finalClassExist ? newSysUsers : oldSysUsers).forEach(sysUser -> { StudentRelIdClass studentRelIdClass = new StudentRelIdClass(); studentRelIdClass.setClassId(studentClass.getId()); studentRelIdClass.setStudentUserId(sysUser.getId()); this.studentRelIdClassDAO.insert(studentRelIdClass); }); - + //【只考虑了贵州装备项目】检查学生的权限,自动给没有权限的学生分发权限(创建权限分发给赵杰,从赵杰的权限再分发给学生)--- + if (CollectionUtils.isEmpty(oldSysUsers)) return; + List gzbMaps = iMapService.queryOnlineMapInfoListOfProject(Project.valueOf(projectCode)); + BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertCollectionNotEmpty(gzbMaps, + String.format("项目[%s]没有在线的地图", projectCode)); + Long gzbMapId = gzbMaps.get(0).getId(); + Permission permission = iPermissionService.findTeachPermissionEntity(gzbMapId); + log.warn(String.format("项目[%s]没有有效的教学权限", projectCode)); + if (permission == null) return; + GoodsVO good = iGoodsService.selectGoodsByPermissionId(permission.getId()); + List userIds = oldSysUsers.stream().map(SysUser::getId).collect(Collectors.toList()); + List userPermissions = iUserPermissionService.findEntity(userIds, true); + List usersWithPermissions = userPermissions.stream() + .filter(up -> permission.getId().equals(up.getPermissionId())).map(UserPermission::getUserId).collect(Collectors.toList()); + distributePermissions2ZJ(good.getId(), userIds, usersWithPermissions); } @Override - public List getClassesByProjectCode(String projectCode){ + public List getClassesByProjectCode(String projectCode) { StudentClassExample classExample = new StudentClassExample(); classExample.createCriteria().andProjectCodeEqualTo(projectCode); List studentClasses = this.studentClassDAO.selectByExample(classExample); @@ -132,13 +177,13 @@ public class ClassStudentUserServiceImpl implements IClassStudentUserService { } @Override - public List getClassesByLesson(Long lessonId){ + public List getClassesByLesson(Long lessonId) { List classes = this.studentClassDAO.getClasses(lessonId); return StudentClassVO.convertFromDBList(classes); } @Override - public List getClassesByExamId(Long examId){ + public List getClassesByExamId(Long examId) { StudentRelExamClassExample example = new StudentRelExamClassExample(); example.createCriteria().andExamIdEqualTo(examId); List classes = this.studentClassDAO.getClassesByExamId(examId); @@ -146,7 +191,7 @@ public class ClassStudentUserServiceImpl implements IClassStudentUserService { } @Override - public List getRelLessonsByClass(Integer classId){ + public List getRelLessonsByClass(Integer classId) { StudentRelLessonClassExample relLessonClassExample = new StudentRelLessonClassExample(); relLessonClassExample.createCriteria().andClassIdEqualTo(classId); List studentClasses = this.studentRelLessonClassDAO.selectByExample(relLessonClassExample); @@ -154,7 +199,7 @@ public class ClassStudentUserServiceImpl implements IClassStudentUserService { } @Override - public List getRelclassByLessonId(Long LessonId){ + public List getRelclassByLessonId(Long LessonId) { List classes = this.studentRelLessonClassDAO.getClassNames(LessonId); return classes; } @@ -168,13 +213,13 @@ public class ClassStudentUserServiceImpl implements IClassStudentUserService { } @Override - public List getLessonByClass(Integer classId){ + public List getLessonByClass(Integer classId) { List lessonIds = getRelLessonsByClass(classId).stream().map(StudentRelLessonClass::getLessonId).collect(Collectors.toList()); return lessonService.getValidLesson(lessonIds, null); } @Override - public List getRelClassByUser(Long userId){ + public List getRelClassByUser(Long userId) { StudentRelIdClassExample relIdClassExample = new StudentRelIdClassExample(); relIdClassExample.createCriteria().andStudentUserIdEqualTo(userId); List studentRelIdClasses = this.studentRelIdClassDAO.selectByExample(relIdClassExample); @@ -206,19 +251,19 @@ public class ClassStudentUserServiceImpl implements IClassStudentUserService { //查询出勤天数 Integer days = this.sysUserLoginDAO.loginDays(studentRelIdClass.getStudentUserId(), Client.Joylink.getName(), infoExportParam.getTermBeginDate(), infoExportParam.getTermEndDate()); //出勤率 - exportStudentInfo.setAttendance((float) Math.round((Objects.isNull(days) ? 0 : (days>infoExportParam.getAttendanceDays()?infoExportParam.getAttendanceDays():days)) * 100 / infoExportParam.getAttendanceDays()) / 100); + exportStudentInfo.setAttendance((float) Math.round((Objects.isNull(days) ? 0 : (days > infoExportParam.getAttendanceDays() ? infoExportParam.getAttendanceDays() : days)) * 100 / infoExportParam.getAttendanceDays()) / 100); infoExportParam.getPrdParams().forEach(prdParam -> { PrdStudentScoretInfo prdStudentScoretInfo = new PrdStudentScoretInfo(); prdStudentScoretInfo.setPrdType(prdParam.getPrdType()); //查询课程下不同实训的测验通过数 - Integer passedNum = this.userTrainingStatsMapper.countBy(studentRelIdClass.getStudentUserId(), prdParam.getLessonId(), 0, BusinessConsts.Training.Mode.Mode04, 1,infoExportParam.getTermBeginDate(), infoExportParam.getTermEndDate()); + Integer passedNum = this.userTrainingStatsMapper.countBy(studentRelIdClass.getStudentUserId(), prdParam.getLessonId(), 0, BusinessConsts.Training.Mode.Mode04, 1, infoExportParam.getTermBeginDate(), infoExportParam.getTermEndDate()); //技能操作通过率 if (prd2TrainNums.get(prdParam.getPrdType()) != 0) { prdStudentScoretInfo.setLessonPassRate((float) Math.round((Objects.isNull(passedNum) ? 0 : passedNum) * 100 / prd2TrainNums.get(prdParam.getPrdType())) / 100); } //查询考试得分 - Integer maxScore = this.userExamMapper.getMaxScoreBy(studentRelIdClass.getStudentUserId(), prdParam.getExamPaperId(),infoExportParam.getTermBeginDate(), infoExportParam.getTermEndDate()); + Integer maxScore = this.userExamMapper.getMaxScoreBy(studentRelIdClass.getStudentUserId(), prdParam.getExamPaperId(), infoExportParam.getTermBeginDate(), infoExportParam.getTermEndDate()); //考试成绩占总分比 prdStudentScoretInfo.setExamSocreRadio((float) Math.round((Objects.isNull(maxScore) ? 0 : maxScore) * 100 / prd2Fullpoint.get(prdParam.getPrdType())) / 100); exportStudentInfo.getScores().add(prdStudentScoretInfo); @@ -228,7 +273,7 @@ public class ClassStudentUserServiceImpl implements IClassStudentUserService { } @Override - public void addExamRelClass(Long examId, Integer classId){ + public void addExamRelClass(Long examId, Integer classId) { StudentRelExamClass studentRelExamClass = new StudentRelExamClass(); studentRelExamClass.setExamId(examId); studentRelExamClass.setClassId(classId); @@ -236,9 +281,53 @@ public class ClassStudentUserServiceImpl implements IClassStudentUserService { } @Override - public void deleteExamRelClass(Long examId){ + public void deleteExamRelClass(Long examId) { StudentRelExamClassExample example = new StudentRelExamClassExample(); example.createCriteria().andExamIdEqualTo(examId); studentRelExamClassDAO.deleteByExample(example); } + + /** + * 创建权限分发给赵杰,再从赵杰的权限创建权限分发给学生领取 + */ + private void distributePermissions2ZJ(Long goodId, List importUserIds, List userIdsWithPermissions) { + int goodAmount = importUserIds.size() - userIdsWithPermissions.size(); + if (goodAmount <= 0) return; //不需要发权限 + //创建权限分发 + OrderCreateVO orderCreate = new OrderCreateVO(); + orderCreate.setOrganizationId(48L); + orderCreate.setOrderType(SaleOrderTypeEnum.Internal_Distribution.getCode()); + orderCreate.setForever(false); + orderCreate.setStartTime(LocalDateTime.now()); + orderCreate.setMonthAmount(12); + orderCreate.setPayStatus(SaleOrderPayStatusEnum.No_Need.getCode()); + orderCreate.setDetailCreateVOList(List.of(new OrderDetailCreateVO(goodId, goodAmount))); + UserVO userZJ = iSysUserService.findUserById(163L); + String orderCode = iOrderService.createOrder(orderCreate, userZJ); + iPermissionDistributeService.distributeFromOrder(orderCode, userZJ); + //给赵杰领权限 + DistributeVO distribute = iPermissionDistributeService.getByOrderCode(orderCode); + Long distributeId = distribute.getId(); + iPermissionDistributeService.getUserPermission(distributeId, userZJ); + //从赵杰的权限创建权限分发 + UserPermissionVO userPermission = iUserPermissionService.findValidByUserIdAndDistributeId(userZJ.getId(), distributeId).get(0); + UserPermissionDistributeVO distributeFromUP = new UserPermissionDistributeVO(); + distributeFromUP.setStartTime(distribute.getStartTime()); + distributeFromUP.setEndTime(distribute.getEndTime()); + distributeFromUP.setDistribute(false); + UserPermissionAndAmountVO upAndAmount = new UserPermissionAndAmountVO(userPermission.getId(), distribute.getAmount()); + List upAndAmountList = new ArrayList<>(); + upAndAmountList.add(upAndAmount); + distributeFromUP.setUserPermissionAndAmountVOList(upAndAmountList); + iPermissionDistributeService.distributeFromUserPermission(distributeFromUP, userZJ); + //给没权限的学生领权限 + DistributeVO distribute4Student = iPermissionDistributeService.getByFromUserPermissionId(userPermission.getId()).get(0); + List needPermissionUserIds = importUserIds; + needPermissionUserIds.removeAll(userIdsWithPermissions); + List needPermissionUsers = iSysUserService.findEntity(needPermissionUserIds); + for (SysUser student : needPermissionUsers) { + UserVO studentVO = new UserVO(student); + iPermissionDistributeService.getUserPermission(distribute4Student.getId(), studentVO); + } + } } diff --git a/src/main/java/club/joylink/rtss/vo/client/order/OrderDetailCreateVO.java b/src/main/java/club/joylink/rtss/vo/client/order/OrderDetailCreateVO.java index 75b8cae6f..872af6446 100644 --- a/src/main/java/club/joylink/rtss/vo/client/order/OrderDetailCreateVO.java +++ b/src/main/java/club/joylink/rtss/vo/client/order/OrderDetailCreateVO.java @@ -18,6 +18,11 @@ public class OrderDetailCreateVO { @NotNull(message = "商品数量不能为空") private Integer goodsAmount; + public OrderDetailCreateVO(Long goodsId, Integer goodsAmount) { + this.goodsId = goodsId; + this.goodsAmount = goodsAmount; + } + public SaleOrderDetail convert2DB() { SaleOrderDetail detail = new SaleOrderDetail(); detail.setGoodsId(goodsId); diff --git a/src/main/java/club/joylink/rtss/vo/client/userPermission/UserPermissionAndAmountVO.java b/src/main/java/club/joylink/rtss/vo/client/userPermission/UserPermissionAndAmountVO.java index 01aff5f21..bb45db8a2 100644 --- a/src/main/java/club/joylink/rtss/vo/client/userPermission/UserPermissionAndAmountVO.java +++ b/src/main/java/club/joylink/rtss/vo/client/userPermission/UserPermissionAndAmountVO.java @@ -22,4 +22,8 @@ public class UserPermissionAndAmountVO { @NotNull(message = "用户权限数量不能为空") private Integer amount; + public UserPermissionAndAmountVO(Long userPermissionId, Integer amount) { + this.userPermissionId = userPermissionId; + this.amount = amount; + } }