diff --git a/src/main/java/com/yzdx/AiInterviewer/config/UserInterceptor.java b/src/main/java/com/yzdx/AiInterviewer/config/UserInterceptor.java index 21928de..033b93d 100644 --- a/src/main/java/com/yzdx/AiInterviewer/config/UserInterceptor.java +++ b/src/main/java/com/yzdx/AiInterviewer/config/UserInterceptor.java @@ -9,6 +9,7 @@ import org.springframework.web.servlet.HandlerInterceptor; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import java.io.IOException; import java.io.PrintWriter; import java.util.HashMap; import java.util.Map; @@ -44,10 +45,16 @@ public class UserInterceptor implements HandlerInterceptor { map.put("code", 401); JSONObject json = new JSONObject(map); response.setContentType("application/json;charset=UTF-8"); - PrintWriter writer = response.getWriter(); - writer.print(json); - writer.flush(); - writer.close(); + PrintWriter writer = null; + try { + writer = response.getWriter(); + writer.print(json); + writer.flush(); + } catch (IOException e) { + e.printStackTrace(); + }finally { + writer.close(); + } return false; } } \ No newline at end of file diff --git a/src/main/java/com/yzdx/AiInterviewer/config/WebMvcConfig.java b/src/main/java/com/yzdx/AiInterviewer/config/WebMvcConfig.java index db8e77c..7db2ac6 100644 --- a/src/main/java/com/yzdx/AiInterviewer/config/WebMvcConfig.java +++ b/src/main/java/com/yzdx/AiInterviewer/config/WebMvcConfig.java @@ -20,7 +20,7 @@ public class WebMvcConfig implements WebMvcConfigurer { .addPathPatterns("/**") // 需要放行的请求 .excludePathPatterns("/admin/login") - .excludePathPatterns("/vxUser/decodeUserInfo") + .excludePathPatterns("/vxUser/decodeUserInfo","/vx_interview/getCarouselChart","/vxJob/getSuggestList","/download_file") .excludePathPatterns("/vxUser/WxLogin") // 添加swagger-ui的放行路径 .excludePathPatterns("/swagger-resources/**", "/webjars/**", "/v2/**", "/swagger-ui.html/**","/doc.html/**") diff --git a/src/main/java/com/yzdx/AiInterviewer/controller/InterviewController.java b/src/main/java/com/yzdx/AiInterviewer/controller/InterviewController.java index f342858..644031b 100644 --- a/src/main/java/com/yzdx/AiInterviewer/controller/InterviewController.java +++ b/src/main/java/com/yzdx/AiInterviewer/controller/InterviewController.java @@ -5,9 +5,11 @@ import com.yzdx.AiInterviewer.entity.BackgroundEntity; import com.yzdx.AiInterviewer.entity.ImagesEntity; import com.yzdx.AiInterviewer.entity.InvitePromote; import com.yzdx.AiInterviewer.entity.LogoEntity; +import com.yzdx.AiInterviewer.entity.dto.InterviewRecordDto; import com.yzdx.AiInterviewer.entity.dto.InvitePromoteDto; import com.yzdx.AiInterviewer.mapper.InvitePromoteMapper; import com.yzdx.AiInterviewer.service.*; +import com.yzdx.AiInterviewer.service.VxService.VxInterviewRecordService; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; @@ -15,6 +17,9 @@ import io.swagger.annotations.ApiParam; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; + +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; import java.util.List; import java.util.Map; @@ -33,6 +38,10 @@ public class InterviewController { private InvitePromoteService invitePromoteService; @Autowired private InterviewNoticeService interviewNoticeService; + @Autowired + private VxInterviewRecordService vxInterviewRecordService; + @Autowired + private JobPostingService jobPostingService; /** * 获取公司logo @@ -253,14 +262,24 @@ public class InterviewController { @PostMapping("/sendInterviewNotice") public R sendInterviewNotice(@RequestBody Map addInfo){ String encoding=(String) addInfo.get("encoding"); - Integer recipient=(Integer) addInfo.get("recipient"); + Integer recipient=(Integer) addInfo.get("inviteUser"); Integer jobId=(Integer) addInfo.get("jobId"); Integer postId=(Integer) addInfo.get("postId"); - Integer inviteId=(Integer) addInfo.get("inviteId"); Integer userId=(Integer) addInfo.get("userId"); + String promote=(String) addInfo.get("promote"); + String selectQuestions=(String) addInfo.get("selectQuestions"); + Integer applicationId=(Integer)addInfo.get("applicationId"); + String endTime=(String)addInfo.get("endTime"); + + // 解析原始字符串为 LocalDateTime 对象 + LocalDateTime dateTime = LocalDateTime.parse(endTime, DateTimeFormatter.ISO_DATE_TIME); + + // 格式化 LocalDateTime 对象为所需的日期格式 + String dateString = dateTime.format(DateTimeFormatter.ISO_DATE); + Integer rows = interviewNoticeService.addInterviewNotice(encoding,recipient, - jobId, postId, inviteId, userId); + jobId, postId,userId,promote,selectQuestions,applicationId,dateString); if(rows==-2){ return R.error("您已经邀请过他面试啦"); } @@ -270,6 +289,48 @@ public class InterviewController { return R.success("邀请成功"); } + @GetMapping("/getInterviewRecordList") + public R getInterviewRecordList(Integer postId,Integer jobId,String encoding,Integer status){ + + List interviewRecordDtoList=vxInterviewRecordService.getInterviewRecords(postId,jobId,encoding,status); + + return R.success(interviewRecordDtoList); + + } + + @GetMapping("/getPostingInfoList") + public R getPostingInfoList(String encoding){ + + List> postingIfoList=jobPostingService.getPostingInfoList(encoding); + + if(postingIfoList==null){ + return R.error("暂未找到招聘岗位信息"); + } + + return R.success(postingIfoList); + + } + @PostMapping("/agreeUsersPassInterview") + public R agreeUsersPassInterview(@RequestBody Map updateInfo){ + + Integer jobId=(Integer)updateInfo.get("jobId"); + + Integer postId=(Integer)updateInfo.get("postId"); + + String userList=(String)updateInfo.get("userList"); + + Integer userId=(Integer)updateInfo.get("userId"); + + + Integer rows= vxInterviewRecordService.agreeUsersPassInterview(jobId,postId,userList,userId); + + return R.success("通过成功"); + + + + } + + } diff --git a/src/main/java/com/yzdx/AiInterviewer/controller/QuestionController.java b/src/main/java/com/yzdx/AiInterviewer/controller/QuestionController.java index 9750e02..846c6e9 100644 --- a/src/main/java/com/yzdx/AiInterviewer/controller/QuestionController.java +++ b/src/main/java/com/yzdx/AiInterviewer/controller/QuestionController.java @@ -226,11 +226,11 @@ public class QuestionController { String title=(String) addInfo.get("title"); Integer bankId=(Integer) addInfo.get("bankId"); String details=(String) addInfo.get("details"); - String promote=(String) addInfo.get("promote"); + String answer=(String) addInfo.get("answer"); String encoding=(String) addInfo.get("encoding"); Integer userId=(Integer) addInfo.get("userId"); - Integer rows = questionService.addQuestion(title, bankId, details, promote, encoding, userId); + Integer rows = questionService.addQuestion(title, bankId, details, answer, encoding, userId); if(rows==0){ return R.error("添加失败,请检查输入!"); @@ -260,11 +260,11 @@ public class QuestionController { String title=(String) updateInfo.get("title"); Integer bankId=(Integer) updateInfo.get("bankId"); String details=(String) updateInfo.get("details"); - String promote=(String) updateInfo.get("promote"); + String answer=(String) updateInfo.get("answer"); String encoding=(String) updateInfo.get("encoding"); Integer userId=(Integer) updateInfo.get("userId"); Integer id=(Integer) updateInfo.get("id"); - Integer rows = questionService.updateQuestion(id,title, bankId, details, promote, encoding, userId); + Integer rows = questionService.updateQuestion(id,title, bankId, details, answer, encoding, userId); if(rows==0){ return R.error("修改失败,请检查输入!"); @@ -489,7 +489,7 @@ public class QuestionController { @ApiImplicitParam(name = "id",required = true), @ApiImplicitParam(name = "title",required = true), @ApiImplicitParam(name = "details",required = true), - @ApiImplicitParam(name = "promote",required = true), + @ApiImplicitParam(name = "answer",required = true), @ApiImplicitParam(name = "bankId",required = true), @ApiImplicitParam(name = "userId",required = true), }) @@ -497,12 +497,12 @@ public class QuestionController { @ApiOperation(value = "更新我的分享题目",notes = "") public R updateOurSharedQuestion(@RequestBody Map updateInfo){ Integer userId=(Integer)updateInfo.get("userId"); - String promote=(String) updateInfo.get("promote"); + String answer=(String) updateInfo.get("answer"); Integer bankId=(Integer) updateInfo.get("bankId"); Integer id=(Integer) updateInfo.get("id"); String details=(String) updateInfo.get("details"); String title=(String) updateInfo.get("title"); - Integer rows=sharedQuestionService.updateOurSharedQuestion(id, title, details , promote, bankId , userId); + Integer rows=sharedQuestionService.updateOurSharedQuestion(id, title, details , answer, bankId , userId); if(rows==1){ return R.success("修改成功"); diff --git a/src/main/java/com/yzdx/AiInterviewer/controller/RecruitmentController.java b/src/main/java/com/yzdx/AiInterviewer/controller/RecruitmentController.java index 2f924fa..42a237e 100644 --- a/src/main/java/com/yzdx/AiInterviewer/controller/RecruitmentController.java +++ b/src/main/java/com/yzdx/AiInterviewer/controller/RecruitmentController.java @@ -4,6 +4,7 @@ import com.yzdx.AiInterviewer.comment.R; import com.yzdx.AiInterviewer.entity.Company; import com.yzdx.AiInterviewer.entity.JobEntity; import com.yzdx.AiInterviewer.entity.VxEntityDto.VxCompanyDetailDto; +import com.yzdx.AiInterviewer.entity.VxEntityDto.VxInterviewApplicationDto; import com.yzdx.AiInterviewer.entity.VxEntityDto.VxJobDetailDto; import com.yzdx.AiInterviewer.entity.dto.JobDto; import com.yzdx.AiInterviewer.entity.dto.JobPostingDto; @@ -226,13 +227,21 @@ public class RecruitmentController { Integer imagesId=(Integer) addInfo.get("imagesId"); Integer backgroundId=(Integer) addInfo.get("backgroundId"); Integer logoId=(Integer) addInfo.get("logoId"); - Integer userId=(Integer) addInfo.get("userId"); Integer Professional=(Integer) addInfo.get("Professional"); Integer Comprehensive=(Integer) addInfo.get("Comprehensive"); Integer Psychology=(Integer) addInfo.get("Psychology"); String jobPromote=(String) addInfo.get("jobPromote"); + if(Professional==0){ + Professional=null; + } + if(Comprehensive==0){ + Comprehensive=null; + } + if(Psychology==0){ + Psychology=null; + } Integer rows = interviewSettingService.addJobSetting(jobId, imagesId, backgroundId, logoId, Professional, Comprehensive, Psychology, userId, jobPromote, encoding); @@ -248,7 +257,14 @@ public class RecruitmentController { List jobSettingList = interviewSettingService.getJobSettingList(encoding); return R.success(jobSettingList); } - + + @GetMapping("/get_jobSettingByJobId") + @ApiOperation(value = "根据jobid获取面试设置",notes = "") + public R getJobSettingByJobId(@ApiParam("Integer jobId") Integer jobId){ + Map result = interviewSettingService.getJobSettingByJobId(jobId); + return R.success(result); + } + @GetMapping("/search_setting") @ApiOperation(value = "搜索面试设置",notes = "") public R searchJobSettings(@ApiParam("String jobName,String encoding")String jobName,String encoding){ @@ -292,11 +308,19 @@ public class RecruitmentController { Integer logoId=(Integer) updateInfo.get("logoId"); Integer id=(Integer)updateInfo.get("id"); Integer userId=(Integer) updateInfo.get("userId"); - Integer Professional=(Integer) updateInfo.get("Professional"); - Integer Comprehensive=(Integer) updateInfo.get("Comprehensive"); - Integer Psychology=(Integer) updateInfo.get("Psychology"); + Integer Professional=(Integer) updateInfo.get("professional"); + Integer Comprehensive=(Integer) updateInfo.get("comprehensive"); + Integer Psychology=(Integer) updateInfo.get("psychology"); String jobPromote=(String) updateInfo.get("jobPromote"); - + if(Professional==0){ + Professional=null; + } + if(Comprehensive==0){ + Comprehensive=null; + } + if(Psychology==0){ + Psychology=null; + } Integer rows= interviewSettingService.updateJobSetting(id,jobId, imagesId, backgroundId, logoId, Professional, Comprehensive, Psychology, userId, jobPromote, encoding); @@ -316,7 +340,7 @@ public class RecruitmentController { return R.error("获取失败"); } - VxCompanyDetailDto companyDetail = companyService.getCompanyDetail(encoding); + Company companyDetail = companyService.getCompanyDetail(encoding); if(companyDetail==null){ return R.error("获取失败"); } @@ -435,13 +459,33 @@ public class RecruitmentController { /** * 获取简历申请列表 - * @param companyEncoding + * @param encoding * @param jobId * @return */ @GetMapping("/getApplicationList") - public R getApplicationList(String companyEncoding,Integer jobId){ - List list=vxInterviewApplicationService.getApplicationList(companyEncoding,jobId); + public R getApplicationList(String encoding,Integer jobId){ + List list=vxInterviewApplicationService.getApplicationList(encoding,jobId); return R.success(list); } + + @GetMapping("/searchApplicationByName") + public R searchApplicationByName(String searchName,String encoding){ + List list =vxInterviewApplicationService.searchApplicationByName(searchName,encoding); + return R.success(list); + } + + @GetMapping("/disagreeApplication") + public R disagreeApplication(Integer id){ + + Integer rows=vxInterviewApplicationService.disagreeApplication(id); + + if(rows!=1){ + return R.error("出错了,请联系管理员"); + } + + return R.success("已拒绝"); + } + + } diff --git a/src/main/java/com/yzdx/AiInterviewer/controller/UploadController.java b/src/main/java/com/yzdx/AiInterviewer/controller/UploadController.java index 5ee0eeb..0e08d76 100644 --- a/src/main/java/com/yzdx/AiInterviewer/controller/UploadController.java +++ b/src/main/java/com/yzdx/AiInterviewer/controller/UploadController.java @@ -2,16 +2,19 @@ package com.yzdx.AiInterviewer.controller; import com.yzdx.AiInterviewer.comment.R; +import com.yzdx.AiInterviewer.utiles.FileDownloadUtil; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletRequest; -import java.io.File; -import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import java.io.*; +import java.net.URLEncoder; import java.util.*; @@ -20,10 +23,11 @@ import java.util.*; @Slf4j public class UploadController { + //设置上传文件的最大大小 - public static final int MAX_SIZE=10*1024*1024; + public static final int MAX_SIZE = 10 * 1024 * 1024; //设置文件的类型 - public static final List AVATAR_TYPE=new ArrayList<>(); + public static final List AVATAR_TYPE = new ArrayList<>(); static { AVATAR_TYPE.add("image/png"); @@ -33,34 +37,37 @@ public class UploadController { AVATAR_TYPE.add("image/jpeg"); } //http://aiinterviewersystem.kooldns.cn - private static final String BASE_URL="http://117.88.94.226:5380"; +// http://117.88.94.226:5380 + //http://101.43.255.47/8080 + + private static final String BASE_URL = "http://117.88.94.226:5380"; /** * 上传图片 + * * @param request */ - @ResponseBody @ApiImplicitParams({ - @ApiImplicitParam(name = "file",required = true), + @ApiImplicitParam(name = "file", required = true), }) @PostMapping("/upload_picture") - @ApiOperation(value = "上传图片",notes = "") + @ApiOperation(value = "上传图片", notes = "") - public R upLoadPicture(HttpServletRequest request, @RequestParam("file") MultipartFile file){ + public R upLoadPicture(HttpServletRequest request, @RequestParam("file") MultipartFile file) { //MultipartFile是spring提供的类,可以接收所有的文件的类 log.info(file.getContentType()); - if(file.isEmpty()){ + if (file.isEmpty()) { return R.error("请选择文件"); } - if (file.getSize() >MAX_SIZE){//file.getSize()获取接收文件的大小 + if (file.getSize() > MAX_SIZE) {//file.getSize()获取接收文件的大小 return R.error("文件大小超出最大限制"); } - if(!AVATAR_TYPE.contains(file.getContentType())){//自定义接收文件的类型 + if (!AVATAR_TYPE.contains(file.getContentType())) {//自定义接收文件的类型 return R.error("文件类型不匹配"); } @@ -71,9 +78,9 @@ public class UploadController { //指向名为‘upload’文件夹 - File dir= new File(uploadPath); + File dir = new File(uploadPath); - if(!dir.exists()){ + if (!dir.exists()) { dir.mkdirs();//若不存在,则创建该文件夹 } @@ -83,9 +90,9 @@ public class UploadController { String substring = originalFilename.substring(index);//返回文件类型名 例如:.jpg - String filename = UUID.randomUUID().toString().toUpperCase()+substring;//新创建的文件名 + String filename = UUID.randomUUID().toString().toUpperCase() + substring;//新创建的文件名 - File dest=new File(dir,filename);//创建一个空的文件 + File dest = new File(dir, filename);//创建一个空的文件 try { @@ -96,34 +103,35 @@ public class UploadController { return R.error("文件存储出现异常"); } - String RealFilePath=BASE_URL+"/upload/picture/"+filename; - Map data=new HashMap<>(); - data.put("image",RealFilePath); - data.put("filename",filename); + String RealFilePath = BASE_URL + "/upload/picture/" + filename; + Map data = new HashMap<>(); + data.put("image", RealFilePath); + data.put("filename", filename); return R.success(data);//返回图片存储在服务器的地址 } /** * 上传视频 + * * @param request * @param file * @return R */ @PostMapping("/upload_video") - @ApiOperation(value = "上传视频",notes = "") + @ApiOperation(value = "上传视频", notes = "") - public R upLoadVideo(HttpServletRequest request, @RequestParam("file") MultipartFile file ){ + public R upLoadVideo(HttpServletRequest request, @RequestParam("file") MultipartFile file) { //MultipartFile是spring提供的类,可以接收所有的文件的类 log.info(file.getContentType()); - if(file.isEmpty()){ + if (file.isEmpty()) { return R.error("请选择文件"); } - if (file.getSize() >MAX_SIZE){//file.getSize()获取接收文件的大小 + if (file.getSize() > MAX_SIZE) {//file.getSize()获取接收文件的大小 return R.error("文件大小超出最大限制"); } @@ -131,9 +139,9 @@ public class UploadController { String uploadPath = request.getSession().getServletContext().getRealPath("/upload/video/");//获取上传文件的路径(获取项目中名为‘upload’的文件夹) - File dir= new File(uploadPath);//指向名为‘upload’文件夹 + File dir = new File(uploadPath);//指向名为‘upload’文件夹 - if(!dir.exists()){ + if (!dir.exists()) { dir.mkdirs();//若不存在,则创建该文件夹 } @@ -143,9 +151,9 @@ public class UploadController { String substring = originalFilename.substring(index);//返回文件类型名 例如:.jpg - String filename = UUID.randomUUID().toString().toUpperCase()+substring;//新创建的文件名 + String filename = UUID.randomUUID().toString().toUpperCase() + substring;//新创建的文件名 - File dest=new File(dir,filename);//创建一个空的文件 + File dest = new File(dir, filename);//创建一个空的文件 try { @@ -157,32 +165,33 @@ public class UploadController { } - String RealFilePath=BASE_URL+"/upload/video/"+filename; - Map data=new HashMap<>(); - data.put("video",RealFilePath); - data.put("filename",filename); + String RealFilePath = BASE_URL + "/upload/video/" + filename; + Map data = new HashMap<>(); + data.put("video", RealFilePath); + data.put("filename", filename); return R.success(data);//返回图片存储在服务器的地址 } /** * 删除照片 + * * @param request * @param imagePath * @return R */ @DeleteMapping("/delete_picture") - @ApiOperation(value = "删除图片",notes = "") + @ApiOperation(value = "删除图片", notes = "") - public R deletePicture(@ApiParam("String imagePath") HttpServletRequest request, String imagePath){ - if(imagePath==null||imagePath.equals("")){ + public R deletePicture(@ApiParam("String imagePath") HttpServletRequest request, String imagePath) { + if (imagePath == null || imagePath.equals("")) { return R.error("删除失败!"); } String uploadPath = request.getSession().getServletContext().getRealPath("/upload/picture/"); try { File folder = new File(uploadPath); File[] files = folder.listFiles(); - for(File file:files){ - if(file.getName().equals(imagePath)){ + for (File file : files) { + if (file.getName().equals(imagePath)) { file.delete(); } } @@ -196,23 +205,24 @@ public class UploadController { /** * 删除视频 + * * @param request * @param videoPath * @return R */ @DeleteMapping("/delete_video") - @ApiOperation(value = "删除图片",notes = "") + @ApiOperation(value = "删除图片", notes = "") - public R deleteVideo(@ApiParam("String videoPath") HttpServletRequest request,String videoPath){ - if(videoPath==null||videoPath.equals("")){ + public R deleteVideo(@ApiParam("String videoPath") HttpServletRequest request, String videoPath) { + if (videoPath == null || videoPath.equals("")) { return R.error("删除失败!"); } String uploadPath = request.getSession().getServletContext().getRealPath("/upload/video/"); try { File folder = new File(uploadPath); File[] files = folder.listFiles(); - for(File file:files){ - if(file.getName().equals(videoPath)){ + for (File file : files) { + if (file.getName().equals(videoPath)) { file.delete(); } } @@ -226,28 +236,29 @@ public class UploadController { /** * 上传简历 + * * @param request * @param file * @return R */ - @ResponseBody - @PostMapping("/upload_resume") - @ApiOperation(value = "上传简历",notes = "") - public R uploadResume(HttpServletRequest request, @RequestParam("file") MultipartFile file){ - if(file.isEmpty()){ + @PostMapping("/upload_resume") + @ApiOperation(value = "上传简历", notes = "") + + public R uploadResume(HttpServletRequest request, @RequestParam("file") MultipartFile file) { + if (file.isEmpty()) { return R.error("请选择文件"); } - if (file.getSize() >50*1024*1024){//file.getSize()获取接收文件的大小 + if (file.getSize() > 50 * 1024 * 1024) {//file.getSize()获取接收文件的大小 return R.error("文件大小超出最大限制"); } String uploadPath = request.getSession().getServletContext().getRealPath("/upload/resume/"); - File dir= new File(uploadPath); + File dir = new File(uploadPath); - if(!dir.exists()){ + if (!dir.exists()) { dir.mkdirs();//若不存在,则创建该文件夹 } @@ -257,9 +268,9 @@ public class UploadController { String substring = originalFilename.substring(index);//返回文件类型名 例如:.jpg - String fileName = UUID.randomUUID().toString().toUpperCase()+substring;//新创建的文件名 + String fileName = UUID.randomUUID().toString().toUpperCase() + substring;//新创建的文件名 - File dest=new File(dir,fileName);//创建一个空的文件 + File dest = new File(dir, fileName);//创建一个空的文件 try { @@ -270,7 +281,7 @@ public class UploadController { return R.error("文件存储出现异常"); } - String RealFilePath=BASE_URL+"/upload/resume/"+fileName; + String RealFilePath = BASE_URL + "/upload/resume/" + fileName; // ExecutorService pool= Executors.newCachedThreadPool(); // pool.submit(new Runnable() { // @Override @@ -280,27 +291,26 @@ public class UploadController { // } // }); - Map data=new HashMap<>(); - data.put("resume",RealFilePath); - data.put("filename",fileName); + Map data = new HashMap<>(); + data.put("resume", RealFilePath); + data.put("filename", fileName); return R.success(data);//返回图片存储在服务器的地址 - - } /** * 删除简历 + * * @param request * @param resumePath * @return R */ @DeleteMapping("/delete_resume") - @ApiOperation(value = "删除简历",notes = "") + @ApiOperation(value = "删除简历", notes = "") - public R deleteResume(@ApiParam("String resumePath") HttpServletRequest request,String resumePath){ - if(resumePath==null||resumePath.equals("")){ + public R deleteResume(@ApiParam("String resumePath") HttpServletRequest request, String resumePath) { + if (resumePath == null || resumePath.equals("")) { return R.error("删除失败!"); } String uploadPath = request.getSession().getServletContext().getRealPath("/upload/resume/"); @@ -308,8 +318,8 @@ public class UploadController { try { File folder = new File(uploadPath); File[] files = folder.listFiles(); - for(File file:files){ - if(file.getName().equals(resumePath)){ + for (File file : files) { + if (file.getName().equals(resumePath)) { file.delete(); } } @@ -318,7 +328,121 @@ public class UploadController { return R.error("删除失败"); } } + + @PostMapping("/upload_file") + @ApiOperation(value = "上传文件", notes = "") + + public R uploadFile(HttpServletRequest request, @RequestParam("file") MultipartFile file) { + if (file.isEmpty()) { + return R.error("请选择文件"); + } + + if (file.getSize() > 50 * 1024 * 1024) {//file.getSize()获取接收文件的大小 + return R.error("文件大小超出最大限制"); + } + + String uploadPath = request.getSession().getServletContext().getRealPath("/upload/files/"); + + File dir = new File(uploadPath); + + if (!dir.exists()) { + dir.mkdirs();//若不存在,则创建该文件夹 + } + + String originalFilename = file.getOriginalFilename();//获取文件的真实文件名 + + int index = originalFilename.lastIndexOf(".");//获取文件的后缀名‘.’的位置 + + String substring = originalFilename.substring(index);//返回文件类型名 例如:.jpg + + String fileName = UUID.randomUUID().toString().toUpperCase() + substring;//新创建的文件名 + + File dest = new File(dir, fileName);//创建一个空的文件 + + try { + + file.transferTo(dest); + + } catch (IOException e) { + + return R.error("文件存储出现异常"); + + } + String RealFilePath = BASE_URL + "/upload/files/" + fileName; + + + Map data = new HashMap<>(); + data.put("resume", RealFilePath); + data.put("filename", fileName); + + return R.success(data);//返回文件存储在服务器的地址 + + } + + @GetMapping("/download_file") + @ApiOperation(value = "下载文件", notes = "") + + public R downLoadFile(HttpServletRequest request, String downloadFilename, HttpServletResponse response) { + String filePath = request.getSession().getServletContext().getRealPath("/upload/files/"); + String filePathName = filePath + File.separator + downloadFilename; + BufferedInputStream bins = null; + BufferedOutputStream bouts = null; + try { + //同一个窗口下载多次,清除空白流 + response.reset(); + File file = new File(filePathName); + if (!file.exists()) { + log.error("要下载的文件不存在:{}", filePathName); + return R.error("要下载的文件不存在:"+filePathName ); + } + bins = new BufferedInputStream(new FileInputStream(filePathName)); + bouts = new BufferedOutputStream(response.getOutputStream()); + String userAgent = request.getHeader("USER-AGENT").toLowerCase(); + // 如果是火狐浏览器 + if (userAgent.contains("firefox")) { + downloadFilename = new String(downloadFilename.getBytes(), "ISO8859-1"); + } else { + downloadFilename = URLEncoder.encode(downloadFilename, "UTF-8"); + } + //设置发送到客户端的响应的内容类型 + response.setContentType("application/download"); + //指定客户端下载的文件的名称 + response.setHeader("Content-disposition", "attachment;filename=" + downloadFilename); + int len; + byte[] bytes = new byte[1024]; + while ((len = bins.read(bytes)) != -1) { + bouts.write(bytes, 0, len); + } + //刷新流 + bouts.flush(); + log.info("下载完成"); + + } catch (IOException e) { + log.error("下载文件异常:{}", e.getMessage()); + e.printStackTrace(); + return R.error(e.getMessage()); + } finally { + try { + if (bouts != null) { + bouts.close(); + } + if (bins != null) { + bins.close(); + } + } catch (IOException e) { + log.error("关闭流异常", e); + e.printStackTrace(); + return R.error("关闭流异常"); + } + } + return R.success("下载完成"); + + } + + } -//-------------------------------------vxUpLoad----------------------- + + + diff --git a/src/main/java/com/yzdx/AiInterviewer/controller/UserController.java b/src/main/java/com/yzdx/AiInterviewer/controller/UserController.java index 36820b5..90e595b 100644 --- a/src/main/java/com/yzdx/AiInterviewer/controller/UserController.java +++ b/src/main/java/com/yzdx/AiInterviewer/controller/UserController.java @@ -149,8 +149,11 @@ public class UserController { return R.error("添加人的账号存在,请检查输入!"); } - if(rows==0){ + if(rows==-3){ + return R.error("您没有权限!"); + } + if(rows==0){ return R.error("添加失败,请联系管理员!"); } return R.success("添加管理员成功!"); @@ -261,4 +264,21 @@ public class UserController { return R.success(user); } } + @PostMapping("/adminEditPassword") + public R adminEditPassword(@RequestBody Map updateInfo){ + Integer userId= (Integer)updateInfo.get("userId"); + Integer updateUserId= (Integer)updateInfo.get("updateUserId"); + String password= (String)updateInfo.get("password"); + + Integer rows=userService.adminEditPassword(userId,updateUserId,password); + + if(rows==-2){ + return R.error("权限不足,请联系系统管理员进行修改"); + } + if(rows==-3){ + return R.error("权限不足,请联系公司管理员"); + } + return R.success("修改成功"); + + } } diff --git a/src/main/java/com/yzdx/AiInterviewer/controller/VxController/VxInterviewController.java b/src/main/java/com/yzdx/AiInterviewer/controller/VxController/VxInterviewController.java index b4c1366..8104255 100644 --- a/src/main/java/com/yzdx/AiInterviewer/controller/VxController/VxInterviewController.java +++ b/src/main/java/com/yzdx/AiInterviewer/controller/VxController/VxInterviewController.java @@ -11,6 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; +import java.util.Map; @RestController @RequestMapping("/vx_interview") @@ -59,5 +60,42 @@ public class VxInterviewController { List list=vxInterviewRecordService.searchInterviewRecordList(searchCompany,userId); return R.success(list); } + @PostMapping("/addInterviewRecord") + public R addInterviewRecord(@RequestBody Map addInfo){ + + String encoding=(String)addInfo.get("encoding"); + + String comments=(String) addInfo.get("comments"); + + Integer interviewer=(Integer) addInfo.get("interviewer"); + + Integer noticeId=(Integer) addInfo.get("noticeId"); + + Integer talentId=(Integer) addInfo.get("talentId") ; + + String detail=(String) addInfo.get("detail"); + + + + Integer rows=vxInterviewRecordService.addInterviewRecord(encoding,comments,interviewer,noticeId,talentId,detail); + + if(rows!=1){ + return R.error("出错啦"); + } + return R.success("面试成功"); + + } + @GetMapping("/getInterviewPromote") + public R getInterviewPromote(Integer noticeId){ + + String interviewPromote=interviewNoticeService.getInterviewPromote(noticeId); + + if(interviewPromote==null){ + return R.error("获取失败"); + } + + return R.success(interviewPromote); + + } } diff --git a/src/main/java/com/yzdx/AiInterviewer/controller/VxController/VxUserController.java b/src/main/java/com/yzdx/AiInterviewer/controller/VxController/VxUserController.java index 0703679..ef701a7 100644 --- a/src/main/java/com/yzdx/AiInterviewer/controller/VxController/VxUserController.java +++ b/src/main/java/com/yzdx/AiInterviewer/controller/VxController/VxUserController.java @@ -193,6 +193,10 @@ public R getResume(Integer userId){ Map result= resumeService.getResume(userId); + if(result==null){ + return R.error("未填写简历,请先填写简历"); + } + return R.success(result); } diff --git a/src/main/java/com/yzdx/AiInterviewer/entity/InterviewSetting.java b/src/main/java/com/yzdx/AiInterviewer/entity/InterviewSetting.java index d38a273..70356ee 100644 --- a/src/main/java/com/yzdx/AiInterviewer/entity/InterviewSetting.java +++ b/src/main/java/com/yzdx/AiInterviewer/entity/InterviewSetting.java @@ -26,12 +26,6 @@ public class InterviewSetting extends BaseEntity { private Integer professional; @ApiModelProperty("综合面试题库") private Integer comprehensive; - @ApiModelProperty("公司介绍promote") - private String companyPromote; - @ApiModelProperty("系统promote") - private String SystemPromote; - @ApiModelProperty("面试题目") - private String questions; @ApiModelProperty("心理测试题库") private Integer psychology; @ApiModelProperty("岗位promote") diff --git a/src/main/java/com/yzdx/AiInterviewer/entity/Question.java b/src/main/java/com/yzdx/AiInterviewer/entity/Question.java index 6aee622..ab52e69 100644 --- a/src/main/java/com/yzdx/AiInterviewer/entity/Question.java +++ b/src/main/java/com/yzdx/AiInterviewer/entity/Question.java @@ -18,8 +18,8 @@ public class Question extends BaseEntity { private String title; @ApiModelProperty("题目详情") private String details; - @ApiModelProperty("题目对应的promote") - private String promote; + @ApiModelProperty("题目的预设答案") + private String answer; @ApiModelProperty("题库id") private Integer bankId; @ApiModelProperty("公司编码") diff --git a/src/main/java/com/yzdx/AiInterviewer/entity/SharedQuestion.java b/src/main/java/com/yzdx/AiInterviewer/entity/SharedQuestion.java index d0404b2..2170f01 100644 --- a/src/main/java/com/yzdx/AiInterviewer/entity/SharedQuestion.java +++ b/src/main/java/com/yzdx/AiInterviewer/entity/SharedQuestion.java @@ -19,7 +19,7 @@ public class SharedQuestion extends BaseEntity { @ApiModelProperty("题目详情") private String details; @ApiModelProperty("题目对应的promote") - private String promote; + private String answer; @ApiModelProperty("题库id") private Integer bankId; @ApiModelProperty("创建公司编码") diff --git a/src/main/java/com/yzdx/AiInterviewer/entity/Talent.java b/src/main/java/com/yzdx/AiInterviewer/entity/Talent.java new file mode 100644 index 0000000..8095ea2 --- /dev/null +++ b/src/main/java/com/yzdx/AiInterviewer/entity/Talent.java @@ -0,0 +1,24 @@ +package com.yzdx.AiInterviewer.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +@Data +@TableName("tanlent_profile") +public class Talent extends BaseEntity{ + + @TableId(type = IdType.AUTO) + private Integer id; + + private Double execution; + + private Double internalDrive; + + private Double pressureResistance; + + private String matchRate; + + +} diff --git a/src/main/java/com/yzdx/AiInterviewer/entity/VxEntityDto/VxInterviewApplicationDto.java b/src/main/java/com/yzdx/AiInterviewer/entity/VxEntityDto/VxInterviewApplicationDto.java new file mode 100644 index 0000000..9fb1e5a --- /dev/null +++ b/src/main/java/com/yzdx/AiInterviewer/entity/VxEntityDto/VxInterviewApplicationDto.java @@ -0,0 +1,19 @@ +package com.yzdx.AiInterviewer.entity.VxEntityDto; + +import com.yzdx.AiInterviewer.entity.vxEntity.VxInterviewApplication; +import lombok.Data; + +import java.util.Map; + +@Data +public class VxInterviewApplicationDto extends VxInterviewApplication { + + private String userName; + + private Map resume; + + private String jobName; + + private String createTime; + +} diff --git a/src/main/java/com/yzdx/AiInterviewer/entity/VxEntityDto/VxInterviewRecordDto.java b/src/main/java/com/yzdx/AiInterviewer/entity/VxEntityDto/VxInterviewRecordDto.java index f716e6a..5398d3f 100644 --- a/src/main/java/com/yzdx/AiInterviewer/entity/VxEntityDto/VxInterviewRecordDto.java +++ b/src/main/java/com/yzdx/AiInterviewer/entity/VxEntityDto/VxInterviewRecordDto.java @@ -15,5 +15,8 @@ public class VxInterviewRecordDto extends VxInterviewRecord { private String interviewTime; @ApiModelProperty("岗位") private String job; + @ApiModelProperty("面试结束时间") + private String interviewEndTime; + } diff --git a/src/main/java/com/yzdx/AiInterviewer/entity/VxEntityDto/VxNoticeDto.java b/src/main/java/com/yzdx/AiInterviewer/entity/VxEntityDto/VxNoticeDto.java index 12d49b9..9375b55 100644 --- a/src/main/java/com/yzdx/AiInterviewer/entity/VxEntityDto/VxNoticeDto.java +++ b/src/main/java/com/yzdx/AiInterviewer/entity/VxEntityDto/VxNoticeDto.java @@ -18,4 +18,6 @@ public class VxNoticeDto extends VxInterviewNotice { private String job; + private String interviewEndTime; + } diff --git a/src/main/java/com/yzdx/AiInterviewer/entity/dto/InterviewRecordDto.java b/src/main/java/com/yzdx/AiInterviewer/entity/dto/InterviewRecordDto.java new file mode 100644 index 0000000..2098e87 --- /dev/null +++ b/src/main/java/com/yzdx/AiInterviewer/entity/dto/InterviewRecordDto.java @@ -0,0 +1,18 @@ +package com.yzdx.AiInterviewer.entity.dto; + +import com.yzdx.AiInterviewer.entity.User; +import com.yzdx.AiInterviewer.entity.vxEntity.VxInterviewRecord; +import lombok.Data; + +import java.util.Map; + +@Data +public class InterviewRecordDto extends VxInterviewRecord { + + private Map postInfo; + + private Map talentInfo; + + private User userInfo; + +} diff --git a/src/main/java/com/yzdx/AiInterviewer/entity/vxEntity/VxInterviewNotice.java b/src/main/java/com/yzdx/AiInterviewer/entity/vxEntity/VxInterviewNotice.java index 6d8ead4..b059098 100644 --- a/src/main/java/com/yzdx/AiInterviewer/entity/vxEntity/VxInterviewNotice.java +++ b/src/main/java/com/yzdx/AiInterviewer/entity/vxEntity/VxInterviewNotice.java @@ -29,4 +29,7 @@ public class VxInterviewNotice extends BaseEntity { private Integer postId; private Integer inviteId; + + @ApiModelProperty("面试结束时间") + private String interviewEndTime; } diff --git a/src/main/java/com/yzdx/AiInterviewer/entity/vxEntity/VxInterviewRecord.java b/src/main/java/com/yzdx/AiInterviewer/entity/vxEntity/VxInterviewRecord.java index b86a2b3..c9010c7 100644 --- a/src/main/java/com/yzdx/AiInterviewer/entity/vxEntity/VxInterviewRecord.java +++ b/src/main/java/com/yzdx/AiInterviewer/entity/vxEntity/VxInterviewRecord.java @@ -32,4 +32,9 @@ public class VxInterviewRecord { private Integer updateUser; @ApiModelProperty("面试通知id") private Integer noticeId; + @ApiModelProperty("面试详情") + private String detail; + @ApiModelProperty("人才画像id") + private Integer talentId; + } diff --git a/src/main/java/com/yzdx/AiInterviewer/mapper/TalentMapper.java b/src/main/java/com/yzdx/AiInterviewer/mapper/TalentMapper.java new file mode 100644 index 0000000..7c2c1f6 --- /dev/null +++ b/src/main/java/com/yzdx/AiInterviewer/mapper/TalentMapper.java @@ -0,0 +1,9 @@ +package com.yzdx.AiInterviewer.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.yzdx.AiInterviewer.entity.Talent; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface TalentMapper extends BaseMapper { +} diff --git a/src/main/java/com/yzdx/AiInterviewer/service/InterviewNoticeService.java b/src/main/java/com/yzdx/AiInterviewer/service/InterviewNoticeService.java index d801bce..d40b6eb 100644 --- a/src/main/java/com/yzdx/AiInterviewer/service/InterviewNoticeService.java +++ b/src/main/java/com/yzdx/AiInterviewer/service/InterviewNoticeService.java @@ -13,12 +13,12 @@ public interface InterviewNoticeService extends IService { * @param recipient 接收人id * @param jobId 面试的岗位id * @param postId 投递时的招聘id - * @param inviteId 面试设置的promoteId * @param userId 操作人的id + * @param endTime 结束时间 * @return 影响的行数 * * */ - Integer addInterviewNotice(String encoding,Integer recipient,Integer jobId,Integer postId,Integer inviteId,Integer userId); + Integer addInterviewNotice(String encoding,Integer recipient,Integer jobId,Integer postId,Integer userId,String promote,String selectQuestions,Integer applicationId,String endTime); /** @@ -28,4 +28,10 @@ public interface InterviewNoticeService extends IService { * */ List getInterviewNoticeByUserId(Integer userId); + /** + * 获取面试的promote + * @param noticeId 面试通知id + * @return promote + * */ + String getInterviewPromote(Integer noticeId); } diff --git a/src/main/java/com/yzdx/AiInterviewer/service/InterviewSettingService.java b/src/main/java/com/yzdx/AiInterviewer/service/InterviewSettingService.java index 58dfdb6..964681e 100644 --- a/src/main/java/com/yzdx/AiInterviewer/service/InterviewSettingService.java +++ b/src/main/java/com/yzdx/AiInterviewer/service/InterviewSettingService.java @@ -5,6 +5,7 @@ import com.yzdx.AiInterviewer.entity.InterviewSetting; import com.yzdx.AiInterviewer.entity.dto.JobSettingDto; import java.util.List; +import java.util.Map; public interface InterviewSettingService extends IService { @@ -83,4 +84,14 @@ public interface InterviewSettingService extends IService { Integer userId, String jobPromote, String encoding); + + /** + * 根据jobid获取面试信息 + * @param jobId 岗位id + * @return 面试设置信息 + * + * */ + + Map getJobSettingByJobId(Integer jobId); + } diff --git a/src/main/java/com/yzdx/AiInterviewer/service/JobPostingService.java b/src/main/java/com/yzdx/AiInterviewer/service/JobPostingService.java index 0f8e9f5..1d0d43c 100644 --- a/src/main/java/com/yzdx/AiInterviewer/service/JobPostingService.java +++ b/src/main/java/com/yzdx/AiInterviewer/service/JobPostingService.java @@ -6,6 +6,7 @@ import com.yzdx.AiInterviewer.entity.dto.JobPostingDto; import java.util.Date; import java.util.List; +import java.util.Map; public interface JobPostingService extends IService { @@ -51,4 +52,7 @@ public interface JobPostingService extends IService { * * */ List getJobPostingList(String encoding); + + List> getPostingInfoList(String encoding); + } diff --git a/src/main/java/com/yzdx/AiInterviewer/service/QuestionService.java b/src/main/java/com/yzdx/AiInterviewer/service/QuestionService.java index 1c55bb5..9777ef6 100644 --- a/src/main/java/com/yzdx/AiInterviewer/service/QuestionService.java +++ b/src/main/java/com/yzdx/AiInterviewer/service/QuestionService.java @@ -29,24 +29,24 @@ public interface QuestionService extends IService { * @param encoding 公司编码 * @param bankId 题库类型id * @param details 题目详情 - * @param promote 题目promote + * @param answer 题目的预设答案 * @param title 题目标题 * @param userId 用户id * @return 改变的行数 * */ - Integer addQuestion(String title,Integer bankId,String details,String promote,String encoding,Integer userId); + Integer addQuestion(String title,Integer bankId,String details,String answer,String encoding,Integer userId); /** * 修改题目 * @param id 题目ID * @param encoding 公司编码 * @param bankId 题库类型id * @param details 题目详情 - * @param promote 题目promote + * @param answer 题目预设答案 * @param title 题目标题 * @param userId 用户id * @return 改变的行数 * */ - Integer updateQuestion(Integer id,String title,Integer bankId,String details,String promote,String encoding,Integer userId); + Integer updateQuestion(Integer id,String title,Integer bankId,String details,String answer,String encoding,Integer userId); diff --git a/src/main/java/com/yzdx/AiInterviewer/service/SharedQuestionService.java b/src/main/java/com/yzdx/AiInterviewer/service/SharedQuestionService.java index 30dae20..de234d7 100644 --- a/src/main/java/com/yzdx/AiInterviewer/service/SharedQuestionService.java +++ b/src/main/java/com/yzdx/AiInterviewer/service/SharedQuestionService.java @@ -70,7 +70,7 @@ public interface SharedQuestionService extends IService { * @param id 分享题目ID * @param title 题目标题 * @param details 题目详情 - * @param promote 题目promote + * @param answer 题目预设答案 * @param bankId 分享题库ID * @param userId 修改人ID * @@ -78,7 +78,7 @@ public interface SharedQuestionService extends IService { Integer updateOurSharedQuestion(Integer id, String title, String details , - String promote, + String answer, Integer bankId , Integer userId ); diff --git a/src/main/java/com/yzdx/AiInterviewer/service/TalentService.java b/src/main/java/com/yzdx/AiInterviewer/service/TalentService.java new file mode 100644 index 0000000..162be27 --- /dev/null +++ b/src/main/java/com/yzdx/AiInterviewer/service/TalentService.java @@ -0,0 +1,7 @@ +package com.yzdx.AiInterviewer.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.yzdx.AiInterviewer.entity.Talent; + +public interface TalentService extends IService { +} diff --git a/src/main/java/com/yzdx/AiInterviewer/service/UserService.java b/src/main/java/com/yzdx/AiInterviewer/service/UserService.java index 3a23f08..3caa645 100644 --- a/src/main/java/com/yzdx/AiInterviewer/service/UserService.java +++ b/src/main/java/com/yzdx/AiInterviewer/service/UserService.java @@ -100,6 +100,13 @@ public interface UserService extends IService { R vxLogin(String phone); + /** + * 管理员修改属下密码 + * @param userId 操作人id + * @param password 修改的密码 + * @param updateUserId 被更新人的id + * */ + Integer adminEditPassword(Integer userId, Integer updateUserId, String password); } diff --git a/src/main/java/com/yzdx/AiInterviewer/service/VxService/InterviewNoticeService.java b/src/main/java/com/yzdx/AiInterviewer/service/VxService/InterviewNoticeService.java deleted file mode 100644 index 974a342..0000000 --- a/src/main/java/com/yzdx/AiInterviewer/service/VxService/InterviewNoticeService.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.yzdx.AiInterviewer.service.VxService; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.yzdx.AiInterviewer.entity.vxEntity.VxFeedBack; -import com.yzdx.AiInterviewer.entity.vxEntity.VxInterviewNotice; - -public interface InterviewNoticeService extends IService { -} diff --git a/src/main/java/com/yzdx/AiInterviewer/service/VxService/VxInterviewApplicationService.java b/src/main/java/com/yzdx/AiInterviewer/service/VxService/VxInterviewApplicationService.java index 2edf3c7..86fdb63 100644 --- a/src/main/java/com/yzdx/AiInterviewer/service/VxService/VxInterviewApplicationService.java +++ b/src/main/java/com/yzdx/AiInterviewer/service/VxService/VxInterviewApplicationService.java @@ -1,6 +1,7 @@ package com.yzdx.AiInterviewer.service.VxService; import com.baomidou.mybatisplus.extension.service.IService; +import com.yzdx.AiInterviewer.entity.VxEntityDto.VxInterviewApplicationDto; import com.yzdx.AiInterviewer.entity.vxEntity.VxInterviewApplication; import java.util.List; @@ -17,15 +18,28 @@ public interface VxInterviewApplicationService extends IService getApplicationList(String companyEncoding, Integer jobId); - /** * Hr端获取面试申请 - * + * @param jobId 岗位id + * @param companyEncoding 公司编码 + * @return List + * */ + List getApplicationList(String companyEncoding, Integer jobId); + + /** + * 拒绝面试申请 + * @param id 申请表id + * @return 影响的行数 + * */ + Integer disagreeApplication(Integer id); + + /** + * @param searchName 搜索人的名称 + * @param encoding 所搜人投递的公司编码 + * @return List * * */ - - + List searchApplicationByName(String searchName, String encoding); } diff --git a/src/main/java/com/yzdx/AiInterviewer/service/VxService/VxInterviewRecordService.java b/src/main/java/com/yzdx/AiInterviewer/service/VxService/VxInterviewRecordService.java index f384f4a..44d1dff 100644 --- a/src/main/java/com/yzdx/AiInterviewer/service/VxService/VxInterviewRecordService.java +++ b/src/main/java/com/yzdx/AiInterviewer/service/VxService/VxInterviewRecordService.java @@ -2,13 +2,52 @@ package com.yzdx.AiInterviewer.service.VxService; import com.baomidou.mybatisplus.extension.service.IService; import com.yzdx.AiInterviewer.entity.VxEntityDto.VxInterviewRecordDto; +import com.yzdx.AiInterviewer.entity.dto.InterviewRecordDto; import com.yzdx.AiInterviewer.entity.vxEntity.VxInterviewRecord; import java.util.List; +import java.util.Map; public interface VxInterviewRecordService extends IService { + List getInterviewRecordList(Integer userId); + List searchInterviewRecordList(String searchCompany,Integer userId); + + /** + * 添加面试巨鹿 + * @param encoding 公司编码 + * @param interviewer 面试者id + * @param comments 面试评语 + * @param noticeId 面试通知id + * @param detail 面试详情 + * @param talentId 人才画像id + * @return 影响的行数 + * + * */ + + Integer addInterviewRecord(String encoding, String comments, Integer interviewer, Integer noticeId,Integer talentId,String detail); + + /** + * 后台网页或取 + * @param jobId 岗位id + * @param encoding 公司编码 + * @param postId 招聘ID + * @return List + * + * */ + + List getInterviewRecords(Integer postId, Integer jobId, String encoding,Integer status); + + /** + * 通过面试 + * @param postId 招聘Id + * @param jobId 岗位id + * @param userList 通过人的id + * @return 影线的行数 + * + * */ + Integer agreeUsersPassInterview(Integer jobId, Integer postId, String userList,Integer userId); } diff --git a/src/main/java/com/yzdx/AiInterviewer/service/VxService/impl/VxInterviewApplicationServiceImpl.java b/src/main/java/com/yzdx/AiInterviewer/service/VxService/impl/VxInterviewApplicationServiceImpl.java index dd19229..2b06b08 100644 --- a/src/main/java/com/yzdx/AiInterviewer/service/VxService/impl/VxInterviewApplicationServiceImpl.java +++ b/src/main/java/com/yzdx/AiInterviewer/service/VxService/impl/VxInterviewApplicationServiceImpl.java @@ -1,17 +1,29 @@ package com.yzdx.AiInterviewer.service.VxService.impl; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.yzdx.AiInterviewer.entity.BaseEntity; +import com.yzdx.AiInterviewer.entity.JobEntity; import com.yzdx.AiInterviewer.entity.Resume; +import com.yzdx.AiInterviewer.entity.User; +import com.yzdx.AiInterviewer.entity.VxEntityDto.VxInterviewApplicationDto; import com.yzdx.AiInterviewer.entity.vxEntity.VxInterviewApplication; +import com.yzdx.AiInterviewer.mapper.JobMapper; import com.yzdx.AiInterviewer.mapper.ResumeMapper; +import com.yzdx.AiInterviewer.mapper.UserMapper; import com.yzdx.AiInterviewer.mapper.VxMapper.VxInterviewApplicationMapper; import com.yzdx.AiInterviewer.service.VxService.VxInterviewApplicationService; import com.yzdx.AiInterviewer.utiles.TimeUtil; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.List; +import java.time.LocalDate; +import java.time.Period; +import java.util.*; +import java.util.stream.Collectors; @Service public class VxInterviewApplicationServiceImpl extends ServiceImpl implements VxInterviewApplicationService { @@ -19,14 +31,20 @@ public class VxInterviewApplicationServiceImpl extends ServiceImpl queryWrapper=new LambdaQueryWrapper<>(); - queryWrapper.eq(VxInterviewApplication::getJobId,jobId).eq(VxInterviewApplication::getPostingId,postingId); + queryWrapper.eq(VxInterviewApplication::getJobId,jobId).eq(VxInterviewApplication::getPostingId,postingId) + .eq(VxInterviewApplication::getUserId,userId).eq(BaseEntity::getCreateTime,TimeUtil.getTime()); VxInterviewApplication vxInterviewApplication = vxInterviewApplicationMapper.selectOne(queryWrapper); if(vxInterviewApplication!=null){ - return -2; + vxInterviewApplication.setCreateTime(TimeUtil.getTime()); + vxInterviewApplicationMapper.updateById(vxInterviewApplication); } VxInterviewApplication vxInterviewApplication1=new VxInterviewApplication(); vxInterviewApplication1.setJobId(jobId); @@ -48,10 +66,285 @@ public class VxInterviewApplicationServiceImpl extends ServiceImpl getApplicationList(String companyEncoding, Integer jobId) { + public List getApplicationList(String companyEncoding, Integer jobId) { + LambdaQueryWrapper queryWrapper=new LambdaQueryWrapper<>(); + queryWrapper.eq(VxInterviewApplication::getCompanyEncoding,companyEncoding).eq(VxInterviewApplication::getJobId,jobId); - List list = vxInterviewApplicationMapper.selectList(queryWrapper); - return list; + + List VxInterviewApplicationList = vxInterviewApplicationMapper.selectList(queryWrapper); + + ListVxInterviewApplicationDtoList =VxInterviewApplicationList.stream().map(item->{ + + VxInterviewApplicationDto newVxInterviewApplicationDto=new VxInterviewApplicationDto(); + + BeanUtils.copyProperties(item,newVxInterviewApplicationDto); + + JobEntity jobEntity = jobMapper.selectById(item.getJobId()); + + newVxInterviewApplicationDto.setJobName(jobEntity.getJobName()); + + User user = userMapper.selectById(item.getUserId()); + + newVxInterviewApplicationDto.setUserName(user.getUsername()); + + Resume resume = resumeMapper.selectById(item.getResumeId()); + + //解析在校经历,计算出学历 + + JSONArray educationJSONArray= JSON.parseArray(resume.getEducationBackground()); + + long difference =0; + + String eduBack=""; + + String school=""; + + String major=""; + for (int i = 0; i < educationJSONArray.size(); i++) { + + Map educationMap= (Map)educationJSONArray.get(i); + + String lastEndTime= (String)educationMap.get("endTime"); + + // 将字符串转换为日期对象 + Date date = new Date(Integer.valueOf(lastEndTime) - 1900, 0, 1); // 注意:年份需减去1900 + + // 获取日期对象的时间戳(毫秒数) + + long timestamp = date.getTime(); + + // 获取当前时间的时间戳 + long currentTimestamp = System.currentTimeMillis(); + + // 计算时间戳差值 + long differenceTime = currentTimestamp - timestamp; + + //初始化值 + if(i==0){ + difference=differenceTime; + eduBack=(String)educationMap.get("eduDegree"); + school=(String)educationMap.get("school"); + major=(String)educationMap.get("major"); + + continue; + } + //判断最近的毕业年份 + if(differenceTime result=new HashMap<>(); + + if(rows!=1){ + return null; + } + int experience=0; + //计算工作时间 + JSONArray jobJSONArray=JSON.parseArray(resume.getWorkExperience()); + + if(jobJSONArray.size()==0) { + //放入工作时间 + result.put("experience", experience); + }else{ + for (int i = 0; i < jobJSONArray.size(); i++) { + + Map jobJSON=(Map) jobJSONArray.get(i); + + // 将字符串日期转换为LocalDate对象 + LocalDate startDate = LocalDate.parse(jobJSON.get("startTime")+ "-01"); + LocalDate endDate = LocalDate.parse(jobJSON.get("endTime") + "-01"); + + // 计算年份差异 + Period period = Period.between(startDate, endDate); + int yearDifference = period.getYears(); + experience+=yearDifference; + } + //放入工作时间 + result.put("experience", experience); + } + result.put("userName",resume.getName()); + result.put("userImgUrl",resume.getAvatar()); + result.put("eduBack",eduBack); + result.put("gender",resume.getSex()); + result.put("school",school); + result.put("major",major); + result.put("phone",resume.getPhone()); + result.put("resume",resume); + + newVxInterviewApplicationDto.setResume(result); + + newVxInterviewApplicationDto.setCreateTime(item.getCreateTime()); + + return newVxInterviewApplicationDto; + + }).collect(Collectors.toList()); + + return VxInterviewApplicationDtoList; + } + + @Override + public Integer disagreeApplication(Integer id) { + VxInterviewApplication vxInterviewApplication = vxInterviewApplicationMapper.selectById(id); + + vxInterviewApplication.setStatus(3); + + return vxInterviewApplicationMapper.updateById(vxInterviewApplication); + + } + + @Override + public List searchApplicationByName(String searchName, String encoding) { + + LambdaQueryWrapper queryWrapper=new LambdaQueryWrapper<>(); + + queryWrapper.like(User::getUsername,searchName); + + List users = userMapper.selectList(queryWrapper); + + List vxInterviewApplicationList=new ArrayList<>(); + + + + for (User user:users) { + LambdaQueryWrapper queryWrapper1=new LambdaQueryWrapper<>(); + + queryWrapper1.eq(VxInterviewApplication::getCompanyEncoding,encoding).eq(VxInterviewApplication::getUserId,user.getId()); + + List vxInterviewApplications = vxInterviewApplicationMapper.selectList(queryWrapper1); + + vxInterviewApplicationList.addAll(vxInterviewApplications); + } + + ListVxInterviewApplicationDtoList =vxInterviewApplicationList.stream().map(item->{ + + VxInterviewApplicationDto newVxInterviewApplicationDto=new VxInterviewApplicationDto(); + + BeanUtils.copyProperties(item,newVxInterviewApplicationDto); + + JobEntity jobEntity = jobMapper.selectById(item.getJobId()); + + newVxInterviewApplicationDto.setJobName(jobEntity.getJobName()); + + User user = userMapper.selectById(item.getUserId()); + + newVxInterviewApplicationDto.setUserName(user.getUsername()); + + Resume resume = resumeMapper.selectById(item.getResumeId()); + + //解析在校经历,计算出学历 + + JSONArray educationJSONArray= JSON.parseArray(resume.getEducationBackground()); + + long difference =0; + + String eduBack=""; + + String school=""; + + String major=""; + for (int i = 0; i < educationJSONArray.size(); i++) { + + Map educationMap= (Map)educationJSONArray.get(i); + + String lastEndTime= (String)educationMap.get("endTime"); + + // 将字符串转换为日期对象 + Date date = new Date(Integer.valueOf(lastEndTime) - 1900, 0, 1); // 注意:年份需减去1900 + + // 获取日期对象的时间戳(毫秒数) + + long timestamp = date.getTime(); + + // 获取当前时间的时间戳 + long currentTimestamp = System.currentTimeMillis(); + + // 计算时间戳差值 + long differenceTime = currentTimestamp - timestamp; + + //初始化值 + if(i==0){ + difference=differenceTime; + eduBack=(String)educationMap.get("eduDegree"); + school=(String)educationMap.get("school"); + major=(String)educationMap.get("major"); + + continue; + } + //判断最近的毕业年份 + if(differenceTime result=new HashMap<>(); + + if(rows!=1){ + return null; + } + int experience=0; + //计算工作时间 + JSONArray jobJSONArray=JSON.parseArray(resume.getWorkExperience()); + + if(jobJSONArray.size()==0) { + //放入工作时间 + result.put("experience", experience); + }else{ + for (int i = 0; i < jobJSONArray.size(); i++) { + + Map jobJSON=(Map) jobJSONArray.get(i); + + // 将字符串日期转换为LocalDate对象 + LocalDate startDate = LocalDate.parse(jobJSON.get("startTime")+ "-01"); + LocalDate endDate = LocalDate.parse(jobJSON.get("endTime") + "-01"); + + // 计算年份差异 + Period period = Period.between(startDate, endDate); + int yearDifference = period.getYears(); + experience+=yearDifference; + } + //放入工作时间 + result.put("experience", experience); + } + result.put("userName",resume.getName()); + result.put("userImgUrl",resume.getAvatar()); + result.put("eduBack",eduBack); + result.put("gender",resume.getSex()); + result.put("school",school); + result.put("major",major); + result.put("phone",resume.getPhone()); + result.put("resume",resume); + + newVxInterviewApplicationDto.setResume(result); + + return newVxInterviewApplicationDto; + + }).collect(Collectors.toList()); + + return VxInterviewApplicationDtoList; + + + } } diff --git a/src/main/java/com/yzdx/AiInterviewer/service/VxService/impl/VxInterviewNoticeImpl.java b/src/main/java/com/yzdx/AiInterviewer/service/VxService/impl/VxInterviewNoticeImpl.java deleted file mode 100644 index 0a93225..0000000 --- a/src/main/java/com/yzdx/AiInterviewer/service/VxService/impl/VxInterviewNoticeImpl.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.yzdx.AiInterviewer.service.VxService.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.yzdx.AiInterviewer.entity.vxEntity.VxInterviewNotice; -import com.yzdx.AiInterviewer.mapper.VxMapper.VxInterviewNoticeMapper; -import com.yzdx.AiInterviewer.service.VxService.InterviewNoticeService; -import org.springframework.stereotype.Service; - -@Service -public class VxInterviewNoticeImpl extends ServiceImpl implements InterviewNoticeService { -} diff --git a/src/main/java/com/yzdx/AiInterviewer/service/VxService/impl/VxInterviewRecordServiceImpl.java b/src/main/java/com/yzdx/AiInterviewer/service/VxService/impl/VxInterviewRecordServiceImpl.java index ad4bea1..32cd4ed 100644 --- a/src/main/java/com/yzdx/AiInterviewer/service/VxService/impl/VxInterviewRecordServiceImpl.java +++ b/src/main/java/com/yzdx/AiInterviewer/service/VxService/impl/VxInterviewRecordServiceImpl.java @@ -1,24 +1,29 @@ package com.yzdx.AiInterviewer.service.VxService.impl; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.yzdx.AiInterviewer.entity.Company; -import com.yzdx.AiInterviewer.entity.JobEntity; +import com.yzdx.AiInterviewer.entity.*; import com.yzdx.AiInterviewer.entity.VxEntityDto.VxInterviewRecordDto; +import com.yzdx.AiInterviewer.entity.dto.InterviewRecordDto; import com.yzdx.AiInterviewer.entity.vxEntity.VxInterviewNotice; import com.yzdx.AiInterviewer.entity.vxEntity.VxInterviewRecord; -import com.yzdx.AiInterviewer.mapper.CompanyMapper; -import com.yzdx.AiInterviewer.mapper.JobMapper; +import com.yzdx.AiInterviewer.mapper.*; import com.yzdx.AiInterviewer.mapper.VxMapper.VxInterviewNoticeMapper; import com.yzdx.AiInterviewer.mapper.VxMapper.VxInterviewRecordMapper; import com.yzdx.AiInterviewer.service.CompanyService; import com.yzdx.AiInterviewer.service.VxService.VxInterviewRecordService; +import com.yzdx.AiInterviewer.utiles.EmailUtil; +import com.yzdx.AiInterviewer.utiles.TimeUtil; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.stream.Collectors; @Service public class VxInterviewRecordServiceImpl extends ServiceImpl implements VxInterviewRecordService { @@ -34,6 +39,14 @@ public class VxInterviewRecordServiceImpl extends ServiceImpl getInterviewRecordList(Integer userId) { LambdaQueryWrapper queryWrapper=new LambdaQueryWrapper<>(); @@ -58,6 +71,7 @@ public class VxInterviewRecordServiceImpl extends ServiceImpl queryWrapper=new LambdaQueryWrapper<>(); + + queryWrapper.eq(VxInterviewRecord::getInterviewer,interviewer).eq(VxInterviewRecord::getNoticeId,noticeId); + + VxInterviewRecord vxInterviewRecord = vxInterviewRecordMapper.selectOne(queryWrapper); + + if(vxInterviewRecord!=null){ + return -1; + } + VxInterviewRecord vxInterviewRecord1=new VxInterviewRecord(); + + vxInterviewRecord1.setCompanyEncoding(encoding); + + vxInterviewRecord1.setComments(comments); + + vxInterviewRecord1.setInterviewer(interviewer); + + vxInterviewRecord1.setNoticeId(noticeId); + + vxInterviewRecord1.setCreateUser(interviewer); + + vxInterviewRecord1.setCreateTime(TimeUtil.getTime()); + + vxInterviewRecord1.setDetail(detail); + + + return vxInterviewRecordMapper.insert(vxInterviewRecord1); + + } + + @Override + public List getInterviewRecords(Integer postId, Integer jobId, String encoding,Integer status) { + + + LambdaQueryWrapper queryWrapper=new LambdaQueryWrapper<>(); + + queryWrapper.eq(VxInterviewRecord::getCompanyEncoding,encoding).eq(VxInterviewRecord::getStatus,status); + + List vxInterviewRecords = vxInterviewRecordMapper.selectList(queryWrapper); + + vxInterviewRecords= vxInterviewRecords.stream().map(item->{ + + VxInterviewNotice vxInterviewNotice = vxInterviewNoticeMapper.selectById(item.getNoticeId()); + + if(vxInterviewNotice.getJobId()==jobId&&vxInterviewNotice.getPostId()==postId){ + return item; + } + + + return null; + + }).collect(Collectors.toList()); + + if(vxInterviewRecords.size()==0){ + return null; + } + List interviewRecordDtoList=vxInterviewRecords.stream().map(item->{ + + InterviewRecordDto interviewRecordDto=new InterviewRecordDto(); + + BeanUtils.copyProperties(item,interviewRecordDto); + + Map postInfo=new HashMap<>(); + + VxInterviewRecord vxInterviewRecord = vxInterviewRecordMapper.selectById(item.getId()); + + VxInterviewNotice vxInterviewNotice = vxInterviewNoticeMapper.selectById(vxInterviewRecord.getNoticeId()); + + postInfo.put("postId",vxInterviewNotice.getPostId()); + + postInfo.put("jobId",vxInterviewNotice.getJobId()); + + interviewRecordDto.setPostInfo(postInfo); + + Map talentInfo=new HashMap<>(); + + Talent talent = talentMapper.selectById(item.getTalentId()); + + talentInfo.put("talentInfo",talent); + + interviewRecordDto.setPostInfo(talentInfo); + + User userInfo=userMapper.selectById(item.getInterviewer()); + + userInfo.setPassword(null); + + userInfo.setSalt(null); + + interviewRecordDto.setUserInfo(userInfo); + + return interviewRecordDto; + + }).collect(Collectors.toList()); + + return interviewRecordDtoList; + + + + } + + @Override + public Integer agreeUsersPassInterview(Integer jobId, Integer postId, String userList,Integer Id) { + JSONArray userIDS=JSON.parseArray(userList); + + for (int i = 0; i queryWrapper=new LambdaQueryWrapper<>(); + + queryWrapper.eq(VxInterviewNotice::getJobId,jobId).eq(VxInterviewNotice::getPostId,postId) + .eq(VxInterviewNotice::getRecipient,userId); + + VxInterviewNotice vxInterviewNotice = vxInterviewNoticeMapper.selectOne(queryWrapper); + + LambdaQueryWrapper queryWrapper1=new LambdaQueryWrapper<>(); + + queryWrapper1.eq(VxInterviewRecord::getInterviewer,userId).eq(VxInterviewRecord::getNoticeId,vxInterviewNotice.getId()); + + VxInterviewRecord vxInterviewRecord = vxInterviewRecordMapper.selectOne(queryWrapper1); + + vxInterviewRecord.setStatus(2); + + vxInterviewRecord.setUpdateUser(Id); + + vxInterviewRecord.setUpdateTime(TimeUtil.getTime()); + + User user = userMapper.selectById(vxInterviewRecord.getInterviewer()); + + LambdaQueryWrapper queryWrapper2=new LambdaQueryWrapper<>(); + + queryWrapper2.eq(Company::getEncoding,vxInterviewRecord.getCompanyEncoding()); + + Company company = companyMapper.selectOne(queryWrapper2); + + try { +// "

"+userName+"先生,你好!

您已获得本公司"+"["+jobName+"]AI面试资格,请打开微信小程序,点击面试通知查看详情" + //"扬城直聘:"+companyName + String detail= "

"+user.getUsername()+(user.getSex().equals("男")?"先生":"女士")+"你好!

感谢您参加我们的面试,我们很高兴地通知您,您已经通过了面试,成为我们团队的一员。\n" + + "\n" + + "您在面试中展示了出色的专业技能和沟通能力,我们对您的表现印象深刻。我们相信您能够为我们的项目做出重要的贡献,并与我们的同事们建立良好的合作关系。\n" + + "\n" + + "您的入职日期是2024年1月1日,您的工作地点是江苏省扬州市邗江区扬子江中路760号。您的岗位是java开发工程师,您的月薪是10000元。您的直属上司是李经理,他将在您入职后为您安排工作和培训。\n" + + "\n" + + "请在收到本邮件后,尽快回复确认您是否接受我们的录用,并告知您的联系方式。如果您有任何问题或疑虑,请随时与我们联系。\n" + + "\n" + + "我们期待着您的加入,祝您一切顺利!\n"; + String title="扬城直聘:"+company.getCompanyName(); + EmailUtil.sendEmail(user.getEmail(),title,detail); + } catch (Exception e) { + e.printStackTrace(); + return -3; + } + + vxInterviewRecordMapper.updateById(vxInterviewRecord); + + } + return 1; + } } diff --git a/src/main/java/com/yzdx/AiInterviewer/service/impl/InterviewNoticeServiceImpl.java b/src/main/java/com/yzdx/AiInterviewer/service/impl/InterviewNoticeServiceImpl.java index 04d3b22..c1a20bc 100644 --- a/src/main/java/com/yzdx/AiInterviewer/service/impl/InterviewNoticeServiceImpl.java +++ b/src/main/java/com/yzdx/AiInterviewer/service/impl/InterviewNoticeServiceImpl.java @@ -3,12 +3,16 @@ package com.yzdx.AiInterviewer.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.yzdx.AiInterviewer.entity.Company; +import com.yzdx.AiInterviewer.entity.InvitePromote; import com.yzdx.AiInterviewer.entity.JobEntity; import com.yzdx.AiInterviewer.entity.User; import com.yzdx.AiInterviewer.entity.VxEntityDto.VxNoticeDto; +import com.yzdx.AiInterviewer.entity.vxEntity.VxInterviewApplication; import com.yzdx.AiInterviewer.entity.vxEntity.VxInterviewNotice; +import com.yzdx.AiInterviewer.mapper.InvitePromoteMapper; import com.yzdx.AiInterviewer.mapper.JobMapper; import com.yzdx.AiInterviewer.mapper.UserMapper; +import com.yzdx.AiInterviewer.mapper.VxMapper.VxInterviewApplicationMapper; import com.yzdx.AiInterviewer.mapper.VxMapper.VxInterviewNoticeMapper; import com.yzdx.AiInterviewer.service.CompanyService; import com.yzdx.AiInterviewer.service.InterviewNoticeService; @@ -33,15 +37,19 @@ public class InterviewNoticeServiceImpl extends ServiceImpl queryWrapper=new LambdaQueryWrapper<>(); queryWrapper.eq(VxInterviewNotice::getCompanyEncoding,encoding).eq(VxInterviewNotice::getJobId,jobId) - .eq(VxInterviewNotice::getPostId,postId).eq(VxInterviewNotice::getInviteId,inviteId); + .eq(VxInterviewNotice::getPostId,postId); VxInterviewNotice vxInterviewNotice = vxInterviewNoticeMapper.selectOne(queryWrapper); @@ -58,9 +66,68 @@ public class InterviewNoticeServiceImpl extends ServiceImpl queryWrapper1=new LambdaQueryWrapper<>(); + + queryWrapper1.eq(InvitePromote::getJobId,jobId).eq(InvitePromote::getPostId,postId).eq(InvitePromote::getInviteUser,recipient); + + InvitePromote invitePromote1 = invitePromoteMapper.selectOne(queryWrapper1); + + if(invitePromote1==null){ + //添加promote表 + InvitePromote invitePromote=new InvitePromote(); + + invitePromote.setEncoding(encoding); + + invitePromote.setJobId(jobId); + + invitePromote.setPostId(postId); + + invitePromote.setQuestion(selectQuestions); + + invitePromote.setPromote(promote); + + invitePromote.setInviteUser(recipient); + + invitePromote.setCreateUser(userId); + + invitePromote.setCreateTime(TimeUtil.getTime()); + + invitePromoteMapper.insert(invitePromote); + + LambdaQueryWrapper queryWrapper2=new LambdaQueryWrapper<>(); + + queryWrapper2.eq(InvitePromote::getJobId,jobId).eq(InvitePromote::getPostId,postId).eq(InvitePromote::getInviteUser,recipient); + + invitePromote1=invitePromoteMapper.selectOne(queryWrapper2); + + }else{ + invitePromote1.setEncoding(encoding); + + invitePromote1.setJobId(jobId); + + invitePromote1.setPostId(postId); + + invitePromote1.setQuestion(selectQuestions); + + invitePromote1.setPromote(promote); + + invitePromote1.setInviteUser(recipient); + + invitePromote1.setUpdateUser(userId); + + invitePromote1.setUpdateTime(TimeUtil.getTime()); + + invitePromoteMapper.updateById(invitePromote1); + + } + + + newVxInterviewNotice.setInviteId(invitePromote1.getId()); newVxInterviewNotice.setCreateTime(TimeUtil.getTime()); @@ -90,21 +157,32 @@ public class InterviewNoticeServiceImpl extends ServiceImpl"+userName+"先生,你好! 您已获得本公司"+"["+jobName+"]AI面试资格,请打开微信小程序,点击面试通知查看详情" + //"扬城直聘:"+companyName + String detail= "

"+userName+(user.getSex().equals("男")?"先生":"女士")+"你好!

您已获得本公司"+"["+jobName+"]AI面试资格,请打开微信小程序,点击面试通知查看详情"; + String title="扬城直聘:"+companyName; + EmailUtil.sendEmail(email,title,detail); } catch (Exception e) { e.printStackTrace(); return -3; } + VxInterviewApplication vxInterviewApplication = vxInterviewApplicationMapper.selectById(applicationId); + + vxInterviewApplication.setStatus(2); + + vxInterviewApplicationMapper.updateById(vxInterviewApplication); + Integer rows = vxInterviewNoticeMapper.insert(newVxInterviewNotice); + return rows; } @Override public List getInterviewNoticeByUserId(Integer userId) { + LambdaQueryWrapper queryWrapper=new LambdaQueryWrapper<>(); queryWrapper.eq(VxInterviewNotice::getRecipient,userId); @@ -135,6 +213,8 @@ public class InterviewNoticeServiceImpl extends ServiceImpl getJobSettingByJobId(Integer jobId) { + Map result=new HashMap<>(); + + LambdaQueryWrapper queryWrapper=new LambdaQueryWrapper<>(); + + queryWrapper.eq(InterviewSetting::getJobId,jobId); + + InterviewSetting interviewSetting = interviewSettingMapper.selectOne(queryWrapper); + + if(interviewSetting.getProfessional()!=0){ + + Map Professional=new HashMap<>(); + + LambdaQueryWrapper questionQueryWrapper=new LambdaQueryWrapper<>(); + + questionQueryWrapper.eq(Question::getBankId,interviewSetting.getProfessional()); + + List ProfessionalQuestionList = questionMapper.selectList(questionQueryWrapper); + + QuestionBank questionBank = bankMapper.selectById(interviewSetting.getProfessional()); + + Professional.put("ProfessionalName",questionBank.getTypeName()); + + Professional.put("ProfessionalQuestionList",ProfessionalQuestionList); + + result.put("Professional",Professional); + } + + if(interviewSetting.getComprehensive()!=0){ + + Map Comprehensive=new HashMap<>(); + + LambdaQueryWrapper questionQueryWrapper=new LambdaQueryWrapper<>(); + + questionQueryWrapper.eq(Question::getBankId,interviewSetting.getComprehensive()); + + List ComprehensiveQuestionList = questionMapper.selectList(questionQueryWrapper); + + QuestionBank questionBank = bankMapper.selectById(interviewSetting.getComprehensive()); + + Comprehensive.put("ComprehensiveName",questionBank.getTypeName()); + + Comprehensive.put("ComprehensiveQuestionList",ComprehensiveQuestionList); + + result.put("Comprehensive",Comprehensive); + + } + + if(interviewSetting.getPsychology()!=0){ + + Map Psychology=new HashMap<>(); + + LambdaQueryWrapper questionQueryWrapper=new LambdaQueryWrapper<>(); + + questionQueryWrapper.eq(Question::getBankId,interviewSetting.getPsychology()); + + List PsychologyQuestionList = questionMapper.selectList(questionQueryWrapper); + + QuestionBank questionBank = bankMapper.selectById(interviewSetting.getPsychology()); + + Psychology.put("PsychologyName",questionBank.getTypeName()); + + Psychology.put("PsychologyQuestionList",PsychologyQuestionList); + + result.put("Psychology",Psychology); + + } + + return result; + + } } diff --git a/src/main/java/com/yzdx/AiInterviewer/service/impl/JobListServiceImpl.java b/src/main/java/com/yzdx/AiInterviewer/service/impl/JobListServiceImpl.java index f0d9c57..05345d7 100644 --- a/src/main/java/com/yzdx/AiInterviewer/service/impl/JobListServiceImpl.java +++ b/src/main/java/com/yzdx/AiInterviewer/service/impl/JobListServiceImpl.java @@ -358,13 +358,30 @@ public class JobListServiceImpl extends ServiceImpl implem List> result=new ArrayList<>(); //先获取用户的岗位期望 Map resultResume = resumeService.getResume(userId); + List suggestJobs=new ArrayList<>(); + JSONArray jobExpectationJSONs =null; + if(resultResume==null||userId==null){ + LambdaQueryWrapper addQueryWrapper =new LambdaQueryWrapper<>(); + + addQueryWrapper.last("limit 5"); + + List suggestJobEntities = jobMapper.selectList(addQueryWrapper); + + suggestJobs=suggestJobEntities.stream().map(item->{ + + String jobName=item.getJobName(); + + return jobName ; + + }).collect(Collectors.toList()); + } Resume resume=(Resume) resultResume.get("resume"); String jobExpectation = resume.getJobExpectation(); - JSONArray jobExpectationJSONs = (JSONArray) JSON.parse(jobExpectation); + jobExpectationJSONs = (JSONArray) JSON.parse(jobExpectation); + - List suggestJobs=new ArrayList<>(); if(jobExpectationJSONs.size()<=5){ LambdaQueryWrapper addQueryWrapper =new LambdaQueryWrapper<>(); diff --git a/src/main/java/com/yzdx/AiInterviewer/service/impl/JobPostingServiceImpl.java b/src/main/java/com/yzdx/AiInterviewer/service/impl/JobPostingServiceImpl.java index ce66d62..6b8e7af 100644 --- a/src/main/java/com/yzdx/AiInterviewer/service/impl/JobPostingServiceImpl.java +++ b/src/main/java/com/yzdx/AiInterviewer/service/impl/JobPostingServiceImpl.java @@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.yzdx.AiInterviewer.entity.JobEntity; import com.yzdx.AiInterviewer.entity.JobPosting; import com.yzdx.AiInterviewer.entity.dto.JobPostingDto; +import com.yzdx.AiInterviewer.mapper.JobMapper; import com.yzdx.AiInterviewer.mapper.JobPostingMapper; import com.yzdx.AiInterviewer.service.JobListService; import com.yzdx.AiInterviewer.service.JobPostingService; @@ -15,12 +16,11 @@ import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import javax.jws.Oneway; import java.text.ParseException; import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; +import java.util.*; import java.util.stream.Collectors; @Service @@ -32,6 +32,9 @@ public class JobPostingServiceImpl extends ServiceImpl> getPostingInfoList(String encoding) { + List> result=new ArrayList<>(); + + LambdaQueryWrapper queryWrapper=new LambdaQueryWrapper<>(); + + queryWrapper.eq(JobPosting::getCompanyEncoding,encoding); + + List jobPostings = jobPostingMapper.selectList(queryWrapper); + + jobPostings.stream().map(item->{ + Map postInfo=new HashMap<>(); + + JobPosting jobPosting = jobPostingMapper.selectById(item.getId()); + + postInfo.put("postId",item.getId()); + + postInfo.put("postName",item.getRecruitmentName()); + + JSONArray jobListJSON=JSON.parseArray(jobPosting.getJobId()); + + List> jobList=new ArrayList<>(); + + for (int i = 0; i jobItem=new HashMap<>(); + + jobItem.put("jobId",jobEntity.getId()); + + jobItem.put("jobName",jobEntity.getJobName()); + + jobList.add(jobItem); + + } + + postInfo.put("jobList",jobList); + + result.add(postInfo); + + + return null; + }).collect(Collectors.toList()); + + return result; + + } } diff --git a/src/main/java/com/yzdx/AiInterviewer/service/impl/QuestionBankServiceImpl.java b/src/main/java/com/yzdx/AiInterviewer/service/impl/QuestionBankServiceImpl.java index d61c34b..491a913 100644 --- a/src/main/java/com/yzdx/AiInterviewer/service/impl/QuestionBankServiceImpl.java +++ b/src/main/java/com/yzdx/AiInterviewer/service/impl/QuestionBankServiceImpl.java @@ -93,7 +93,7 @@ public class QuestionBankServiceImpl extends ServiceImpl queryWrapper =new LambdaQueryWrapper<>(); - queryWrapper.eq(QuestionBank::getTypeName,typeName); + queryWrapper.eq(QuestionBank::getTypeName,typeName).eq(QuestionBank::getCompanyEncoding,encoding); QuestionBank findQuestionBank=questionBankMapper.selectOne(queryWrapper); if(findQuestionBank!=null){ //存在返回-2 diff --git a/src/main/java/com/yzdx/AiInterviewer/service/impl/QuestionServiceImpl.java b/src/main/java/com/yzdx/AiInterviewer/service/impl/QuestionServiceImpl.java index f30ae86..e23a89f 100644 --- a/src/main/java/com/yzdx/AiInterviewer/service/impl/QuestionServiceImpl.java +++ b/src/main/java/com/yzdx/AiInterviewer/service/impl/QuestionServiceImpl.java @@ -191,31 +191,30 @@ public class QuestionServiceImpl extends ServiceImpl i } @Override - public Integer addQuestion(String title, Integer bankId, String details, String promote, String encoding, Integer userId) { + public Integer addQuestion(String title, Integer bankId, String details, String answer, String encoding, Integer userId) { //判断题目标题是否重复 - Question question=new Question(); - question.setTitle(title); - question.setBankId(bankId); - question.setDetails(details); - question.setPromote(promote); - question.setCompanyEncoding(encoding); - question.setCreateUser(userId); - question.setCreateTime(TimeUtil.getTime()); - question.setUpdateTime(TimeUtil.getTime()); - question.setUpdateUser(userId); - LambdaQueryWrapper questionLambdaQueryWrapper=new LambdaQueryWrapper<>(); questionLambdaQueryWrapper - .eq(Question::getTitle,question.getTitle()) - .eq(Question::getBankId,question.getBankId()) - .eq(Question::getCompanyEncoding,question.getCompanyEncoding()); + .eq(Question::getTitle,title) + .eq(Question::getBankId,bankId) + .eq(Question::getCompanyEncoding,encoding); Question selectQuestion = questionMapper.selectOne(questionLambdaQueryWrapper); if(selectQuestion!=null){ return -2; } + Question question=new Question(); + question.setTitle(title); + question.setBankId(bankId); + question.setDetails(details); + question.setAnswer(answer); + question.setCompanyEncoding(encoding); + question.setCreateUser(userId); + question.setCreateTime(TimeUtil.getTime()); + question.setUpdateTime(TimeUtil.getTime()); + question.setUpdateUser(userId); Integer rows = questionMapper.insert(question); @@ -223,14 +222,14 @@ public class QuestionServiceImpl extends ServiceImpl i } @Override - public Integer updateQuestion(Integer id,String title, Integer bankId, String details, String promote, String encoding, Integer userId) { + public Integer updateQuestion(Integer id,String title, Integer bankId, String details, String answer, String encoding, Integer userId) { //判断题目标题是否重复 Question question=new Question(); question.setId(id); question.setTitle(title); question.setBankId(bankId); question.setDetails(details); - question.setPromote(promote); + question.setAnswer(answer); question.setCompanyEncoding(encoding); question.setUpdateTime(TimeUtil.getTime()); question.setUpdateUser(userId); diff --git a/src/main/java/com/yzdx/AiInterviewer/service/impl/ResumeServiceImpl.java b/src/main/java/com/yzdx/AiInterviewer/service/impl/ResumeServiceImpl.java index 740d5c5..03be5b7 100644 --- a/src/main/java/com/yzdx/AiInterviewer/service/impl/ResumeServiceImpl.java +++ b/src/main/java/com/yzdx/AiInterviewer/service/impl/ResumeServiceImpl.java @@ -61,7 +61,20 @@ public class ResumeServiceImpl extends ServiceImpl impleme findUser.setEmail(email); - findUser.setPhone(phone); + findUser.setSex((sex.equals("0")?"男":"女")); + + // 获取当前日期 + LocalDate currentDate = LocalDate.now(); + + // 解析生日日期 + LocalDate birthDate = LocalDate.parse(birthday + "-01"); + + // 计算年龄 + Period age = Period.between(birthDate, currentDate); + + + findUser.setAge(String.valueOf(age.getYears())); + Integer rows = userMapper.updateById(findUser); @@ -272,7 +285,7 @@ public class ResumeServiceImpl extends ServiceImpl impleme String projectExperience, Integer userId) { Map result=new HashMap<>(); - if(avatar!=null){ + if(avatar!=null&&name!=null&&email!=null&&phone!=null){ LambdaQueryWrapper queryWrapper1=new LambdaQueryWrapper(); @@ -286,9 +299,8 @@ public class ResumeServiceImpl extends ServiceImpl impleme findUser.setEmail(email); - findUser.setPhone(phone); - Integer rows = userMapper.updateById(findUser); + } Resume resume=new Resume(); @@ -399,6 +411,8 @@ public class ResumeServiceImpl extends ServiceImpl impleme result.put("school",school); result.put("major",major); result.put("phone",phone); + + result.put("resumeId",resume.getId()); return result; } @@ -412,6 +426,10 @@ public class ResumeServiceImpl extends ServiceImpl impleme Resume resume = resumeMapper.selectOne(queryWrapper); + if(resume==null){ + return null; + } + //解析在校经历,计算出学历 JSONArray educationJSONArray= JSON.parseArray(resume.getEducationBackground()); diff --git a/src/main/java/com/yzdx/AiInterviewer/service/impl/SharedQuestionBankServiceImpl.java b/src/main/java/com/yzdx/AiInterviewer/service/impl/SharedQuestionBankServiceImpl.java index ae387e3..bd94356 100644 --- a/src/main/java/com/yzdx/AiInterviewer/service/impl/SharedQuestionBankServiceImpl.java +++ b/src/main/java/com/yzdx/AiInterviewer/service/impl/SharedQuestionBankServiceImpl.java @@ -204,7 +204,7 @@ public class SharedQuestionBankServiceImpl extends ServiceImpl queryWrapper=new LambdaQueryWrapper<>(); queryWrapper.eq(SharedQuestion::getId,id); @@ -308,7 +308,7 @@ public class SharedQuestionServiceImpl extends ServiceImpl implements TalentService { + +} diff --git a/src/main/java/com/yzdx/AiInterviewer/service/impl/UserServiceImpl.java b/src/main/java/com/yzdx/AiInterviewer/service/impl/UserServiceImpl.java index 8a6616f..1bdd332 100644 --- a/src/main/java/com/yzdx/AiInterviewer/service/impl/UserServiceImpl.java +++ b/src/main/java/com/yzdx/AiInterviewer/service/impl/UserServiceImpl.java @@ -57,7 +57,7 @@ public class UserServiceImpl extends ServiceImpl implements Us return R.error("账号或密码有误,请检查输入!"); } - if(selectUser.getRole().equals("3")||selectUser.getRole().equals("4")){ + if(selectUser.getRole().equals("4")){ return R.error("账号权限不足,请联系管理员"); } //均正确,返回token密钥 @@ -157,24 +157,20 @@ public class UserServiceImpl extends ServiceImpl implements Us }).collect(Collectors.toList()); return filterUserList; } - +//系统管理添加HR @Override public Integer addAdmin(String encoding, Integer userId, String username, String phone,String role) { - User newUser=new User(); - newUser.setUsername(username); - newUser.setPhone(phone); - String salt=MD5Util.getSalt(); - newUser.setSalt(salt); - String password=phone.substring(phone.length()-6); - System.out.println(password); - newUser.setPassword(MD5Util.GetMD5Password(password,salt)); - newUser.setRole(role); - newUser.setCompanyEncoding(encoding); - newUser.setCreateUser(userId); - newUser.setCreateTime(TimeUtil.getTime()); - newUser.setUpdateUser(userId); - newUser.setUpdateTime(TimeUtil.getTime()); + //查询操作人的权限(添加管理员的权限应该是公司管理员) + //公司管理员-》公司管理员, HR + User user = userMapper.selectById(userId); + + String userRole =user.getRole(); + + if(!(userRole.equals("2"))){ + + return -3; + } LambdaQueryWrapper queryWrapper=new LambdaQueryWrapper<>(); queryWrapper.eq(User::getPhone,phone); @@ -183,13 +179,27 @@ public class UserServiceImpl extends ServiceImpl implements Us if(findUser!=null){ //用户转hr - if(findUser.getRole().equals("4")){ - findUser.setRole(role); - findUser.setCompanyEncoding(encoding); - return userMapper.updateById(findUser); - } - return -2; + if(findUser.getRole().equals("4")){ + findUser.setRole(role); + findUser.setCompanyEncoding(encoding); + return userMapper.updateById(findUser); + } + return -2; } + User newUser=new User(); + newUser.setUsername(username); + newUser.setPhone(phone); + String salt=MD5Util.getSalt(); + newUser.setSalt(salt); + String password=phone.substring(phone.length()-6); + newUser.setPassword(MD5Util.GetMD5Password(password,salt)); + newUser.setRole(role); + newUser.setCompanyEncoding(encoding); + newUser.setCreateUser(userId); + newUser.setCreateTime(TimeUtil.getTime()); + newUser.setUpdateUser(userId); + newUser.setUpdateTime(TimeUtil.getTime()); + Integer rows = userMapper.insert(newUser); return rows; @@ -202,25 +212,10 @@ public class UserServiceImpl extends ServiceImpl implements Us return -3; } - //判断有误越权 - LambdaQueryWrapper userLambdaQueryWrapper=new LambdaQueryWrapper<>(); + User user = userMapper.selectById(userId); - userLambdaQueryWrapper.eq(User::getId,userId); - - User fixUser = userMapper.selectOne(userLambdaQueryWrapper); - - LambdaQueryWrapper deleteLambdaQueryWrapper=new LambdaQueryWrapper<>(); - - deleteLambdaQueryWrapper.eq(User::getId,deleteId); - - User deleteUser = userMapper.selectOne(deleteLambdaQueryWrapper); - - Integer fixRole=Integer.valueOf(fixUser.getRole()); - - Integer deleteRole=Integer.valueOf(deleteUser.getRole()); - - if(deleteRole implements Us } + @Override + public Integer adminEditPassword(Integer userId, Integer updateUserId, String password) { + //判断权限是否越界 + User user = userMapper.selectById(userId); + User updateUser = userMapper.selectById(updateUserId); + if(user.getRole().equals(updateUser.getRole())&&userId!=updateUserId){ + return -2; + } + if(user.getRole().equals("3")||user.getRole().equals("4")){ + + return -3; + } + + String salt = updateUser.getSalt(); + + String newPassword = MD5Util.GetMD5Password(password, salt); + + updateUser.setPassword(newPassword); + + updateUser.setUpdateUser(userId); + + updateUser.setUpdateTime(TimeUtil.getTime()); + + return userMapper.updateById(updateUser); + + } } diff --git a/src/main/java/com/yzdx/AiInterviewer/utiles/EmailUtil.java b/src/main/java/com/yzdx/AiInterviewer/utiles/EmailUtil.java index c1f1d07..f6c736b 100644 --- a/src/main/java/com/yzdx/AiInterviewer/utiles/EmailUtil.java +++ b/src/main/java/com/yzdx/AiInterviewer/utiles/EmailUtil.java @@ -31,7 +31,7 @@ public class EmailUtil { * @throws Exception */ - public static String sendEmail(String email,String userName,String companyName,String jobName) { + public static String sendEmail(String email,String title,String detail) { Transport ts = null; try { @@ -80,10 +80,10 @@ public class EmailUtil { message.setRecipient(Message.RecipientType.TO, new InternetAddress(email)); //4-4,邮件标题 - message.setSubject("扬城直聘:"+companyName); + message.setSubject(title); //4-5,邮件文本内容 - message.setContent("

"+userName+"先生,你好!

您已获得本公司"+"["+jobName+"]AI面试资格,请打开微信小程序,点击面试通知查看详情","text/html;charset=UTF-8"); + message.setContent(detail,"text/html;charset=UTF-8"); //4-6,发送邮件 ts.sendMessage(message, message.getAllRecipients()); @@ -96,8 +96,4 @@ public class EmailUtil { return "发送成功"; } - public static void main(String[] args) { - sendEmail("2209176490@qq.com","Jerry","小米有限责任公司","java程序员"); - } - } diff --git a/src/main/java/com/yzdx/AiInterviewer/utiles/FileDownloadUtil.java b/src/main/java/com/yzdx/AiInterviewer/utiles/FileDownloadUtil.java new file mode 100644 index 0000000..f8cda03 --- /dev/null +++ b/src/main/java/com/yzdx/AiInterviewer/utiles/FileDownloadUtil.java @@ -0,0 +1,69 @@ +package com.yzdx.AiInterviewer.utiles; +import lombok.extern.slf4j.Slf4j; + +import java.io.BufferedInputStream; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.URL; + +@Slf4j +public class FileDownloadUtil { + + + /** + * 下载文件到服务器 + * + * @param downloadUrl 要下载的文件的地址 + * @param downloadPath 服务器上存储的文件路径 + * @param downloadFileName 服务器上存储的文件名称 + * @return + */ + + public static boolean downloadToServer(String downloadUrl, String downloadPath, String downloadFileName) { + FileOutputStream fos = null; + BufferedInputStream bis = null; + boolean flag = false; + try { + URL url = new URL(downloadUrl); + HttpURLConnection connection = (HttpURLConnection) url.openConnection(); + connection.connect(); + bis = new BufferedInputStream(connection.getInputStream()); + File file = new File(downloadPath); + if (!file.exists()) { + boolean mkdirs = file.mkdirs(); + if (!mkdirs) { + log.error("创建文件目录失败"); + return false; + } + } + String filePathName = downloadPath + File.separator + downloadFileName; + byte[] buf = new byte[1024]; + int size; + fos = new FileOutputStream(filePathName); + while ((size = bis.read(buf)) != -1) { + fos.write(buf, 0, size); + } + flag = true; + log.info("文件下载成功,文件路径[" + filePathName + "]"); + flag = true; + } catch (Exception e) { + log.error("下载文件异常", e); + } finally { + try { + if (bis != null) { + bis.close(); + } + if (fos != null) { + fos.close(); + } + } catch (IOException e) { + log.error("关流异常", e); + e.printStackTrace(); + } + } + return flag; + } + +} diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 56026dd..0d90dc2 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,5 +1,5 @@ server: - port: 8080 + port: 5380 spring: datasource: diff --git a/static/upload/files/a.txt b/static/upload/files/a.txt new file mode 100644 index 0000000..ce5c36d --- /dev/null +++ b/static/upload/files/a.txt @@ -0,0 +1 @@ +你好啊 \ No newline at end of file