This commit is contained in:
parent
699e5bd380
commit
f8ca479a7a
|
@ -0,0 +1,20 @@
|
||||||
|
package com.yzdx.AiInterviewer.config;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 配置MP的分页插件
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
public class MybatisPlusConfig {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public MybatisPlusInterceptor mybatisPlusInterceptor(){
|
||||||
|
MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor();
|
||||||
|
mybatisPlusInterceptor.addInnerInterceptor(new PaginationInnerInterceptor());
|
||||||
|
return mybatisPlusInterceptor;
|
||||||
|
}
|
||||||
|
}
|
|
@ -20,6 +20,8 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
||||||
.addPathPatterns("/**")
|
.addPathPatterns("/**")
|
||||||
// 需要放行的请求
|
// 需要放行的请求
|
||||||
.excludePathPatterns("/admin/login")
|
.excludePathPatterns("/admin/login")
|
||||||
|
.excludePathPatterns("/vxUser/decodeUserInfo")
|
||||||
|
.excludePathPatterns("/vxUser/WxLogin")
|
||||||
// 添加swagger-ui的放行路径
|
// 添加swagger-ui的放行路径
|
||||||
.excludePathPatterns("/swagger-resources/**", "/webjars/**", "/v2/**", "/swagger-ui.html/**","/doc.html/**")
|
.excludePathPatterns("/swagger-resources/**", "/webjars/**", "/v2/**", "/swagger-ui.html/**","/doc.html/**")
|
||||||
.excludePathPatterns("/upload/**")
|
.excludePathPatterns("/upload/**")
|
||||||
|
|
|
@ -94,7 +94,7 @@ public class UploadController {
|
||||||
return R.error("文件存储出现异常");
|
return R.error("文件存储出现异常");
|
||||||
|
|
||||||
}
|
}
|
||||||
String RealFilePath="http://localhost:8080/upload/picture/"+filename;
|
String RealFilePath="http://aiinterviewersystem.kooldns.cn/upload/picture/"+filename;
|
||||||
Map<String,Object> data=new HashMap<>();
|
Map<String,Object> data=new HashMap<>();
|
||||||
data.put("image",RealFilePath);
|
data.put("image",RealFilePath);
|
||||||
data.put("filename",filename);
|
data.put("filename",filename);
|
||||||
|
@ -155,7 +155,7 @@ public class UploadController {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String RealFilePath="http://localhost:8080/upload/video/"+filename;
|
String RealFilePath="http://aiinterviewersystem.kooldns.cn/upload/video/"+filename;
|
||||||
Map<String,Object> data=new HashMap<>();
|
Map<String,Object> data=new HashMap<>();
|
||||||
data.put("video",RealFilePath);
|
data.put("video",RealFilePath);
|
||||||
data.put("filename",filename);
|
data.put("filename",filename);
|
||||||
|
@ -268,7 +268,7 @@ public class UploadController {
|
||||||
return R.error("文件存储出现异常");
|
return R.error("文件存储出现异常");
|
||||||
|
|
||||||
}
|
}
|
||||||
String RealFilePath="http://localhost:8080/upload/resume/"+fileName;
|
String RealFilePath="http://aiinterviewersystem.kooldns.cn/upload/resume/"+fileName;
|
||||||
// ExecutorService pool= Executors.newCachedThreadPool();
|
// ExecutorService pool= Executors.newCachedThreadPool();
|
||||||
// pool.submit(new Runnable() {
|
// pool.submit(new Runnable() {
|
||||||
// @Override
|
// @Override
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.yzdx.AiInterviewer.controller.VxController;
|
package com.yzdx.AiInterviewer.controller.VxController;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.yzdx.AiInterviewer.comment.R;
|
import com.yzdx.AiInterviewer.comment.R;
|
||||||
import com.yzdx.AiInterviewer.entity.VxEntityDto.VxCompanyLikeDto;
|
import com.yzdx.AiInterviewer.entity.VxEntityDto.VxCompanyLikeDto;
|
||||||
import com.yzdx.AiInterviewer.entity.VxEntityDto.VxJobLikeDto;
|
import com.yzdx.AiInterviewer.entity.VxEntityDto.VxJobLikeDto;
|
||||||
|
@ -10,7 +11,9 @@ import com.yzdx.AiInterviewer.service.VxService.VxJobLikeService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/vxJob")
|
@RequestMapping("/vxJob")
|
||||||
|
@ -53,23 +56,22 @@ public class VxJobController {
|
||||||
return R.success("收藏成功");
|
return R.success("收藏成功");
|
||||||
|
|
||||||
}
|
}
|
||||||
@GetMapping("/searchJobList")
|
|
||||||
public R searchJobList(String searchName,String address){
|
@GetMapping("/VxSearch")
|
||||||
|
public R searchList(String searchName,String address){
|
||||||
|
|
||||||
|
|
||||||
List<VxJobLikeDto> VxJobLikeDtos = jobListService.searchJobList(searchName,address);
|
List<VxJobLikeDto> VxJobLikeDtos = jobListService.searchJobList(searchName,address);
|
||||||
|
|
||||||
return R.success(VxJobLikeDtos);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/searchCompanyList")
|
|
||||||
public R searchCompanyList(String searchName,String address){
|
|
||||||
|
|
||||||
|
|
||||||
List<VxCompanyLikeDto> VxCompanyLikeDtos = companyService.searchCompanyList(searchName,address);
|
List<VxCompanyLikeDto> VxCompanyLikeDtos = companyService.searchCompanyList(searchName,address);
|
||||||
|
|
||||||
return R.success(VxCompanyLikeDtos);
|
Map<String ,Object> result=new HashMap<>();
|
||||||
|
|
||||||
|
result.put("company",VxCompanyLikeDtos);
|
||||||
|
result.put("job",VxJobLikeDtos);
|
||||||
|
|
||||||
|
return R.success(result);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/vxUser")
|
@RequestMapping("/vxUser")
|
||||||
|
@ -59,6 +59,7 @@ public class VxUserController {
|
||||||
JSONObject json = new JSONObject(jsonString);
|
JSONObject json = new JSONObject(jsonString);
|
||||||
//json解析session_key值
|
//json解析session_key值
|
||||||
String session_key = json.getString("session_key");
|
String session_key = json.getString("session_key");
|
||||||
|
|
||||||
System.out.println("session_key:" + session_key);
|
System.out.println("session_key:" + session_key);
|
||||||
//返回给前端
|
//返回给前端
|
||||||
return R.success(session_key);
|
return R.success(session_key);
|
||||||
|
@ -136,7 +137,6 @@ public class VxUserController {
|
||||||
/**
|
/**
|
||||||
*更新简历
|
*更新简历
|
||||||
*/
|
*/
|
||||||
@ResponseBody
|
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "name",required = true),
|
@ApiImplicitParam(name = "name",required = true),
|
||||||
@ApiImplicitParam(name = "id",required = true),
|
@ApiImplicitParam(name = "id",required = true),
|
||||||
|
@ -184,7 +184,7 @@ public class VxUserController {
|
||||||
/**
|
/**
|
||||||
* 添加岗位期望
|
* 添加岗位期望
|
||||||
*/
|
*/
|
||||||
@ResponseBody
|
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "expectationType",required = true),
|
@ApiImplicitParam(name = "expectationType",required = true),
|
||||||
@ApiImplicitParam(name = "position",required = true),
|
@ApiImplicitParam(name = "position",required = true),
|
||||||
|
@ -211,7 +211,7 @@ public class VxUserController {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@GetMapping
|
@GetMapping("/getJobExpectation")
|
||||||
public R getJobExpectation(@ApiParam("Integer userId") Integer userId){
|
public R getJobExpectation(@ApiParam("Integer userId") Integer userId){
|
||||||
List<JobExpectation> list= resumeService.getJobExpectation(userId);
|
List<JobExpectation> list= resumeService.getJobExpectation(userId);
|
||||||
return R.success(list);
|
return R.success(list);
|
||||||
|
@ -228,7 +228,7 @@ public class VxUserController {
|
||||||
@ApiImplicitParam(name = "userId",required = true),
|
@ApiImplicitParam(name = "userId",required = true),
|
||||||
@ApiImplicitParam(name = "salary",required = true),
|
@ApiImplicitParam(name = "salary",required = true),
|
||||||
})
|
})
|
||||||
@PostMapping
|
@PostMapping("/updateJobExpectation")
|
||||||
public R updateJobExpectation(@RequestParam(required = true, value = "expectationType") Integer expectationType,
|
public R updateJobExpectation(@RequestParam(required = true, value = "expectationType") Integer expectationType,
|
||||||
@RequestParam(required = true, value = "position") String position,
|
@RequestParam(required = true, value = "position") String position,
|
||||||
@RequestParam(required = true, value = "id") Integer id,
|
@RequestParam(required = true, value = "id") Integer id,
|
||||||
|
@ -247,7 +247,7 @@ public class VxUserController {
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@DeleteMapping
|
@DeleteMapping("/deleteJobExpectation")
|
||||||
public R deleteJobExpectation(Integer id){
|
public R deleteJobExpectation(Integer id){
|
||||||
Integer rows= resumeService.deleteJobExpectation(id);
|
Integer rows= resumeService.deleteJobExpectation(id);
|
||||||
if(rows==-2){
|
if(rows==-2){
|
||||||
|
@ -272,6 +272,16 @@ public class VxUserController {
|
||||||
return R.success(VxCompanyLikeDtos);
|
return R.success(VxCompanyLikeDtos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/VxAdminLogin")
|
||||||
|
public R adminLogin(@RequestParam(required = true, value = "phone") String phone,
|
||||||
|
@RequestParam(required = true, value = "encoding") String encoding,
|
||||||
|
@RequestParam(required = true, value = "password") String password){
|
||||||
|
|
||||||
|
|
||||||
|
return userService.adminLogin(phone, encoding, password);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,8 @@ public class JobDto extends BaseEntity {
|
||||||
|
|
||||||
private Integer jobType;
|
private Integer jobType;
|
||||||
|
|
||||||
|
private String jobTips;
|
||||||
|
|
||||||
private String detail;
|
private String detail;
|
||||||
|
|
||||||
private String salary;
|
private String salary;
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
||||||
|
|
||||||
LambdaQueryWrapper<Company> queryWrapper=new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<Company> queryWrapper=new LambdaQueryWrapper<>();
|
||||||
|
|
||||||
queryWrapper.like(Company::getCompanyName,searchName).like(Company::getAddressDetail,address);
|
queryWrapper.like(Company::getCompanyName,searchName).like(Company::getAddress,address);
|
||||||
|
|
||||||
List<Company> companies = companyMapper.selectList(queryWrapper);
|
List<Company> companies = companyMapper.selectList(queryWrapper);
|
||||||
|
|
||||||
|
|
|
@ -89,6 +89,7 @@ public class JobListServiceImpl extends ServiceImpl<JobMapper, JobEntity> implem
|
||||||
jobDto.setCreateTime(item.getCreateTime());
|
jobDto.setCreateTime(item.getCreateTime());
|
||||||
jobDto.setUpdateUser(item.getUpdateUser());
|
jobDto.setUpdateUser(item.getUpdateUser());
|
||||||
jobDto.setUpdateTime(item.getUpdateTime());
|
jobDto.setUpdateTime(item.getUpdateTime());
|
||||||
|
jobDto.setJobTips(item.getJobTips());
|
||||||
return jobDto;
|
return jobDto;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
|
|
||||||
|
@ -289,6 +290,7 @@ public class JobListServiceImpl extends ServiceImpl<JobMapper, JobEntity> implem
|
||||||
|
|
||||||
List<JobEntity> jobEntities = jobMapper.selectList(queryWrapper);
|
List<JobEntity> jobEntities = jobMapper.selectList(queryWrapper);
|
||||||
|
|
||||||
|
|
||||||
List<VxJobLikeDto> vxJobLikeDtoList=jobEntities.stream().map(item->{
|
List<VxJobLikeDto> vxJobLikeDtoList=jobEntities.stream().map(item->{
|
||||||
VxJobLikeDto vxJobLikeDto=new VxJobLikeDto();
|
VxJobLikeDto vxJobLikeDto=new VxJobLikeDto();
|
||||||
|
|
||||||
|
@ -314,7 +316,6 @@ public class JobListServiceImpl extends ServiceImpl<JobMapper, JobEntity> implem
|
||||||
|
|
||||||
return vxJobLikeDtoList;
|
return vxJobLikeDtoList;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,10 @@ 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.comment.R;
|
import com.yzdx.AiInterviewer.comment.R;
|
||||||
import com.yzdx.AiInterviewer.entity.BlackToken;
|
import com.yzdx.AiInterviewer.entity.BlackToken;
|
||||||
|
import com.yzdx.AiInterviewer.entity.Company;
|
||||||
import com.yzdx.AiInterviewer.entity.User;
|
import com.yzdx.AiInterviewer.entity.User;
|
||||||
import com.yzdx.AiInterviewer.mapper.BlackTokenMapper;
|
import com.yzdx.AiInterviewer.mapper.BlackTokenMapper;
|
||||||
|
import com.yzdx.AiInterviewer.mapper.CompanyMapper;
|
||||||
import com.yzdx.AiInterviewer.mapper.UserMapper;
|
import com.yzdx.AiInterviewer.mapper.UserMapper;
|
||||||
import com.yzdx.AiInterviewer.service.UserService;
|
import com.yzdx.AiInterviewer.service.UserService;
|
||||||
import com.yzdx.AiInterviewer.utiles.JWT;
|
import com.yzdx.AiInterviewer.utiles.JWT;
|
||||||
|
@ -27,6 +29,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||||
private UserMapper userMapper;
|
private UserMapper userMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private BlackTokenMapper blackTokenMapper;
|
private BlackTokenMapper blackTokenMapper;
|
||||||
|
@Autowired
|
||||||
|
private CompanyMapper companyMapper;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -61,10 +65,18 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||||
|
|
||||||
selectUser.setPassword(null);
|
selectUser.setPassword(null);
|
||||||
selectUser.setSalt(null);
|
selectUser.setSalt(null);
|
||||||
|
|
||||||
|
LambdaQueryWrapper<Company> queryWrapper=new LambdaQueryWrapper<>();
|
||||||
|
|
||||||
|
queryWrapper.eq(Company::getEncoding,encoding);
|
||||||
|
|
||||||
|
Company company = companyMapper.selectOne(queryWrapper);
|
||||||
|
|
||||||
Map<String,Object> data=new HashMap<>();
|
Map<String,Object> data=new HashMap<>();
|
||||||
|
|
||||||
data.put("token",token);
|
data.put("token",token);
|
||||||
data.put("encoding",encoding);
|
data.put("encoding",encoding);
|
||||||
|
data.put("companyName",company.getCompanyName());
|
||||||
data.put("userInfo",selectUser);
|
data.put("userInfo",selectUser);
|
||||||
|
|
||||||
return R.success(data);
|
return R.success(data);
|
||||||
|
|
|
@ -3,9 +3,9 @@ server:
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://101.43.255.47:3306/ai_interviewer?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
|
url: jdbc:mysql://117.88.94.226:3306/ai_interviewer?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
|
||||||
username: Jerry
|
username: root
|
||||||
password: 2002811
|
password: Jerry
|
||||||
|
|
||||||
jackson:
|
jackson:
|
||||||
default-property-inclusion: non_null
|
default-property-inclusion: non_null
|
||||||
|
|
Loading…
Reference in New Issue