分享题库功能完善2
This commit is contained in:
parent
0bbfa546fc
commit
4b66fa8c0c
|
@ -7,6 +7,7 @@ import com.yzdx.AiInterviewer.entity.LogoEntity;
|
|||
import com.yzdx.AiInterviewer.service.InterviewBackgroundService;
|
||||
import com.yzdx.AiInterviewer.service.InterviewImagesService;
|
||||
import com.yzdx.AiInterviewer.service.InterviewLogoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -77,7 +78,7 @@ public class InterviewController {
|
|||
* @param id 图片id
|
||||
* @return R
|
||||
*/
|
||||
@GetMapping("/delete_logo")
|
||||
@DeleteMapping("/delete_logo")
|
||||
public R deleteLogoById(@ApiParam("传入的值为:(Integer)id") Integer id){
|
||||
|
||||
Integer rows = LogoService.deleteLogoById(id);
|
||||
|
@ -139,7 +140,7 @@ public class InterviewController {
|
|||
* @param id 公司id
|
||||
* @return R
|
||||
*/
|
||||
@GetMapping("/delete_background")
|
||||
@DeleteMapping("/delete_background")
|
||||
public R deleteBackgroundById(@ApiParam("传入的值为:(Integer)id") Integer id){
|
||||
|
||||
Integer rows = backgroundService.deleteBackgroundById(id);
|
||||
|
@ -203,7 +204,7 @@ public class InterviewController {
|
|||
* @param id 图片id
|
||||
* @return R
|
||||
*/
|
||||
@GetMapping("/delete_image")
|
||||
@DeleteMapping("/delete_image")
|
||||
public R deleteImageById(@ApiParam("传入的值:(Integer)id") Integer id){
|
||||
|
||||
Integer rows = imagesService.deleteImageById(id);
|
||||
|
|
|
@ -11,6 +11,7 @@ import com.yzdx.AiInterviewer.service.QuestionBankService;
|
|||
import com.yzdx.AiInterviewer.service.QuestionService;
|
||||
import com.yzdx.AiInterviewer.service.SharedQuestionBankService;
|
||||
import com.yzdx.AiInterviewer.service.SharedQuestionService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
@ -116,7 +117,7 @@ public class QuestionController {
|
|||
* @param typeId 传入的题库id
|
||||
* return R
|
||||
* */
|
||||
@GetMapping("/delete_type")
|
||||
@DeleteMapping("/delete_type")
|
||||
public R deleteTypeName(@RequestParam @ApiParam("typeId:传入的题库id") Integer typeId){
|
||||
if(typeId==null){
|
||||
return R.error("提交的信息错误,请检查输入");
|
||||
|
@ -247,7 +248,7 @@ public class QuestionController {
|
|||
* @param id 删除题目的id
|
||||
* return R
|
||||
* */
|
||||
@GetMapping("/del_question")
|
||||
@DeleteMapping("/del_question")
|
||||
public R deleteQuestion(@ApiParam("传入的值:(Integer)id") Integer id){
|
||||
|
||||
Integer rows=questionService.deleteQuestion(id);
|
||||
|
|
|
@ -8,14 +8,9 @@ import com.yzdx.AiInterviewer.entity.dto.JobSettingDto;
|
|||
import com.yzdx.AiInterviewer.service.CompanyService;
|
||||
import com.yzdx.AiInterviewer.service.InterviewSettingService;
|
||||
import com.yzdx.AiInterviewer.service.JobListService;
|
||||
import com.yzdx.AiInterviewer.utiles.MyStringUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
|
@ -31,7 +26,7 @@ public class RecruitmentController {
|
|||
private CompanyService companyService;
|
||||
|
||||
@PostMapping("/add_job")
|
||||
public R addJob(@RequestBody Map<String,Object> addInfo){
|
||||
public R addJob(@RequestBody Map<String,Object> addInfo){
|
||||
|
||||
if (addInfo.size()!=15){
|
||||
return R.error("表格数据不全,请检查输入");
|
||||
|
@ -144,7 +139,7 @@ public class RecruitmentController {
|
|||
return R.success("修改岗位状态成功");
|
||||
}
|
||||
|
||||
@GetMapping("/delete_job")
|
||||
@DeleteMapping("/delete_job")
|
||||
public R deleteJob(Integer id) {
|
||||
if (id == null) {
|
||||
|
||||
|
@ -208,7 +203,7 @@ public class RecruitmentController {
|
|||
return R.success(jobSettingDtos);
|
||||
}
|
||||
|
||||
@GetMapping("/delete_jobJobSetting")
|
||||
@DeleteMapping("/delete_jobJobSetting")
|
||||
public R deleteJobSetting(Integer id){
|
||||
|
||||
Integer rows = interviewSettingService.deleteJobSetting(id);
|
||||
|
|
|
@ -3,11 +3,9 @@ package com.yzdx.AiInterviewer.controller;
|
|||
|
||||
import com.yzdx.AiInterviewer.comment.R;
|
||||
import com.yzdx.AiInterviewer.utiles.ParseResumeUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
@ -17,6 +15,7 @@ import java.util.*;
|
|||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
|
||||
@RestController
|
||||
@Slf4j
|
||||
public class UploadController {
|
||||
|
@ -163,7 +162,7 @@ public class UploadController {
|
|||
* @param imagePath
|
||||
* @return R
|
||||
*/
|
||||
@GetMapping("/delete_picture")
|
||||
@DeleteMapping("/delete_picture")
|
||||
public R deletePicture(HttpServletRequest request,String imagePath){
|
||||
if(imagePath==null||imagePath.equals("")){
|
||||
return R.error("删除失败!");
|
||||
|
@ -191,7 +190,7 @@ public class UploadController {
|
|||
* @param videoPath
|
||||
* @return R
|
||||
*/
|
||||
@GetMapping("/delete_video")
|
||||
@DeleteMapping("/delete_video")
|
||||
public R deleteVideo(HttpServletRequest request,String videoPath){
|
||||
if(videoPath==null||videoPath.equals("")){
|
||||
return R.error("删除失败!");
|
||||
|
@ -283,7 +282,7 @@ public class UploadController {
|
|||
* @param resumePath
|
||||
* @return R
|
||||
*/
|
||||
@GetMapping("/delete_resume")
|
||||
@DeleteMapping("/delete_resume")
|
||||
public R deleteResume(HttpServletRequest request,String resumePath){
|
||||
if(resumePath==null||resumePath.equals("")){
|
||||
return R.error("删除失败!");
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.yzdx.AiInterviewer.comment.R;
|
|||
import com.yzdx.AiInterviewer.entity.User;
|
||||
import com.yzdx.AiInterviewer.service.UserService;
|
||||
import com.yzdx.AiInterviewer.utiles.JWT;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
|
@ -12,7 +13,6 @@ import org.springframework.web.bind.annotation.*;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/admin")
|
||||
public class UserController {
|
||||
|
@ -143,14 +143,13 @@ public class UserController {
|
|||
|
||||
/**
|
||||
* 更新管理员信息
|
||||
* @param deleteInfo 操作人的id,删除人的id
|
||||
* @param userId 操作人的id
|
||||
* @param deleteId 删除人的id
|
||||
* @return R
|
||||
*/
|
||||
@PostMapping("/del_admin")
|
||||
public R deleteAdmin(@RequestBody @ApiParam("传入的值 deleteInfo:{(Integer)userId,(Integer)deleteId}") Map<String,Object> deleteInfo){
|
||||
@DeleteMapping("/del_admin")
|
||||
public R deleteAdmin(@ApiParam("传入的值 (Integer)userId,(Integer)deleteId")Integer deleteId,Integer userId){
|
||||
|
||||
Integer deleteId=(Integer) deleteInfo.get("deleteId");
|
||||
Integer userId=(Integer) deleteInfo.get("userId");
|
||||
|
||||
Integer rows = userService.deleteAdmin(deleteId, userId);
|
||||
if(rows==-3){
|
||||
|
|
Loading…
Reference in New Issue