邀请面试完善
This commit is contained in:
parent
966a5ef1fc
commit
63a6fd5b26
13
pom.xml
13
pom.xml
|
@ -23,6 +23,8 @@
|
||||||
<maven.compiler.target>8</maven.compiler.target>
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<!-- 阿里JSON解析器 -->
|
<!-- 阿里JSON解析器 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -58,6 +60,12 @@
|
||||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||||
<version>3.4.3</version>
|
<version>3.4.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mybatis</groupId>
|
||||||
|
<artifactId>mybatis</artifactId>
|
||||||
|
<version>3.5.11</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
@ -163,6 +171,11 @@
|
||||||
<artifactId>commons-collections4</artifactId>
|
<artifactId>commons-collections4</artifactId>
|
||||||
<version>4.1</version>
|
<version>4.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!--定时任务-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-context</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -2,6 +2,9 @@ package com.yzdx.AiInterviewer;
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
|
|
||||||
|
@EnableScheduling
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class AiInterviewerApplication {
|
public class AiInterviewerApplication {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.yzdx.AiInterviewer.controller;
|
||||||
|
|
||||||
|
import com.yzdx.AiInterviewer.comment.R;
|
||||||
|
import com.yzdx.AiInterviewer.entity.ApplicationCount;
|
||||||
|
import com.yzdx.AiInterviewer.service.ApplicationCountService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/company")
|
||||||
|
public class CompanyController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ApplicationCountService applicationCountService;
|
||||||
|
|
||||||
|
@GetMapping("/getApplicationCount")
|
||||||
|
public R getApplicationCount(Integer days,String encoding){
|
||||||
|
|
||||||
|
if(days==7){
|
||||||
|
|
||||||
|
List<ApplicationCount> applicationCountSevenDays = applicationCountService.getApplicationCountSevenDays(encoding);
|
||||||
|
|
||||||
|
return R.success(applicationCountSevenDays);
|
||||||
|
|
||||||
|
}else {
|
||||||
|
|
||||||
|
List<ApplicationCount> applicationCountThirtyDays = applicationCountService.getApplicationCountThirtyDays(encoding);
|
||||||
|
|
||||||
|
return R.success(applicationCountThirtyDays);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -296,6 +296,14 @@ public class InterviewController {
|
||||||
|
|
||||||
return R.success(interviewRecordDtoList);
|
return R.success(interviewRecordDtoList);
|
||||||
|
|
||||||
|
}
|
||||||
|
@GetMapping("/getInterviewRecordListByUserId")
|
||||||
|
public R getInterviewRecordListByUserId(Integer userId){
|
||||||
|
|
||||||
|
List<InterviewRecordDto> interviewRecordDtoList=vxInterviewRecordService.getInterviewRecordListByUserId(userId);
|
||||||
|
|
||||||
|
return R.success(interviewRecordDtoList);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/getPostingInfoList")
|
@GetMapping("/getPostingInfoList")
|
||||||
|
@ -329,6 +337,30 @@ public class InterviewController {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/VxSendInterviewNotice")
|
||||||
|
public R VxSendInterviewNotice(@RequestBody Map<String,Object> addInfo){
|
||||||
|
String encoding=(String) addInfo.get("encoding");
|
||||||
|
Integer recipient=(Integer) addInfo.get("inviteUser");
|
||||||
|
Integer jobId=(Integer) addInfo.get("jobId");
|
||||||
|
Integer postId=(Integer) addInfo.get("postId");
|
||||||
|
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");
|
||||||
|
|
||||||
|
Integer rows = interviewNoticeService.addInterviewNotice(encoding,recipient,
|
||||||
|
jobId, postId,userId,promote,selectQuestions,applicationId,endTime);
|
||||||
|
if(rows==-2){
|
||||||
|
return R.error("您已经邀请过他面试啦");
|
||||||
|
}
|
||||||
|
if(rows==-3){
|
||||||
|
return R.error("邀请失败,请联系管理员");
|
||||||
|
}
|
||||||
|
return R.success("邀请成功");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -382,7 +382,7 @@ public class QuestionController {
|
||||||
@PostMapping("/add_QuestionBankFromShare")
|
@PostMapping("/add_QuestionBankFromShare")
|
||||||
@ApiOperation(value = "从题库广场中导入到本地",notes = "")
|
@ApiOperation(value = "从题库广场中导入到本地",notes = "")
|
||||||
public R addQuestionBankFromShare(@RequestBody Map<String,Object> addInfo){
|
public R addQuestionBankFromShare(@RequestBody Map<String,Object> addInfo){
|
||||||
List<Integer>sharedBankIds =(List<Integer>)addInfo.get("sharedBankIds");
|
List<Integer>sharedBankIds =(List<Integer>)addInfo.get("SharedBankIds");
|
||||||
Integer userId=(Integer)addInfo.get("userId");
|
Integer userId=(Integer)addInfo.get("userId");
|
||||||
String encoding=(String) addInfo.get("encoding");
|
String encoding=(String) addInfo.get("encoding");
|
||||||
|
|
||||||
|
|
|
@ -38,9 +38,9 @@ public class UploadController {
|
||||||
}
|
}
|
||||||
//http://aiinterviewersystem.kooldns.cn
|
//http://aiinterviewersystem.kooldns.cn
|
||||||
// http://117.88.94.226:5380
|
// http://117.88.94.226:5380
|
||||||
//http://101.43.255.47/8080
|
//http://101.43.255.47:8080
|
||||||
|
|
||||||
private static final String BASE_URL = "http://117.88.94.226:5380";
|
private static final String BASE_URL = "http://101.43.255.47:8080";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传图片
|
* 上传图片
|
||||||
|
@ -100,6 +100,7 @@ public class UploadController {
|
||||||
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|
||||||
|
System.out.println(e.getMessage());
|
||||||
return R.error("文件存储出现异常");
|
return R.error("文件存储出现异常");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,20 @@ public class VxInterviewController {
|
||||||
public R getCarouselChart(){
|
public R getCarouselChart(){
|
||||||
return R.success(vxCarouselChartService.getVxCarouselChartService());
|
return R.success(vxCarouselChartService.getVxCarouselChartService());
|
||||||
}
|
}
|
||||||
|
@PostMapping("/updateCarouselChart")
|
||||||
|
public R updateCarouselChart(@RequestBody Map<String,Object> updateInfo){
|
||||||
|
String images=(String) updateInfo.get("submitImages");
|
||||||
|
|
||||||
|
Integer integer = vxCarouselChartService.updateCarouselChartService(images);
|
||||||
|
|
||||||
|
if(integer!=1){
|
||||||
|
return R.error("更新轮播图失败");
|
||||||
|
}
|
||||||
|
return R.success("更新轮播图成功");
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("addInterviewApplication")
|
@PostMapping("addInterviewApplication")
|
||||||
public R addInterviewApplication( @RequestParam(value = "jobId")Integer jobId,
|
public R addInterviewApplication( @RequestParam(value = "jobId")Integer jobId,
|
||||||
@RequestParam(value = "userId")Integer userId,
|
@RequestParam(value = "userId")Integer userId,
|
||||||
|
|
|
@ -55,7 +55,6 @@ public class VxUserController {
|
||||||
String param = "appid=wx7c972ceb65b45c49&secret=72ad166ce138375593026a2fc5bf9eee&js_code=" + js_code + "&grant_type=authorization_code";
|
String param = "appid=wx7c972ceb65b45c49&secret=72ad166ce138375593026a2fc5bf9eee&js_code=" + js_code + "&grant_type=authorization_code";
|
||||||
//调用获取session_key接口 请求方式get
|
//调用获取session_key接口 请求方式get
|
||||||
String jsonString = GetPostUntil.sendGet(wxLoginUrl, param);
|
String jsonString = GetPostUntil.sendGet(wxLoginUrl, param);
|
||||||
System.out.println(jsonString);
|
|
||||||
//因为json字符串是大括号包围,所以用JSONObject解析
|
//因为json字符串是大括号包围,所以用JSONObject解析
|
||||||
JSONObject json = new JSONObject(jsonString);
|
JSONObject json = new JSONObject(jsonString);
|
||||||
//json解析session_key值
|
//json解析session_key值
|
||||||
|
@ -354,8 +353,24 @@ public R getResume(Integer userId){
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getFeedBack")
|
@GetMapping("/getFeedBack")
|
||||||
public R getFeedBack(Integer userId){
|
public R getFeedBack(Integer userId){
|
||||||
VxFeedBack vxFeedBack= vxFeedBackService.getFeedBack(userId);
|
List<VxFeedBack> vxFeedBacks= vxFeedBackService.getFeedBack(userId);
|
||||||
return R.success(vxFeedBack);
|
return R.success(vxFeedBacks);
|
||||||
|
}
|
||||||
|
@GetMapping("/getAllFeedBack")
|
||||||
|
public R getAllFeedBack(Integer status){
|
||||||
|
|
||||||
|
List<VxFeedBack> allFeedBack = vxFeedBackService.getAllFeedBack(status);
|
||||||
|
|
||||||
|
return R.success(allFeedBack);
|
||||||
|
|
||||||
|
}
|
||||||
|
@GetMapping("/changeFeedBackStatus")
|
||||||
|
public R changeFeedBackStatus(Integer id,Integer userId){
|
||||||
|
|
||||||
|
Integer rows=vxFeedBackService.changeFeedBackStatus(id,userId);
|
||||||
|
|
||||||
|
return R.success("修改成功");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
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("application_count")
|
||||||
|
public class ApplicationCount {
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
private Integer count;
|
||||||
|
|
||||||
|
private String createTime;
|
||||||
|
|
||||||
|
private String encoding;
|
||||||
|
|
||||||
|
}
|
|
@ -19,6 +19,8 @@ public class VxFeedBack extends BaseEntity {
|
||||||
private Integer userId;
|
private Integer userId;
|
||||||
@ApiModelProperty("反馈内容")
|
@ApiModelProperty("反馈内容")
|
||||||
private String content;
|
private String content;
|
||||||
|
@ApiModelProperty("状态")
|
||||||
|
private Integer status;
|
||||||
@ApiModelProperty("图片地址")
|
@ApiModelProperty("图片地址")
|
||||||
private String imgUrl;
|
private String imgUrl;
|
||||||
@ApiModelProperty("联系方式")
|
@ApiModelProperty("联系方式")
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.yzdx.AiInterviewer.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.yzdx.AiInterviewer.entity.ApplicationCount;
|
||||||
|
import org.apache.ibatis.annotations.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface ApplicationCountMapper extends BaseMapper<ApplicationCount> {
|
||||||
|
|
||||||
|
@Delete("DELETE FROM application_count WHERE create_time < DATE_SUB(NOW(), INTERVAL 7 DAY);")
|
||||||
|
void autoDeleteApplicationCount();
|
||||||
|
|
||||||
|
@Select("SELECT * FROM application_count WHERE encoding=#{encoding} and create_time >= DATE_SUB(CURDATE(), INTERVAL 7 DAY)ORDER BY create_time ASC;")
|
||||||
|
List<ApplicationCount> selectSevenData(@Param("encoding") String encoding);
|
||||||
|
|
||||||
|
@Select("SELECT * FROM application_count WHERE encoding=#{encoding} and create_time >= DATE_SUB(CURDATE(), INTERVAL 30 DAY)ORDER BY create_time ASC;")
|
||||||
|
List<ApplicationCount> selectThirtyData(@Param("encoding") String encoding);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -3,7 +3,45 @@ package com.yzdx.AiInterviewer.mapper;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.yzdx.AiInterviewer.entity.JobEntity;
|
import com.yzdx.AiInterviewer.entity.JobEntity;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface JobMapper extends BaseMapper<JobEntity> {
|
public interface JobMapper extends BaseMapper<JobEntity> {
|
||||||
|
@Select("WITH CompanyFullAddress AS ( \n" +
|
||||||
|
" SELECT \n" +
|
||||||
|
" id, \n" +
|
||||||
|
" CONCAT(adress, addressDetail) AS full_address \n" +
|
||||||
|
" FROM \n" +
|
||||||
|
" company \n" +
|
||||||
|
"), \n" +
|
||||||
|
"CompanyCoordinates AS ( \n" +
|
||||||
|
" SELECT \n" +
|
||||||
|
" id, \n" +
|
||||||
|
" full_address, \n" +
|
||||||
|
" Geocode(full_address).latitude AS company_latitude, \n" +
|
||||||
|
" Geocode(full_address).longitude AS company_longitude \n" +
|
||||||
|
" FROM \n" +
|
||||||
|
" CompanyFullAddress \n" +
|
||||||
|
"), \n" +
|
||||||
|
"InputCoordinates AS ( \n" +
|
||||||
|
" SELECT \n" +
|
||||||
|
" Geocode(#{address}).latitude AS input_latitude, \n" +
|
||||||
|
" Geocode(#{address}).longitude AS input_longitude \n" +
|
||||||
|
") \n" +
|
||||||
|
"SELECT \n" +
|
||||||
|
" c.id, \n" +
|
||||||
|
" c.full_address, \n" +
|
||||||
|
" (6371 * acos(cos(radians(i.input_latitude)) \n" +
|
||||||
|
" * cos(radians(c.company_latitude)) \n" +
|
||||||
|
" * cos(radians(c.company_longitude) - radians(i.input_longitude)) \n" +
|
||||||
|
" + sin(radians(i.input_latitude)) \n" +
|
||||||
|
" * sin(radians(c.company_latitude)))) AS distance_in_km \n" +
|
||||||
|
"FROM \n" +
|
||||||
|
" CompanyCoordinates c, InputCoordinates i \n" +
|
||||||
|
"ORDER BY \n" +
|
||||||
|
" distance_in_km ASC;")
|
||||||
|
List<JobEntity> searchJob(String jobName,String address);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,14 @@ package com.yzdx.AiInterviewer.mapper.VxMapper;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxFeedBack;
|
import com.yzdx.AiInterviewer.entity.vxEntity.VxFeedBack;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface VxFeedBackMapper extends BaseMapper<VxFeedBack> {
|
public interface VxFeedBackMapper extends BaseMapper<VxFeedBack> {
|
||||||
|
|
||||||
|
@Select("SELECT * FROM feedback where status=#{status} ORDER BY ABS(TIMESTAMPDIFF(DAY, create_time, NOW())) ASC;")
|
||||||
|
List<VxFeedBack> getAllFeedBack(@Param("status") Integer status);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.yzdx.AiInterviewer.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.yzdx.AiInterviewer.entity.ApplicationCount;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ApplicationCountService extends IService<ApplicationCount> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取7天内投递简历人数
|
||||||
|
* @param encoding 公司编码
|
||||||
|
* @return List<ApplicationCount>
|
||||||
|
* */
|
||||||
|
|
||||||
|
List<ApplicationCount> getApplicationCountSevenDays(String encoding);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取30天内投递简历人数
|
||||||
|
* @param encoding 公司编码
|
||||||
|
* @return List<ApplicationCount>
|
||||||
|
* */
|
||||||
|
|
||||||
|
List<ApplicationCount> getApplicationCountThirtyDays(String encoding);
|
||||||
|
|
||||||
|
}
|
|
@ -11,4 +11,12 @@ public interface VxCarouselChartService extends IService<VxCarouselChart> {
|
||||||
* */
|
* */
|
||||||
String getVxCarouselChartService();
|
String getVxCarouselChartService();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新轮播退信息
|
||||||
|
* @param images 图片信息
|
||||||
|
* @return 返回影响的行数
|
||||||
|
* */
|
||||||
|
|
||||||
|
Integer updateCarouselChartService(String images);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,10 +3,16 @@ package com.yzdx.AiInterviewer.service.VxService;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxFeedBack;
|
import com.yzdx.AiInterviewer.entity.vxEntity.VxFeedBack;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface VxFeedBackService extends IService<VxFeedBack> {
|
public interface VxFeedBackService extends IService<VxFeedBack> {
|
||||||
Integer writeFeedBack(Integer userid, String imgUrl, String phone, String content);
|
Integer writeFeedBack(Integer userid, String imgUrl, String phone, String content);
|
||||||
|
|
||||||
Integer updateFeedBack(Integer id, Integer userid, String imgUrl, String phone, String content);
|
Integer updateFeedBack(Integer id, Integer userid, String imgUrl, String phone, String content);
|
||||||
|
|
||||||
VxFeedBack getFeedBack(Integer userId);
|
List<VxFeedBack> getFeedBack(Integer userId);
|
||||||
|
|
||||||
|
List<VxFeedBack> getAllFeedBack(Integer status);
|
||||||
|
|
||||||
|
Integer changeFeedBackStatus(Integer id,Integer userId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,6 @@ import com.yzdx.AiInterviewer.entity.dto.InterviewRecordDto;
|
||||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxInterviewRecord;
|
import com.yzdx.AiInterviewer.entity.vxEntity.VxInterviewRecord;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public interface VxInterviewRecordService extends IService<VxInterviewRecord> {
|
public interface VxInterviewRecordService extends IService<VxInterviewRecord> {
|
||||||
|
|
||||||
|
@ -17,7 +16,7 @@ public interface VxInterviewRecordService extends IService<VxInterviewRecord> {
|
||||||
List<VxInterviewRecordDto> searchInterviewRecordList(String searchCompany,Integer userId);
|
List<VxInterviewRecordDto> searchInterviewRecordList(String searchCompany,Integer userId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加面试巨鹿
|
* 添加面试记录
|
||||||
* @param encoding 公司编码
|
* @param encoding 公司编码
|
||||||
* @param interviewer 面试者id
|
* @param interviewer 面试者id
|
||||||
* @param comments 面试评语
|
* @param comments 面试评语
|
||||||
|
@ -31,7 +30,7 @@ public interface VxInterviewRecordService extends IService<VxInterviewRecord> {
|
||||||
Integer addInterviewRecord(String encoding, String comments, Integer interviewer, Integer noticeId,Integer talentId,String detail);
|
Integer addInterviewRecord(String encoding, String comments, Integer interviewer, Integer noticeId,Integer talentId,String detail);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 后台网页或取
|
* 后台网页获取
|
||||||
* @param jobId 岗位id
|
* @param jobId 岗位id
|
||||||
* @param encoding 公司编码
|
* @param encoding 公司编码
|
||||||
* @param postId 招聘ID
|
* @param postId 招聘ID
|
||||||
|
@ -50,4 +49,12 @@ public interface VxInterviewRecordService extends IService<VxInterviewRecord> {
|
||||||
*
|
*
|
||||||
* */
|
* */
|
||||||
Integer agreeUsersPassInterview(Integer jobId, Integer postId, String userList,Integer userId);
|
Integer agreeUsersPassInterview(Integer jobId, Integer postId, String userList,Integer userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户id获取面试记录
|
||||||
|
* @param userId 用户id
|
||||||
|
* @return List<InterviewRecordDto>
|
||||||
|
*
|
||||||
|
* */
|
||||||
|
List<InterviewRecordDto> getInterviewRecordListByUserId(Integer userId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,4 +21,17 @@ public class VxCarouselChartServiceImpl extends ServiceImpl<VxCarouselChartMappe
|
||||||
|
|
||||||
return vxCarouselChart.getImages();
|
return vxCarouselChart.getImages();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer updateCarouselChartService(String images) {
|
||||||
|
|
||||||
|
VxCarouselChart vxCarouselChart = vxCarouselChartMapper.selectById(5);
|
||||||
|
|
||||||
|
vxCarouselChart.setImages(images);
|
||||||
|
|
||||||
|
Integer rows = vxCarouselChartMapper.updateById(vxCarouselChart);
|
||||||
|
|
||||||
|
return rows;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,14 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxFeedBack;
|
import com.yzdx.AiInterviewer.entity.vxEntity.VxFeedBack;
|
||||||
import com.yzdx.AiInterviewer.mapper.VxMapper.VxFeedBackMapper;
|
import com.yzdx.AiInterviewer.mapper.VxMapper.VxFeedBackMapper;
|
||||||
import com.yzdx.AiInterviewer.service.VxService.VxFeedBackService;
|
import com.yzdx.AiInterviewer.service.VxService.VxFeedBackService;
|
||||||
|
import com.yzdx.AiInterviewer.utiles.PhoneUtils;
|
||||||
import com.yzdx.AiInterviewer.utiles.TimeUtil;
|
import com.yzdx.AiInterviewer.utiles.TimeUtil;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class VxFeedBackServiceImpl extends ServiceImpl<VxFeedBackMapper, VxFeedBack> implements VxFeedBackService {
|
public class VxFeedBackServiceImpl extends ServiceImpl<VxFeedBackMapper, VxFeedBack> implements VxFeedBackService {
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -46,10 +50,39 @@ public class VxFeedBackServiceImpl extends ServiceImpl<VxFeedBackMapper, VxFeedB
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public VxFeedBack getFeedBack(Integer userId) {
|
public List<VxFeedBack> getFeedBack(Integer userId) {
|
||||||
LambdaQueryWrapper<VxFeedBack> queryWrapper=new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<VxFeedBack> queryWrapper=new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(VxFeedBack::getUserId,userId);
|
queryWrapper.eq(VxFeedBack::getUserId,userId);
|
||||||
VxFeedBack vxFeedBack = vxFeedBackMapper.selectOne(queryWrapper);
|
List<VxFeedBack> vxFeedBacks = vxFeedBackMapper.selectList(queryWrapper);
|
||||||
return vxFeedBack;
|
return vxFeedBacks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<VxFeedBack> getAllFeedBack(Integer status) {
|
||||||
|
|
||||||
|
List<VxFeedBack> allFeedBack = vxFeedBackMapper.getAllFeedBack(status);
|
||||||
|
|
||||||
|
allFeedBack=allFeedBack.stream().map(item->{
|
||||||
|
String phone=item.getPhone();
|
||||||
|
|
||||||
|
String s = PhoneUtils.blurPhone(phone);
|
||||||
|
|
||||||
|
item.setPhone(s);
|
||||||
|
return item;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
|
||||||
|
return allFeedBack;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer changeFeedBackStatus(Integer id,Integer userId) {
|
||||||
|
VxFeedBack vxFeedBack = vxFeedBackMapper.selectById(id);
|
||||||
|
|
||||||
|
vxFeedBack.setStatus(2);
|
||||||
|
vxFeedBack.setUpdateUser(userId);
|
||||||
|
vxFeedBack.setUpdateTime(TimeUtil.getTime());
|
||||||
|
return vxFeedBackMapper.updateById(vxFeedBack);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,12 +4,10 @@ import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.yzdx.AiInterviewer.entity.BaseEntity;
|
import com.yzdx.AiInterviewer.entity.*;
|
||||||
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.VxEntityDto.VxInterviewApplicationDto;
|
||||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxInterviewApplication;
|
import com.yzdx.AiInterviewer.entity.vxEntity.VxInterviewApplication;
|
||||||
|
import com.yzdx.AiInterviewer.mapper.ApplicationCountMapper;
|
||||||
import com.yzdx.AiInterviewer.mapper.JobMapper;
|
import com.yzdx.AiInterviewer.mapper.JobMapper;
|
||||||
import com.yzdx.AiInterviewer.mapper.ResumeMapper;
|
import com.yzdx.AiInterviewer.mapper.ResumeMapper;
|
||||||
import com.yzdx.AiInterviewer.mapper.UserMapper;
|
import com.yzdx.AiInterviewer.mapper.UserMapper;
|
||||||
|
@ -35,6 +33,8 @@ public class VxInterviewApplicationServiceImpl extends ServiceImpl<VxInterviewAp
|
||||||
private JobMapper jobMapper;
|
private JobMapper jobMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private UserMapper userMapper;
|
private UserMapper userMapper;
|
||||||
|
@Autowired
|
||||||
|
private ApplicationCountMapper applicationCountMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer addInterviewApplication(Integer jobId, Integer userId, Integer postingId, String companyEncoding) {
|
public Integer addInterviewApplication(Integer jobId, Integer userId, Integer postingId, String companyEncoding) {
|
||||||
|
@ -63,6 +63,18 @@ public class VxInterviewApplicationServiceImpl extends ServiceImpl<VxInterviewAp
|
||||||
vxInterviewApplication1.setCreateUser(userId);
|
vxInterviewApplication1.setCreateUser(userId);
|
||||||
vxInterviewApplication1.setUpdateUser(userId);
|
vxInterviewApplication1.setUpdateUser(userId);
|
||||||
Integer insert = vxInterviewApplicationMapper.insert(vxInterviewApplication1);
|
Integer insert = vxInterviewApplicationMapper.insert(vxInterviewApplication1);
|
||||||
|
|
||||||
|
LambdaQueryWrapper<ApplicationCount> queryWrapper2=new LambdaQueryWrapper<>();
|
||||||
|
|
||||||
|
queryWrapper2.eq(ApplicationCount::getEncoding,companyEncoding).eq(ApplicationCount::getCreateTime,TimeUtil.getTime());
|
||||||
|
|
||||||
|
ApplicationCount applicationCount = applicationCountMapper.selectOne(queryWrapper2);
|
||||||
|
|
||||||
|
applicationCount.setCount(applicationCount.getCount()+1);
|
||||||
|
|
||||||
|
applicationCountMapper.updateById(applicationCount);
|
||||||
|
|
||||||
|
|
||||||
return insert;
|
return insert;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -182,12 +182,11 @@ public class VxInterviewRecordServiceImpl extends ServiceImpl<VxInterviewRecordM
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
|
|
||||||
if(vxInterviewRecords.size()==0){
|
if(vxInterviewRecords.size()==0||(vxInterviewRecords.size()==1&&vxInterviewRecords.get(0)==null)){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
List<InterviewRecordDto> interviewRecordDtoList=vxInterviewRecords.stream().map(item->{
|
List<InterviewRecordDto> interviewRecordDtoList=vxInterviewRecords.stream().map(item->{
|
||||||
|
@ -292,4 +291,59 @@ public class VxInterviewRecordServiceImpl extends ServiceImpl<VxInterviewRecordM
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<InterviewRecordDto> getInterviewRecordListByUserId(Integer userId) {
|
||||||
|
LambdaQueryWrapper<VxInterviewRecord> queryWrapper=new LambdaQueryWrapper<>();
|
||||||
|
|
||||||
|
queryWrapper.eq(VxInterviewRecord::getInterviewer,userId);
|
||||||
|
|
||||||
|
List<VxInterviewRecord> vxInterviewRecords = vxInterviewRecordMapper.selectList(queryWrapper);
|
||||||
|
|
||||||
|
if(vxInterviewRecords.size()==0||(vxInterviewRecords.size()==1&&vxInterviewRecords.get(0)==null)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
List<InterviewRecordDto> interviewRecordDtoList=vxInterviewRecords.stream().map(item->{
|
||||||
|
|
||||||
|
InterviewRecordDto interviewRecordDto=new InterviewRecordDto();
|
||||||
|
|
||||||
|
BeanUtils.copyProperties(item,interviewRecordDto);
|
||||||
|
|
||||||
|
Map<String,Object> 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<String,Object> 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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.yzdx.AiInterviewer.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.yzdx.AiInterviewer.entity.ApplicationCount;
|
||||||
|
import com.yzdx.AiInterviewer.mapper.ApplicationCountMapper;
|
||||||
|
import com.yzdx.AiInterviewer.service.ApplicationCountService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class ApplicationCountServiceImpl extends ServiceImpl<ApplicationCountMapper,ApplicationCount> implements ApplicationCountService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ApplicationCountMapper applicationCountMapper;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ApplicationCount> getApplicationCountSevenDays(String encoding) {
|
||||||
|
|
||||||
|
List<ApplicationCount> applicationCounts = applicationCountMapper.selectSevenData(encoding);
|
||||||
|
|
||||||
|
return applicationCounts;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ApplicationCount> getApplicationCountThirtyDays(String encoding) {
|
||||||
|
|
||||||
|
List<ApplicationCount> applicationCounts = applicationCountMapper.selectThirtyData(encoding);
|
||||||
|
|
||||||
|
return applicationCounts;
|
||||||
|
}
|
||||||
|
}
|
|
@ -167,7 +167,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||||
|
|
||||||
String userRole =user.getRole();
|
String userRole =user.getRole();
|
||||||
|
|
||||||
if(!(userRole.equals("2"))){
|
if(userRole.equals("3")){
|
||||||
|
|
||||||
return -3;
|
return -3;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
package com.yzdx.AiInterviewer.utiles;
|
||||||
|
|
||||||
|
import com.aliyuncs.utils.StringUtils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机号码处理工具类
|
||||||
|
* Created by Hilox on 2018/12/29 0029.
|
||||||
|
*/
|
||||||
|
public class PhoneUtils {
|
||||||
|
|
||||||
|
private PhoneUtils() {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机号格式校验正则
|
||||||
|
*/
|
||||||
|
public static final String PHONE_REGEX = "^1(3[0-9]|4[57]|5[0-35-9]|7[0135678]|8[0-9])\\d{8}$";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机号脱敏筛选正则
|
||||||
|
*/
|
||||||
|
public static final String PHONE_BLUR_REGEX = "(\\d{3})\\d{4}(\\d{4})";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机号脱敏替换正则
|
||||||
|
*/
|
||||||
|
public static final String PHONE_BLUR_REPLACE_REGEX = "$1****$2";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机号格式校验
|
||||||
|
* @param phone
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static final boolean checkPhone(String phone) {
|
||||||
|
if (StringUtils.isEmpty(phone)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return phone.matches(PHONE_REGEX);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机号脱敏处理
|
||||||
|
* @param phone
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static final String blurPhone(String phone) {
|
||||||
|
boolean checkFlag = checkPhone(phone);
|
||||||
|
if (!checkFlag) {
|
||||||
|
throw new IllegalArgumentException("手机号格式不正确!");
|
||||||
|
}
|
||||||
|
return phone.replaceAll(PHONE_BLUR_REGEX, PHONE_BLUR_REPLACE_REGEX);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,44 @@
|
||||||
|
package com.yzdx.AiInterviewer.utiles;
|
||||||
|
|
||||||
|
import com.yzdx.AiInterviewer.entity.ApplicationCount;
|
||||||
|
import com.yzdx.AiInterviewer.entity.Company;
|
||||||
|
import com.yzdx.AiInterviewer.mapper.ApplicationCountMapper;
|
||||||
|
import com.yzdx.AiInterviewer.mapper.CompanyMapper;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Component // 把此类托管给 Spring,不能省略
|
||||||
|
public class TaskUtils {
|
||||||
|
//0 0 * * * ?
|
||||||
|
// 0/2 * * * * ?
|
||||||
|
@Autowired
|
||||||
|
private ApplicationCountMapper applicationCountMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private CompanyMapper companyMapper;
|
||||||
|
// 添加定时任务
|
||||||
|
@Scheduled(cron = "0 0 0 * * ? ") // cron表达式:每天2:00 执行
|
||||||
|
public void doTask(){
|
||||||
|
applicationCountMapper.autoDeleteApplicationCount();
|
||||||
|
|
||||||
|
List<Company> companies = companyMapper.selectList(null);
|
||||||
|
|
||||||
|
ApplicationCount applicationCount=new ApplicationCount();
|
||||||
|
|
||||||
|
for (Company company:companies) {
|
||||||
|
|
||||||
|
applicationCount.setCount(0);
|
||||||
|
|
||||||
|
applicationCount.setEncoding(company.getEncoding());
|
||||||
|
|
||||||
|
applicationCount.setCreateTime(TimeUtil.getTime());
|
||||||
|
|
||||||
|
applicationCountMapper.insert(applicationCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,11 +1,13 @@
|
||||||
server:
|
server:
|
||||||
port: 5380
|
port: 8080
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://117.88.94.226:3306/ai_interviewer?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
|
url: jdbc:mysql://101.43.255.47:3306/ai_interviewer?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
|
||||||
username: root
|
username: root
|
||||||
password: Jerry
|
password: 123456
|
||||||
|
hikari:
|
||||||
|
max-lifetime: 5000000000
|
||||||
|
|
||||||
jackson:
|
jackson:
|
||||||
default-property-inclusion: non_null
|
default-property-inclusion: non_null
|
||||||
|
@ -21,4 +23,6 @@ spring:
|
||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
max-file-size: 50MB #单个文件大小限制
|
max-file-size: 50MB #单个文件大小限制
|
||||||
max-request-size: 50MB #总文件大小限制(允许存储文件的文件夹大小)
|
max-request-size: 50MB #总文件大小限制(允许存储文件的文件夹大小)
|
||||||
|
mybatis-plus:
|
||||||
|
mapper-locations: classpath:mapper/*.xml
|
||||||
|
|
Loading…
Reference in New Issue