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