| | |
| | | questionBank.setPrivatize(PrivatizeEnum.PUBLIC.getCode()); |
| | | }else{ |
| | | questionBank.setCompanyId(user.getCompanyId()); |
| | | questionBank.setPrivatize(PrivatizeEnum.PRIVATE.getCode()); |
| | | } |
| | | int row =baseMapper.insert(questionBank); |
| | | if(row<1){ |
| | |
| | | if(currentUser.getUserType().equals(UserTypeEnum.STUDENT.getCode())){ |
| | | throw new ApiException("没有权限操作"); |
| | | } |
| | | if(!currentUser.getCompanyId().equals(questionBank.getCompanyId())){ |
| | | if(questionBank.getCompanyId()!=null&&!currentUser.getCompanyId().equals(questionBank.getCompanyId())){ |
| | | throw new ApiException("没有权限操作其他企业课程"); |
| | | } |
| | | } |