This commit is contained in:
parent
9bc8c14eda
commit
a10fcd998a
|
@ -25,7 +25,7 @@ public class UserInterceptor implements HandlerInterceptor {
|
|||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
|
||||
String Token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3MDMyMzQ0MzksInVzZXJpZCI6MTJ9.y_Vdnkk2HZMYLcnfHIOpwitkZArrcOQfQM2hb1ys5ZY";
|
||||
String Token = request.getHeader("Authorization");;
|
||||
|
||||
// 捕获刚刚JWT中抛出的异常,并封装对应的返回信息
|
||||
try {
|
||||
|
|
|
@ -51,7 +51,7 @@ public class InterviewController {
|
|||
/**
|
||||
* 添加公司Logo
|
||||
*/
|
||||
@ResponseBody
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "name",required = true),
|
||||
@ApiImplicitParam(name = "encoding",required = true),
|
||||
|
@ -61,11 +61,13 @@ public class InterviewController {
|
|||
})
|
||||
@PostMapping("/add_logo")
|
||||
@ApiOperation(value = "添加logo图片",notes = "")
|
||||
public R addLogo(@RequestParam(required = true, value = "name") String name,
|
||||
@RequestParam(required = true, value = "encoding") String encoding,
|
||||
@RequestParam(required = true, value = "image") String image,
|
||||
@RequestParam(required = true, value = "userId") Integer userId,
|
||||
@RequestParam(required = true, value = "filename") String filename){
|
||||
public R addLogo(@RequestBody Map<String,Object> addInfo){
|
||||
String name= (String)addInfo.get("name");
|
||||
String image= (String)addInfo.get("image");
|
||||
String encoding= (String)addInfo.get("encoding");
|
||||
Integer userId= (Integer)addInfo.get("userId");
|
||||
String filename= (String)addInfo.get("filename");
|
||||
|
||||
if(filename.equals("")){
|
||||
return R.error("请添加图片!");
|
||||
}
|
||||
|
@ -117,7 +119,7 @@ public class InterviewController {
|
|||
/**
|
||||
* 添加背景图片
|
||||
*/
|
||||
@ResponseBody
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "name",required = true),
|
||||
@ApiImplicitParam(name = "encoding",required = true),
|
||||
|
@ -127,11 +129,13 @@ public class InterviewController {
|
|||
})
|
||||
@PostMapping("/add_background")
|
||||
@ApiOperation(value = "添加背景图片",notes = "")
|
||||
public R addBackground(@RequestParam(required = true, value = "name") String name,
|
||||
@RequestParam(required = true, value = "encoding") String encoding,
|
||||
@RequestParam(required = true, value = "image") String image,
|
||||
@RequestParam(required = true, value = "userId") Integer userId,
|
||||
@RequestParam(required = true, value = "filename") String filename) {
|
||||
public R addBackground(@RequestBody Map<String,Object> addInfo) {
|
||||
String name= (String)addInfo.get("name");
|
||||
String image= (String)addInfo.get("image");
|
||||
String encoding= (String)addInfo.get("encoding");
|
||||
Integer userId= (Integer)addInfo.get("userId");
|
||||
String filename= (String)addInfo.get("filename");
|
||||
|
||||
if(filename.equals("")){
|
||||
return R.error("请添加图片!");
|
||||
}
|
||||
|
@ -183,7 +187,7 @@ public class InterviewController {
|
|||
/**
|
||||
* 添加面试官形象照片
|
||||
*/
|
||||
@ResponseBody
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "name",required = true),
|
||||
@ApiImplicitParam(name = "encoding",required = true),
|
||||
|
@ -193,13 +197,14 @@ public class InterviewController {
|
|||
})
|
||||
@PostMapping("/add_image")
|
||||
@ApiOperation(value = "添加面试管形象",notes = "")
|
||||
public R addImage(@RequestParam(required = true, value = "name") String name,
|
||||
@RequestParam(required = true, value = "encoding") String encoding,
|
||||
@RequestParam(required = true, value = "image") String image,
|
||||
@RequestParam(required = true, value = "userId") Integer userId,
|
||||
@RequestParam(required = true, value = "filename") String filename,
|
||||
@RequestParam(required = true, value = "video") String video,
|
||||
@RequestParam(required = true, value = "sex") String sex) {
|
||||
public R addImage(@RequestBody Map<String,Object> addInfo) {
|
||||
String name= (String)addInfo.get("name");
|
||||
String image= (String)addInfo.get("image");
|
||||
String encoding= (String)addInfo.get("encoding");
|
||||
Integer userId= (Integer)addInfo.get("userId");
|
||||
String filename= (String)addInfo.get("filename");
|
||||
String video= (String)addInfo.get("video");
|
||||
String sex= (String)addInfo.get("sex");
|
||||
|
||||
if(filename.equals("")){
|
||||
return R.error("请添加图片!");
|
||||
|
|
|
@ -84,7 +84,7 @@ public class QuestionController {
|
|||
/**
|
||||
* 添加题库信息
|
||||
* */
|
||||
@ResponseBody
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "typeName",required = true),
|
||||
@ApiImplicitParam(name = "encoding",required = true),
|
||||
|
@ -94,13 +94,16 @@ public class QuestionController {
|
|||
})
|
||||
@PostMapping("/add_typeName")
|
||||
@ApiOperation(value = "根据编码获取logo图片列表",notes = "")
|
||||
public R addTypeName(@RequestParam(required = true, value = "typeName") String typeName,
|
||||
@RequestParam(required = true, value = "encoding") String encoding,
|
||||
@RequestParam(required = true, value = "type") Integer type,
|
||||
@RequestParam(required = true, value = "userId") Integer userId,
|
||||
@RequestParam(required = true, value = "description") String description)
|
||||
{
|
||||
if (type==null){
|
||||
public R addTypeName(@RequestBody Map<String,Object> addInfo) {
|
||||
|
||||
String typeName=(String) addInfo.get("typeName");
|
||||
String encoding=(String) addInfo.get("encoding");
|
||||
String description=(String) addInfo.get("description");
|
||||
Integer type=(Integer) addInfo.get("type");
|
||||
Integer userId=(Integer) addInfo.get("userId");
|
||||
|
||||
|
||||
if (type==null){
|
||||
return R.error("请选择添加的题库类型");
|
||||
}
|
||||
Integer row=questionBankService.addTypeName(typeName,encoding,description,type,userId);
|
||||
|
@ -137,7 +140,7 @@ public class QuestionController {
|
|||
/**
|
||||
* 根据题库id更新题库
|
||||
* */
|
||||
@ResponseBody
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "typeName",required = true),
|
||||
@ApiImplicitParam(name = "typeId",required = true),
|
||||
|
@ -147,11 +150,13 @@ public class QuestionController {
|
|||
})
|
||||
@PostMapping("/change_type")
|
||||
@ApiOperation(value = "根据编码获取logo图片列表",notes = "")
|
||||
public R changeTypeName(@RequestParam(required = true, value = "typeName") String typeName,
|
||||
@RequestParam(required = true, value = "typeId") Integer typeId,
|
||||
@RequestParam(required = true, value = "type") Integer type,
|
||||
@RequestParam(required = true, value = "userId") Integer userId,
|
||||
@RequestParam(required = true, value = "description") String description){
|
||||
public R changeTypeName(@RequestBody Map<String,Object> updateInfo){
|
||||
|
||||
String typeName=(String) updateInfo.get("typeName");
|
||||
Integer typeId=(Integer) updateInfo.get("typeId");
|
||||
String description=(String) updateInfo.get("description");
|
||||
Integer type=(Integer) updateInfo.get("type");
|
||||
Integer userId=(Integer) updateInfo.get("userId");
|
||||
|
||||
if (type==null){
|
||||
return R.error("请选择题库类型");
|
||||
|
@ -206,7 +211,7 @@ public class QuestionController {
|
|||
/**
|
||||
* 添加题目
|
||||
* */
|
||||
@ResponseBody
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "title",required = true),
|
||||
@ApiImplicitParam(name = "bankId",required = true),
|
||||
|
@ -217,12 +222,13 @@ public class QuestionController {
|
|||
})
|
||||
@PostMapping("add_question")
|
||||
@ApiOperation(value = "添加题目",notes = "")
|
||||
public R addQuestion(@RequestParam(required = true, value = "title") String title,
|
||||
@RequestParam(required = true, value = "bankId") Integer bankId,
|
||||
@RequestParam(required = true, value = "promote") String promote,
|
||||
@RequestParam(required = true, value = "userId") Integer userId,
|
||||
@RequestParam(required = true, value = "encoding") String encoding,
|
||||
@RequestParam(required = true, value = "details") String details){
|
||||
public R addQuestion(@RequestBody Map<String,Object> addInfo){
|
||||
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 encoding=(String) addInfo.get("encoding");
|
||||
Integer userId=(Integer) addInfo.get("userId");
|
||||
|
||||
Integer rows = questionService.addQuestion(title, bankId, details, promote, encoding, userId);
|
||||
|
||||
|
@ -238,7 +244,6 @@ public class QuestionController {
|
|||
/**
|
||||
* 修改题目
|
||||
* */
|
||||
@ResponseBody
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "title",required = true),
|
||||
@ApiImplicitParam(name = "id",required = true),
|
||||
|
@ -251,14 +256,14 @@ public class QuestionController {
|
|||
@PostMapping("update_question")
|
||||
@ApiOperation(value = "更新题目",notes = "")
|
||||
|
||||
public R updateQuestion(@RequestParam(required = true, value = "title") String title,
|
||||
@RequestParam(required = true, value = "id") Integer id,
|
||||
@RequestParam(required = true, value = "bankId") Integer bankId,
|
||||
@RequestParam(required = true, value = "promote") String promote,
|
||||
@RequestParam(required = true, value = "userId") Integer userId,
|
||||
@RequestParam(required = true, value = "encoding") String encoding,
|
||||
@RequestParam(required = true, value = "details") String details){
|
||||
|
||||
public R updateQuestion(@RequestBody Map<String,Object> updateInfo){
|
||||
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 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);
|
||||
|
||||
if(rows==0){
|
||||
|
@ -293,7 +298,7 @@ public class QuestionController {
|
|||
List<SharedQuestionBankDto> sharedQuestionBank = sharedQuestionBankService.getSharedQuestionBank();
|
||||
return R.success(sharedQuestionBank);
|
||||
}
|
||||
@ResponseBody
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "typeName",required = true),
|
||||
@ApiImplicitParam(name = "type",required = true),
|
||||
|
@ -303,12 +308,12 @@ public class QuestionController {
|
|||
})
|
||||
@PostMapping("/add_sharedQuestionBank")
|
||||
@ApiOperation(value = "添加分享题目",notes = "")
|
||||
public R addSharedQuestionType(@RequestParam(required = true, value = "typeName") String typeName,
|
||||
@RequestParam(required = true, value = "type") Integer type,
|
||||
@RequestParam(required = true, value = "description") String description,
|
||||
@RequestParam(required = true, value = "userId") Integer userId,
|
||||
@RequestParam(required = true, value = "encoding") String encoding){
|
||||
|
||||
public R addSharedQuestionType(@RequestBody Map<String,Object> addInfo){
|
||||
String typeName=(String) addInfo.get("typeName");
|
||||
Integer type=(Integer) addInfo.get("type");
|
||||
String description=(String) addInfo.get("description");
|
||||
String encoding=(String) addInfo.get("encoding");
|
||||
Integer userId=(Integer) addInfo.get("userId");
|
||||
SharedQuestionBank sharedQuestionBank = sharedQuestionBankService.addSharedQuestionBank(typeName, type, description, userId,encoding);
|
||||
|
||||
if(sharedQuestionBank==null){
|
||||
|
@ -334,7 +339,7 @@ public class QuestionController {
|
|||
return R.success(sharedQuestionList);
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "sharedBankId",required = true),
|
||||
@ApiImplicitParam(name = "selectQuestionId",required = true),
|
||||
|
@ -343,10 +348,11 @@ public class QuestionController {
|
|||
})
|
||||
@PostMapping("/add_sharedQuestion")
|
||||
@ApiOperation(value = "添加分享的题目",notes = "")
|
||||
public R addSharedQuestion(@RequestParam(required = true, value = "sharedBankId") Integer sharedBankId,
|
||||
@RequestParam(required = true, value = "selectQuestionId") List<Integer> selectQuestionId,
|
||||
@RequestParam(required = true, value = "userId") Integer userId,
|
||||
@RequestParam(required = true, value = "encoding") String encoding){
|
||||
public R addSharedQuestion(@RequestBody Map<String,Object> addInfo){
|
||||
Integer sharedBankId=(Integer) addInfo.get("sharedBankId");
|
||||
List<Integer> selectQuestionId=(List<Integer>) addInfo.get("selectQuestionId");
|
||||
String encoding=(String) addInfo.get("encoding");
|
||||
Integer userId=(Integer) addInfo.get("userId");
|
||||
String result = sharedQuestionService.addSharedQuestions(sharedBankId, selectQuestionId, userId,encoding);
|
||||
|
||||
if(result.equals("已存在添加题库中")){
|
||||
|
@ -367,7 +373,7 @@ public class QuestionController {
|
|||
return R.success(sharedQuestionDtos);
|
||||
|
||||
}
|
||||
@ResponseBody
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "sharedBankIds",required = true),
|
||||
@ApiImplicitParam(name = "userId",required = true),
|
||||
|
@ -375,9 +381,11 @@ public class QuestionController {
|
|||
})
|
||||
@PostMapping("/add_QuestionBankFromShare")
|
||||
@ApiOperation(value = "从题库广场中导入到本地",notes = "")
|
||||
public R addQuestionBankFromShare(@RequestParam(required = true, value = "sharedBankIds") List<Integer> sharedBankIds,
|
||||
@RequestParam(required = true, value = "userId") Integer userId,
|
||||
@RequestParam(required = true, value = "encoding") String encoding){
|
||||
public R addQuestionBankFromShare(@RequestBody Map<String,Object> addInfo){
|
||||
List<Integer>sharedBankIds =(List<Integer>)addInfo.get("sharedBankIds");
|
||||
Integer userId=(Integer)addInfo.get("userId");
|
||||
String encoding=(String) addInfo.get("encoding");
|
||||
|
||||
String result=sharedQuestionBankService.addQuestionTypeFromShare(sharedBankIds,userId,encoding);
|
||||
|
||||
if(result.equals("题库:/n题目:已存在添加题库中")){
|
||||
|
@ -385,7 +393,7 @@ public class QuestionController {
|
|||
}
|
||||
return R.error(result);
|
||||
}
|
||||
@ResponseBody
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "selectSharedQuestionIds",required = true),
|
||||
@ApiImplicitParam(name = "userId",required = true),
|
||||
|
@ -394,10 +402,12 @@ public class QuestionController {
|
|||
})
|
||||
@PostMapping("/add_QuestionFromShare")
|
||||
@ApiOperation(value = "从题目广场中导入到本地",notes = "")
|
||||
public R addQuestionFromShare(@RequestParam(required = true, value = "selectSharedQuestionIds") List<Integer> selectSharedQuestionIds,
|
||||
@RequestParam(required = true, value = "userId") Integer userId,
|
||||
@RequestParam(required = true, value = "bankId") Integer bankId,
|
||||
@RequestParam(required = true, value = "encoding") String encoding){
|
||||
public R addQuestionFromShare(@RequestBody Map<String,Object> addInfo){
|
||||
List<Integer>selectSharedQuestionIds =(List<Integer>)addInfo.get("selectSharedQuestionIds");
|
||||
Integer userId=(Integer)addInfo.get("userId");
|
||||
String encoding=(String) addInfo.get("encoding");
|
||||
Integer bankId=(Integer) addInfo.get("bankId");
|
||||
|
||||
String result=sharedQuestionService.addQuestionFromShare(selectSharedQuestionIds,bankId,userId,encoding);
|
||||
if(result.equals("题目:已添加到题目中")){
|
||||
return R.success("添加成功");
|
||||
|
@ -417,7 +427,7 @@ public class QuestionController {
|
|||
return R.success(sharedQuestionBankDtoList);
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id",required = true),
|
||||
@ApiImplicitParam(name = "userId",required = true),
|
||||
|
@ -427,11 +437,12 @@ public class QuestionController {
|
|||
})
|
||||
@PostMapping("/edit_OurSharedQuestionType")
|
||||
@ApiOperation(value = "修改我的分享题库",notes = "")
|
||||
public R editOurSharedQuestionType(@RequestParam(required = true, value = "id") Integer id,
|
||||
@RequestParam(required = true, value = "typeName") String typeName,
|
||||
@RequestParam(required = true, value = "description") String description,
|
||||
@RequestParam(required = true, value = "type") Integer type,
|
||||
@RequestParam(required = true, value = "userId") Integer userId) {
|
||||
public R editOurSharedQuestionType(@RequestBody Map<String,Object> updateInfo) {
|
||||
Integer userId=(Integer)updateInfo.get("userId");
|
||||
String typeName=(String) updateInfo.get("typeName");
|
||||
Integer type=(Integer) updateInfo.get("type");
|
||||
Integer id=(Integer) updateInfo.get("id");
|
||||
String description=(String) updateInfo.get("description");
|
||||
Integer rows = sharedQuestionBankService.editOurSharedQuestionType(id, typeName, description, type, userId);
|
||||
if (rows != 1) {
|
||||
return R.error("修改失败");
|
||||
|
@ -460,20 +471,20 @@ public class QuestionController {
|
|||
return R.success(sharedQuestionDtoList);
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "sharedQuestionId",required = true),
|
||||
|
||||
})
|
||||
@PostMapping("/delete_OurSharedQuestion")
|
||||
@ApiOperation(value = "删除我的分享题目",notes = "")
|
||||
public R deleteOurSharedQuestion(@RequestParam(required = true, value = "sharedQuestionId") List<Integer> sharedQuestionId)
|
||||
{
|
||||
public R deleteOurSharedQuestion(@RequestBody Map<String,Object> deleteInfo) {
|
||||
List<Integer> sharedQuestionId=(List<Integer>) deleteInfo.get("sharedQuestionId");
|
||||
|
||||
Integer rows= sharedQuestionService.deleteOurSharedQuestion(sharedQuestionId);
|
||||
return R.success("删除成功,删除"+rows+"分享题目");
|
||||
}
|
||||
@ResponseBody
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id",required = true),
|
||||
@ApiImplicitParam(name = "title",required = true),
|
||||
|
@ -484,12 +495,13 @@ public class QuestionController {
|
|||
})
|
||||
@PostMapping("/update_OurSharedQuestion")
|
||||
@ApiOperation(value = "更新我的分享题目",notes = "")
|
||||
public R updateOurSharedQuestion(@RequestParam(required = true, value = "id") Integer id,
|
||||
@RequestParam(required = true, value = "title") String title,
|
||||
@RequestParam(required = true, value = "details") String details,
|
||||
@RequestParam(required = true, value = "promote") String promote,
|
||||
@RequestParam(required = true, value = "bankId") Integer bankId,
|
||||
@RequestParam(required = true, value = "userId") Integer userId){
|
||||
public R updateOurSharedQuestion(@RequestBody Map<String,Object> updateInfo){
|
||||
Integer userId=(Integer)updateInfo.get("userId");
|
||||
String promote=(String) updateInfo.get("promote");
|
||||
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);
|
||||
|
||||
if(rows==1){
|
||||
|
|
|
@ -24,7 +24,6 @@ public class RecruitmentController {
|
|||
private InterviewSettingService interviewSettingService;
|
||||
@Autowired
|
||||
private CompanyService companyService;
|
||||
@ResponseBody
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "address",required = true),
|
||||
@ApiImplicitParam(name = "addressDetail",required = true),
|
||||
|
@ -44,23 +43,25 @@ public class RecruitmentController {
|
|||
})
|
||||
@PostMapping("/add_job")
|
||||
@ApiOperation(value = "添加岗位",notes = "")
|
||||
public R addJob(@RequestParam(required = true, value = "address") List<String> address,
|
||||
@RequestParam(required = true, value = "addressDetail") String address_detail,
|
||||
@RequestParam(required = true, value = "details") String details,
|
||||
@RequestParam(required = true, value = "jobName") String jobName,
|
||||
@RequestParam(required = true, value = "startTime") String startTime,
|
||||
@RequestParam(required = true, value = "endTime") String endTime,
|
||||
@RequestParam(required = true, value = "jobTips") List<String> jobTips,
|
||||
@RequestParam(required = true, value = "jobType") Integer jobType,
|
||||
@RequestParam(required = true, value = "minSalary") String min_salary,
|
||||
@RequestParam(required = true, value = "maxSalary") String max_salary,
|
||||
@RequestParam(required = true, value = "minNumber") String min_number,
|
||||
@RequestParam(required = true, value = "maxNumber") String max_number,
|
||||
@RequestParam(required = true, value = "requirement") Integer requirement,
|
||||
@RequestParam(required = true, value = "userId") Integer userId,
|
||||
@RequestParam(required = true, value = "encoding") String encoding){
|
||||
public R addJob(@RequestBody Map<String,Object> addInfo){
|
||||
List<String> address=(List<String>) addInfo.get("address");
|
||||
String encoding=(String) addInfo.get("encoding");
|
||||
String address_detail=(String) addInfo.get("address_detail");
|
||||
Integer jobType=(Integer) addInfo.get("jobType");
|
||||
Integer userId=(Integer) addInfo.get("userId");
|
||||
String details=(String) addInfo.get("details");
|
||||
String jobName=(String) addInfo.get("jobName");
|
||||
String startTime=(String) addInfo.get("startTime");
|
||||
String endTime=(String) addInfo.get("endTime");
|
||||
String min_salary=(String) addInfo.get("min_salary");
|
||||
String max_salary=(String) addInfo.get("max_salary");
|
||||
String min_number=(String) addInfo.get("min_number");
|
||||
String max_number=(String) addInfo.get("max_number");
|
||||
List<String> jobTips=(List<String>) addInfo.get("jobTips");
|
||||
Integer requirement=(Integer) addInfo.get("requirement");
|
||||
|
||||
Integer rows=jobListService.addJob(address,address_detail,details,jobName,startTime,endTime,jobTips,jobType,min_salary,max_salary,min_number,max_number,requirement,userId,encoding);
|
||||
Integer rows=jobListService.addJob(address,address_detail,details,jobName,startTime,endTime,
|
||||
jobTips,jobType,min_salary,max_salary,min_number,max_number,requirement,userId,encoding);
|
||||
|
||||
if(rows==-2){
|
||||
return R.error("岗位名称已存在!");
|
||||
|
@ -104,7 +105,9 @@ public class RecruitmentController {
|
|||
return R.success(jobById);
|
||||
|
||||
}
|
||||
@ResponseBody
|
||||
|
||||
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id",required = true),
|
||||
@ApiImplicitParam(name = "address",required = true),
|
||||
|
@ -125,23 +128,24 @@ public class RecruitmentController {
|
|||
})
|
||||
@PostMapping("/update_job")
|
||||
@ApiOperation(value = "更新岗位信息",notes = "")
|
||||
public R updateJob(@RequestParam(required = true, value = "id") Integer id,
|
||||
@RequestParam(required = true, value = "address") List<String> address,
|
||||
@RequestParam(required = true, value = "address_detail") String address_detail,
|
||||
@RequestParam(required = true, value = "details") String details,
|
||||
@RequestParam(required = true, value = "jobName") String jobName,
|
||||
@RequestParam(required = true, value = "startTime") String startTime,
|
||||
@RequestParam(required = true, value = "endTime") String endTime,
|
||||
@RequestParam(required = true, value = "jobTips") List<String> jobTips,
|
||||
@RequestParam(required = true, value = "jobType") Integer jobType,
|
||||
@RequestParam(required = true, value = "min_salary") String min_salary,
|
||||
@RequestParam(required = true, value = "maxSalary") String max_salary,
|
||||
@RequestParam(required = true, value = "min_number") String min_number,
|
||||
@RequestParam(required = true, value = "requirement") Integer requirement,
|
||||
@RequestParam(required = true, value = "max_number") String max_number,
|
||||
@RequestParam(required = true, value = "userId") Integer userId,
|
||||
@RequestParam(required = true, value = "encoding") String encoding
|
||||
){
|
||||
public R updateJob(@RequestBody Map<String,Object> updateInfo){
|
||||
Integer id=(Integer) updateInfo.get("id");
|
||||
List<String> address=(List<String>) updateInfo.get("address");
|
||||
String encoding=(String) updateInfo.get("encoding");
|
||||
String address_detail=(String) updateInfo.get("address_detail");
|
||||
Integer jobType=(Integer) updateInfo.get("jobType");
|
||||
Integer userId=(Integer) updateInfo.get("userId");
|
||||
String details=(String) updateInfo.get("details");
|
||||
String jobName=(String) updateInfo.get("jobName");
|
||||
String startTime=(String) updateInfo.get("startTime");
|
||||
String endTime=(String) updateInfo.get("endTime");
|
||||
String min_salary=(String) updateInfo.get("min_salary");
|
||||
String max_salary=(String) updateInfo.get("max_salary");
|
||||
String min_number=(String) updateInfo.get("min_number");
|
||||
String max_number=(String) updateInfo.get("max_number");
|
||||
List<String> jobTips=(List<String>) updateInfo.get("jobTips");
|
||||
Integer requirement=(Integer) updateInfo.get("requirement");
|
||||
|
||||
Integer rows=jobListService.updateJob(id,address,address_detail,details,jobName,startTime,endTime,jobTips,jobType,min_salary,max_salary,min_number,max_number,requirement,userId,encoding);
|
||||
|
||||
if (rows==-1){
|
||||
|
@ -154,7 +158,7 @@ public class RecruitmentController {
|
|||
return R.success("修改岗位成功");
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id",required = true),
|
||||
@ApiImplicitParam(name = "userId",required = true),
|
||||
|
@ -162,9 +166,9 @@ public class RecruitmentController {
|
|||
@PostMapping("/update_jobStatus")
|
||||
@ApiOperation(value = "更新岗位状态",notes = "")
|
||||
|
||||
public R changeJobStatus( @RequestParam(required = true, value = "id") Integer id,
|
||||
@RequestParam(required = true, value = "userId") Integer userId
|
||||
){
|
||||
public R changeJobStatus(@RequestBody Map<String,Object> updateInfo){
|
||||
Integer id=(Integer) updateInfo.get("id");
|
||||
Integer userId=(Integer) updateInfo.get("userId");
|
||||
Integer row = jobListService.changeJobStatus(id, userId);
|
||||
|
||||
if (row==-1){
|
||||
|
@ -188,7 +192,6 @@ public class RecruitmentController {
|
|||
}
|
||||
return R.success("删除岗位成功!");
|
||||
}
|
||||
@ResponseBody
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "jobId",required = true),
|
||||
@ApiImplicitParam(name = "imagesId",required = true),
|
||||
|
@ -203,18 +206,21 @@ public class RecruitmentController {
|
|||
})
|
||||
@PostMapping("/add_jobSetting")
|
||||
@ApiOperation(value = "添加面试设置",notes = "")
|
||||
public R addJobSetting(@RequestParam(required = true, value = "jobId") Integer jobId,
|
||||
@RequestParam(required = true, value = "imagesId") Integer imagesId,
|
||||
@RequestParam(required = true, value = "backgroundId") Integer backgroundId,
|
||||
@RequestParam(required = true, value = "logoId") Integer logoId,
|
||||
@RequestParam(required = true, value = "Professional") Integer Professional,
|
||||
@RequestParam(required = true, value = "Comprehensive") Integer Comprehensive,
|
||||
@RequestParam(required = true, value = "Psychology") Integer Psychology,
|
||||
@RequestParam(required = true, value = "userId") Integer userId,
|
||||
@RequestParam(required = true, value = "jobPromote") String jobPromote,
|
||||
@RequestParam(required = true, value = "encoding") String encoding
|
||||
){
|
||||
Integer rows = interviewSettingService.addJobSetting(jobId, imagesId, backgroundId, logoId, Professional, Comprehensive, Psychology, userId, jobPromote, encoding);
|
||||
public R addJobSetting(@RequestBody Map<String,Object> addInfo){
|
||||
String encoding=(String) addInfo.get("encoding");
|
||||
Integer jobId=(Integer) addInfo.get("jobId");
|
||||
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");
|
||||
|
||||
Integer rows = interviewSettingService.addJobSetting(jobId, imagesId, backgroundId, logoId, Professional, Comprehensive,
|
||||
Psychology, userId, jobPromote, encoding);
|
||||
|
||||
if(rows==-1){
|
||||
return R.error("添加设置失败,岗位的设置已存在!");
|
||||
|
@ -248,7 +254,7 @@ public class RecruitmentController {
|
|||
}
|
||||
return R.success("删除成功!");
|
||||
}
|
||||
@ResponseBody
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "jobId",required = true),
|
||||
@ApiImplicitParam(name = "id",required = true),
|
||||
|
@ -264,20 +270,21 @@ public class RecruitmentController {
|
|||
})
|
||||
@PostMapping("/update_jobJobSetting")
|
||||
@ApiOperation(value = "更新面试设置",notes = "")
|
||||
public R updateJobSetting(@RequestParam(required = true, value = "id") Integer id,
|
||||
@RequestParam(required = true, value = "jobId") Integer jobId,
|
||||
@RequestParam(required = true, value = "imagesId") Integer imagesId,
|
||||
@RequestParam(required = true, value = "backgroundId") Integer backgroundId,
|
||||
@RequestParam(required = true, value = "logoId") Integer logoId,
|
||||
@RequestParam(required = true, value = "Professional") Integer Professional,
|
||||
@RequestParam(required = true, value = "Comprehensive") Integer Comprehensive,
|
||||
@RequestParam(required = true, value = "Psychology") Integer Psychology,
|
||||
@RequestParam(required = true, value = "userId") Integer userId,
|
||||
@RequestParam(required = true, value = "jobPromote") String jobPromote,
|
||||
@RequestParam(required = true, value = "encoding") String encoding){
|
||||
public R updateJobSetting(@RequestBody Map<String,Object> updateInfo){
|
||||
String encoding=(String) updateInfo.get("encoding");
|
||||
Integer jobId=(Integer) updateInfo.get("jobId");
|
||||
Integer imagesId=(Integer) updateInfo.get("imagesId");
|
||||
Integer backgroundId=(Integer) updateInfo.get("backgroundId");
|
||||
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");
|
||||
String jobPromote=(String) updateInfo.get("jobPromote");
|
||||
|
||||
|
||||
Integer rows= interviewSettingService.updateJobSetting(id,jobId, imagesId, backgroundId, logoId, Professional, Comprehensive, Psychology, userId, jobPromote, encoding);
|
||||
Integer rows= interviewSettingService.updateJobSetting(id,jobId, imagesId, backgroundId, logoId,
|
||||
Professional, Comprehensive, Psychology, userId, jobPromote, encoding);
|
||||
|
||||
if(rows==-1){
|
||||
return R.error("修改失败");
|
||||
|
@ -301,7 +308,7 @@ public class RecruitmentController {
|
|||
}
|
||||
return R.success(companyDetail);
|
||||
}
|
||||
@ResponseBody
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "jobId",required = true),
|
||||
@ApiImplicitParam(name = "id",required = true),
|
||||
|
@ -317,25 +324,30 @@ public class RecruitmentController {
|
|||
})
|
||||
@PostMapping("/update_companyDetail")
|
||||
@ApiOperation(value = "更新公司详情",notes = "")
|
||||
public R UpdateCompanyDetail(@RequestParam(required = true, value = "address") List<String> address,
|
||||
@RequestParam(required = true, value = "addressDetail") String addressDetail,
|
||||
@RequestParam(required = true, value = "companyDetail") String companyDetail,
|
||||
@RequestParam(required = true, value = "companyName") String companyName,
|
||||
@RequestParam(required = true, value = "creditCode") String creditCode,
|
||||
@RequestParam(required = true, value = "established") String established,
|
||||
@RequestParam(required = true, value = "images") String images,
|
||||
@RequestParam(required = true, value = "legalRepresentative") String legalRepresentative,
|
||||
@RequestParam(required = true, value = "treatment") String treatment,
|
||||
@RequestParam(required = true, value = "registeredCapital") String registeredCapital,
|
||||
@RequestParam(required = true, value = "userId") Integer userId,
|
||||
@RequestParam(required = true, value = "encoding") String encoding){
|
||||
public R UpdateCompanyDetail(@RequestBody Map<String,Object> updateInfo){
|
||||
String encoding=(String) updateInfo.get("encoding");
|
||||
List<String> address=(List<String>) updateInfo.get("address");
|
||||
Integer userId=(Integer) updateInfo.get("userId");
|
||||
String addressDetail=(String) updateInfo.get("addressDetail");
|
||||
String companyDetail=(String) updateInfo.get("companyDetail");
|
||||
String companyName=(String) updateInfo.get("companyName");
|
||||
String creditCode=(String) updateInfo.get("creditCode");
|
||||
String established=(String) updateInfo.get("established");
|
||||
String legalRepresentative=(String) updateInfo.get("legalRepresentative");
|
||||
String treatment=(String) updateInfo.get("treatment");
|
||||
String registeredCapital=(String) updateInfo.get("registeredCapital");
|
||||
String images=(String) updateInfo.get("images");
|
||||
String companyLogo=(String) updateInfo.get("companyLogo");
|
||||
String staffNumber=(String) updateInfo.get("staffNumber");
|
||||
|
||||
Integer row = companyService.updateCompanyDetail(address.toString(), addressDetail,
|
||||
|
||||
|
||||
Integer row = companyService.updateCompanyDetail(address.toString(), addressDetail,
|
||||
companyDetail, companyName,
|
||||
creditCode, encoding, established,
|
||||
images, legalRepresentative,
|
||||
treatment, registeredCapital, userId
|
||||
);
|
||||
treatment, registeredCapital, userId,
|
||||
companyLogo,staffNumber);
|
||||
if (row==-1){
|
||||
return R.error("更新失败");
|
||||
}
|
||||
|
|
|
@ -2,8 +2,6 @@ package com.yzdx.AiInterviewer.controller;
|
|||
|
||||
|
||||
import com.yzdx.AiInterviewer.comment.R;
|
||||
import com.yzdx.AiInterviewer.utiles.ParseResumeUtil;
|
||||
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
@ -11,13 +9,11 @@ import io.swagger.annotations.ApiParam;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
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 java.util.*;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
|
||||
|
||||
@RestController
|
||||
|
@ -98,7 +94,7 @@ public class UploadController {
|
|||
return R.error("文件存储出现异常");
|
||||
|
||||
}
|
||||
String RealFilePath="http://117.88.94.226:8080/upload/picture/"+filename;
|
||||
String RealFilePath="http://localhost:8080/upload/picture/"+filename;
|
||||
Map<String,Object> data=new HashMap<>();
|
||||
data.put("image",RealFilePath);
|
||||
data.put("filename",filename);
|
||||
|
@ -159,7 +155,7 @@ public class UploadController {
|
|||
|
||||
}
|
||||
|
||||
String RealFilePath="http://117.88.94.226:8080/upload/video/"+filename;
|
||||
String RealFilePath="http://localhost:8080/upload/video/"+filename;
|
||||
Map<String,Object> data=new HashMap<>();
|
||||
data.put("video",RealFilePath);
|
||||
data.put("filename",filename);
|
||||
|
@ -232,6 +228,7 @@ public class UploadController {
|
|||
* @param file
|
||||
* @return R
|
||||
*/
|
||||
@ResponseBody
|
||||
@PostMapping("/upload_resume")
|
||||
@ApiOperation(value = "上传简历",notes = "")
|
||||
|
||||
|
@ -271,16 +268,15 @@ public class UploadController {
|
|||
return R.error("文件存储出现异常");
|
||||
|
||||
}
|
||||
String RealFilePath="http://117.88.94.226:8080/upload/resume/"+fileName;
|
||||
ExecutorService pool= Executors.newCachedThreadPool();
|
||||
pool.submit(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
ParseResumeUtil.ParseChineseResume( request.getSession().getServletContext().getRealPath("/upload/resume/")+"\\"+fileName);
|
||||
}
|
||||
});
|
||||
|
||||
String RealFilePath="http://localhost:8080/upload/resume/"+fileName;
|
||||
// ExecutorService pool= Executors.newCachedThreadPool();
|
||||
// pool.submit(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
//
|
||||
// ParseResumeUtil.ParseChineseResume( request.getSession().getServletContext().getRealPath("/upload/resume/")+"\\"+fileName);
|
||||
// }
|
||||
// });
|
||||
|
||||
Map<String,Object> data=new HashMap<>();
|
||||
data.put("resume",RealFilePath);
|
||||
|
@ -321,5 +317,6 @@ public class UploadController {
|
|||
}
|
||||
}
|
||||
}
|
||||
//-------------------------------------vxUpLoad-----------------------
|
||||
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public class UserController {
|
|||
/**
|
||||
* 用户登录
|
||||
* */
|
||||
@ResponseBody
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "phone",required = true),
|
||||
@ApiImplicitParam(name = "encoding",required = true),
|
||||
|
@ -29,12 +29,11 @@ public class UserController {
|
|||
})
|
||||
@ApiOperation(value = "管理员登录",notes = "")
|
||||
@PostMapping("/login")
|
||||
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);
|
||||
public R adminLogin(@RequestBody Map<String ,Object> loginForm){
|
||||
String phone=(String)loginForm.get("phone");
|
||||
String encoding=(String)loginForm.get("encoding");
|
||||
String password=(String)loginForm.get("password");
|
||||
return userService.adminLogin(phone, encoding, password);
|
||||
}
|
||||
|
||||
|
||||
|
@ -127,7 +126,7 @@ public class UserController {
|
|||
/**
|
||||
* 添加管理员
|
||||
*/
|
||||
@ResponseBody
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "username",required = true),
|
||||
@ApiImplicitParam(name = "encoding",required = true),
|
||||
|
@ -137,11 +136,13 @@ public class UserController {
|
|||
})
|
||||
@PostMapping("/add_admin")
|
||||
@ApiOperation(value = "添加管理员",notes = "")
|
||||
public R addAdmin(@RequestParam(required = true, value = "username") String username,
|
||||
@RequestParam(required = true, value = "encoding") String encoding,
|
||||
@RequestParam(required = true, value = "phone") String phone,
|
||||
@RequestParam(required = true, value = "userId") Integer userId,
|
||||
@RequestParam(required = true, value = "role") String role){
|
||||
public R addAdmin(@RequestBody Map<String,Object> addInfo){
|
||||
String encoding=(String)addInfo.get("encoding");
|
||||
Integer userId=(Integer)addInfo.get("userId");
|
||||
String phone=(String)addInfo.get("phone");
|
||||
String username=(String)addInfo.get("username");
|
||||
String role=(String)addInfo.get("role");
|
||||
|
||||
Integer rows = userService.addAdmin(encoding, userId, username, phone, role);
|
||||
|
||||
if(rows==-2){
|
||||
|
@ -185,7 +186,7 @@ public class UserController {
|
|||
/**
|
||||
* 更换头像
|
||||
*/
|
||||
@ResponseBody
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "userId",required = true),
|
||||
@ApiImplicitParam(name = "avatar",required = true),
|
||||
|
@ -193,8 +194,9 @@ public class UserController {
|
|||
@PostMapping("/change_avatar")
|
||||
@ApiOperation(value = "根据ID修改头像",notes = "")
|
||||
|
||||
public R changeAvatar(@RequestParam(required = true, value = "userId") Integer userId,
|
||||
@RequestParam(required = true, value = "avatar") String avatar){
|
||||
public R changeAvatar(@RequestBody Map<String,Object> updateInfo){
|
||||
Integer userId=(Integer)updateInfo.get("userId");
|
||||
String avatar=(String)updateInfo.get("avatar");
|
||||
User user = userService.changeAvatar(userId, avatar);
|
||||
if(user==null){
|
||||
return R.error("更新失败!");
|
||||
|
@ -207,7 +209,7 @@ public class UserController {
|
|||
/**
|
||||
* 更新密码
|
||||
*/
|
||||
@ResponseBody
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "userId",required = true),
|
||||
@ApiImplicitParam(name = "oldPassword",required = true),
|
||||
|
@ -217,10 +219,13 @@ public class UserController {
|
|||
@PostMapping("/reset_password")
|
||||
@ApiOperation(value = "根据id更改密码",notes = "")
|
||||
|
||||
public R resetPassword(@RequestParam(required = true, value = "userId") Integer userId,
|
||||
@RequestParam(required = true, value = "oldPassword") String oldPassword,
|
||||
@RequestParam(required = true, value = "password") String password,
|
||||
@RequestParam(required = true, value = "resetPassword") String resetPassword){
|
||||
public R resetPassword(@RequestBody Map<String,Object> updateInfo){
|
||||
|
||||
String password= (String)updateInfo.get("password");
|
||||
String resetPassword= (String)updateInfo.get("resetPassword");
|
||||
Integer userId= (Integer)updateInfo.get("userId");
|
||||
String oldPassword= (String)updateInfo.get("oldPassword");
|
||||
|
||||
if(!password.equals(resetPassword)){
|
||||
return R.error("两次输入的密码不一致!");
|
||||
}
|
||||
|
@ -230,7 +235,7 @@ public class UserController {
|
|||
/**
|
||||
* 更新用户信息
|
||||
*/
|
||||
@ResponseBody
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "userId",required = true),
|
||||
@ApiImplicitParam(name = "oldPassword",required = true),
|
||||
|
@ -239,13 +244,13 @@ public class UserController {
|
|||
})
|
||||
@PostMapping("/upload_userInfo")
|
||||
@ApiOperation(value = "根据ID更新用户信息",notes = "")
|
||||
public R updateUserInfo(@RequestParam(required = true, value = "userId") Integer userId,
|
||||
@RequestParam(required = true, value = "updateId") Integer updateId,
|
||||
@RequestParam(required = true, value = "username") String username,
|
||||
@RequestParam(required = true, value = "email") String email,
|
||||
@RequestParam(required = true, value = "sex") String sex,
|
||||
@RequestParam(required = true, value = "age") String age){
|
||||
|
||||
public R updateUserInfo(@RequestBody Map<String,Object>updateInfo){
|
||||
Integer updateId= (Integer)updateInfo.get("updateId");
|
||||
Integer userId= (Integer)updateInfo.get("userId");
|
||||
String username= (String)updateInfo.get("username");
|
||||
String age= (String)updateInfo.get("age");
|
||||
String email= (String)updateInfo.get("email");
|
||||
String sex= (String)updateInfo.get("sex");
|
||||
if(updateId==userId||userId==null||userId.equals("")){
|
||||
userId=null;
|
||||
User user = userService.updateUserInfo(userId, updateId, username, age, email, sex);
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
package com.yzdx.AiInterviewer.controller;
|
||||
|
||||
import com.yzdx.AiInterviewer.comment.R;
|
||||
import com.yzdx.AiInterviewer.service.VxCarouselChartService;
|
||||
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;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/vx_interview")
|
||||
public class VxInterviewController {
|
||||
|
||||
@Autowired
|
||||
private VxCarouselChartService vxCarouselChartService;
|
||||
|
||||
@GetMapping("/getCarouselChart")
|
||||
public R getCarouselChart(){
|
||||
return R.success(vxCarouselChartService.getVxCarouselChartService());
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
package com.yzdx.AiInterviewer.controller;
|
||||
|
||||
import com.yzdx.AiInterviewer.comment.R;
|
||||
import com.yzdx.AiInterviewer.entity.dto.VxJobLikeDto;
|
||||
import com.yzdx.AiInterviewer.service.JobListService;
|
||||
import com.yzdx.AiInterviewer.service.VxJobLikeService;
|
||||
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("/vxJob")
|
||||
public class VxJobController {
|
||||
|
||||
@Autowired
|
||||
private JobListService jobListService;
|
||||
|
||||
@Autowired
|
||||
private VxJobLikeService vxJobLikeService;
|
||||
// @GetMapping("/search_job")
|
||||
// public R searchJobList(String searchName,String address){
|
||||
//
|
||||
// jobListService.vxSearchJob( searchName, address);
|
||||
//
|
||||
//
|
||||
// }
|
||||
|
||||
@GetMapping("/getJobLikeList")
|
||||
public R getJobLikeList(Integer userId){
|
||||
|
||||
List<VxJobLikeDto> VxJobLikeDtos = vxJobLikeService.getJobLikeListById(userId);
|
||||
|
||||
return R.success(VxJobLikeDtos);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -3,11 +3,17 @@ package com.yzdx.AiInterviewer.controller;
|
|||
import com.yzdx.AiInterviewer.comment.R;
|
||||
import com.yzdx.AiInterviewer.entity.JobExpectation;
|
||||
import com.yzdx.AiInterviewer.service.ResumeService;
|
||||
import com.yzdx.AiInterviewer.service.UserService;
|
||||
import com.yzdx.AiInterviewer.utiles.GetPostUntil;
|
||||
import com.yzdx.AiInterviewer.utiles.WechatUtils;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
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;
|
||||
|
||||
|
@ -17,6 +23,64 @@ public class VxUserController {
|
|||
@Autowired
|
||||
private ResumeService resumeService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "js_code", required = true)
|
||||
}
|
||||
)
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "求职者登陆(vx)",notes = "")
|
||||
@PostMapping("/WxLogin")
|
||||
public R<String> R (@RequestParam(value = "js_code", required = true) String js_code) throws Exception {
|
||||
|
||||
//测试数据code
|
||||
// js_code = "0a3wuc0w3wd6M137CR2w3u7DoF1wuc0f";
|
||||
|
||||
//微信获取session_key接口地址
|
||||
String wxLoginUrl = "https://api.weixin.qq.com/sns/jscode2session";
|
||||
//接口参数
|
||||
String param = "appid=wx7c972ceb65b45c49&secret=72ad166ce138375593026a2fc5bf9eee&js_code=" + js_code + "&grant_type=authorization_code";
|
||||
//调用获取session_key接口 请求方式get
|
||||
String jsonString = GetPostUntil.sendGet(wxLoginUrl, param);
|
||||
System.out.println(jsonString);
|
||||
//因为json字符串是大括号包围,所以用JSONObject解析
|
||||
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);
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "encryptedData", required = true),
|
||||
@ApiImplicitParam(name = "iv", required = true),
|
||||
@ApiImplicitParam(name = "sessionKey", required = true)
|
||||
}
|
||||
)
|
||||
@ApiOperation(value = "求职者登陆(vx)",notes = "")
|
||||
@PostMapping(value = "/decodeUserInfo")
|
||||
public R decodeUserInfo(@RequestParam(required = true, value = "encryptedData") String encryptedData,
|
||||
@RequestParam(required = true, value = "iv") String iv,
|
||||
@RequestParam(required = true, value = "sessionKey") String sessionKey
|
||||
) throws Exception {
|
||||
byte[] encrypData = Base64.decodeBase64(encryptedData);
|
||||
byte[] ivData = Base64.decodeBase64(iv);
|
||||
byte[] sKey = Base64.decodeBase64(sessionKey);
|
||||
|
||||
String decrypt = WechatUtils.decrypt(sKey,ivData,encrypData);
|
||||
System.out.println(decrypt);
|
||||
JSONObject jsonObject=new JSONObject(decrypt);
|
||||
String phoneNumber = jsonObject.getString("phoneNumber");
|
||||
return userService.vxLogin(phoneNumber);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*填写简历
|
||||
*/
|
||||
|
@ -39,6 +103,7 @@ public class VxUserController {
|
|||
})
|
||||
@PostMapping("/write_resume")
|
||||
public R writeResume(@RequestParam(required = true, value = "name") String name,
|
||||
@RequestParam(required = true,value = "avatar")String avatar,
|
||||
@RequestParam(required = true, value = "status") String status,
|
||||
@RequestParam(required = true, value = "graduateTime") String graduateTime,
|
||||
@RequestParam(required = true, value = "birthday") String birthday,
|
||||
|
@ -47,12 +112,12 @@ public class VxUserController {
|
|||
@RequestParam(required = true, value = "vx") String vx,
|
||||
@RequestParam(required = true, value = "personalAdvantage") String personalAdvantage,
|
||||
@RequestParam(required = true, value = "other") String other,
|
||||
@RequestParam(required = true, value = "jobExpectation") List<String> jobExpectation,
|
||||
@RequestParam(required = true, value = "jobExpectation") List<Integer> jobExpectation,
|
||||
@RequestParam(required = true, value = "workExperience") List<String> workExperience,
|
||||
@RequestParam(required = true, value = "projectExperience") List<String> projectExperience,
|
||||
@RequestParam(required = true, value = "userId") Integer userId,
|
||||
@RequestParam(required = true, value = "sex") String sex){
|
||||
Integer rows = resumeService.writeResume( name, sex, status, graduateTime, birthday, phone, email, vx, personalAdvantage,
|
||||
Integer rows = resumeService.writeResume( name, avatar,sex, status, graduateTime, birthday, phone, email, vx, personalAdvantage,
|
||||
other,jobExpectation,workExperience,projectExperience,userId);
|
||||
if(rows!=1){
|
||||
return R.error("提交失败,请重新输入");
|
||||
|
@ -81,9 +146,12 @@ public class VxUserController {
|
|||
@ApiImplicitParam(name = "userId",required = true),
|
||||
@ApiImplicitParam(name = "sex",required = true),
|
||||
})
|
||||
|
||||
|
||||
@PostMapping("/update_resume")
|
||||
public R updateResume(@RequestParam(required = true, value = "name") String name,
|
||||
@RequestParam(required = true, value = "id") Integer id,
|
||||
@RequestParam(required = true,value = "avatar")String avatar,
|
||||
@RequestParam(required = true, value = "status") String status,
|
||||
@RequestParam(required = true, value = "graduateTime") String graduateTime,
|
||||
@RequestParam(required = true, value = "birthday") String birthday,
|
||||
|
@ -92,12 +160,13 @@ public class VxUserController {
|
|||
@RequestParam(required = true, value = "vx") String vx,
|
||||
@RequestParam(required = true, value = "personalAdvantage") String personalAdvantage,
|
||||
@RequestParam(required = true, value = "other") String other,
|
||||
@RequestParam(required = true, value = "jobExpectation") List<String> jobExpectation,
|
||||
@RequestParam(required = true, value = "jobExpectation") List<Integer> jobExpectation,
|
||||
@RequestParam(required = true, value = "workExperience") List<String> workExperience,
|
||||
@RequestParam(required = true, value = "projectExperience") List<String> projectExperience,
|
||||
@RequestParam(required = true, value = "userId") Integer userId,
|
||||
@RequestParam(required = true, value = "sex") String sex){
|
||||
Integer rows = resumeService.updateResume(id,name, sex, status, graduateTime, birthday, phone, email, vx, personalAdvantage,
|
||||
Integer rows = resumeService.updateResume(id,name,avatar, sex, status, graduateTime,
|
||||
birthday, phone, email, vx, personalAdvantage,
|
||||
other,jobExpectation,workExperience,projectExperience,userId);
|
||||
if(rows!=1){
|
||||
return R.error("提交失败,请重新输入");
|
||||
|
@ -133,9 +202,10 @@ public class VxUserController {
|
|||
* 获取岗位期望列表
|
||||
* @return
|
||||
*/
|
||||
|
||||
@GetMapping
|
||||
public R getJobExpectation(){
|
||||
List<JobExpectation> list= resumeService.getJobExpectation();
|
||||
public R getJobExpectation(@ApiParam("Integer userId") Integer userId){
|
||||
List<JobExpectation> list= resumeService.getJobExpectation(userId);
|
||||
return R.success(list);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
package com.yzdx.AiInterviewer.controller;
|
||||
|
||||
public class vxJobController {
|
||||
}
|
|
@ -38,4 +38,8 @@ public class Company extends BaseEntity {
|
|||
private String images;
|
||||
@ApiModelProperty("公司使用的登陆编码")
|
||||
private String encoding;
|
||||
@ApiModelProperty("企业人数")
|
||||
private String staffNumber;
|
||||
@ApiModelProperty("公司logo")
|
||||
private String companyLogo;
|
||||
}
|
||||
|
|
|
@ -45,5 +45,7 @@ public class JobEntity extends BaseEntity {
|
|||
private String companyEncoding;
|
||||
@ApiModelProperty("岗位状态,0:禁用 1:启用")
|
||||
private Integer status;
|
||||
@ApiModelProperty("岗位福利")
|
||||
private String jobWelfale;
|
||||
|
||||
}
|
||||
|
|
|
@ -20,4 +20,6 @@ public class JobExpectation extends BaseEntity{
|
|||
private String location;
|
||||
@ApiModelProperty("期望薪资")
|
||||
private String salary;
|
||||
@ApiModelProperty("用户ID")
|
||||
private Integer userId;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
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("carousel_chart")
|
||||
public class VxCarouselChart {
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
private String images;
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.yzdx.AiInterviewer.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@Data
|
||||
@TableName("job_like")
|
||||
public class VxJobLike extends BaseEntity{
|
||||
@ApiModelProperty("关注岗位id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer id;
|
||||
@ApiModelProperty("岗位id")
|
||||
private Integer jobId;
|
||||
@ApiModelProperty("用户id")
|
||||
private Integer userId;
|
||||
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package com.yzdx.AiInterviewer.entity.dto;
|
||||
|
||||
import com.yzdx.AiInterviewer.entity.VxJobLike;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class VxJobLikeDto extends VxJobLike {
|
||||
|
||||
private String jobName;
|
||||
|
||||
private String salary;
|
||||
|
||||
private String company;
|
||||
|
||||
private String staffNumber;
|
||||
|
||||
private String label;
|
||||
|
||||
private String position;
|
||||
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package com.yzdx.AiInterviewer.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yzdx.AiInterviewer.entity.VxCarouselChart;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface VxCarouselChartMapper extends BaseMapper<VxCarouselChart> {
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package com.yzdx.AiInterviewer.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yzdx.AiInterviewer.entity.VxJobLike;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface VxJobLikeMapper extends BaseMapper<VxJobLike> {
|
||||
}
|
|
@ -40,7 +40,9 @@ public interface CompanyService extends IService<Company> {
|
|||
String legalRepresentative,
|
||||
String treatment,
|
||||
String registeredCapital,
|
||||
Integer userId);
|
||||
Integer userId,
|
||||
String companyLogo,
|
||||
String staffNumber);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -119,4 +119,17 @@ public interface JobListService extends IService<JobEntity> {
|
|||
Integer deleteJob(Integer id);
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------vx-------------------------------------------
|
||||
/**
|
||||
* vx搜索岗位
|
||||
* @param searchName 搜索名称
|
||||
* @param address 所在地址
|
||||
* @return jobDto列表
|
||||
*
|
||||
* */
|
||||
|
||||
List<JobDto> vxSearchJob(String searchName, String address);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -27,10 +27,10 @@ public interface ResumeService extends IService<Resume> {
|
|||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
Integer writeResume(String name, String sex, String status
|
||||
Integer writeResume(String name, String avatar,String sex, String status
|
||||
, String graduateTime, String birthday, String phone, String email
|
||||
, String vx, String personalAdvantage, String other
|
||||
, List<String> jobExpectation, List<String> workExperience, List<String> projectExperience, Integer userId);
|
||||
, List<Integer> jobExpectation, List<String> workExperience, List<String> projectExperience, Integer userId);
|
||||
|
||||
/**
|
||||
* 添加岗位期望
|
||||
|
@ -46,7 +46,7 @@ public interface ResumeService extends IService<Resume> {
|
|||
* 获取岗位期望列表
|
||||
* @return
|
||||
*/
|
||||
List<JobExpectation> getJobExpectation();
|
||||
List<JobExpectation> getJobExpectation(Integer userId);
|
||||
|
||||
/**
|
||||
* 更新岗位期望
|
||||
|
@ -66,5 +66,8 @@ public interface ResumeService extends IService<Resume> {
|
|||
*/
|
||||
Integer deleteJobExpectation(Integer id);
|
||||
|
||||
Integer updateResume(Integer id, String name, String sex, String status, String graduateTime, String birthday, String phone, String email, String vx, String personalAdvantage, String other, List<String> jobExpectation, List<String> workExperience, List<String> projectExperience, Integer userId);
|
||||
Integer updateResume(Integer id, String name, String avatar,String sex, String status,
|
||||
String graduateTime, String birthday, String phone, String email, String vx,
|
||||
String personalAdvantage, String other, List<Integer> jobExpectation, List<String> workExperience,
|
||||
List<String> projectExperience, Integer userId);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
package com.yzdx.AiInterviewer.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yzdx.AiInterviewer.entity.VxCarouselChart;
|
||||
|
||||
public interface VxCarouselChartService extends IService<VxCarouselChart> {
|
||||
|
||||
/**
|
||||
* 获取轮播图信息
|
||||
*
|
||||
* */
|
||||
String getVxCarouselChartService();
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.yzdx.AiInterviewer.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yzdx.AiInterviewer.entity.VxJobLike;
|
||||
import com.yzdx.AiInterviewer.entity.dto.VxJobLikeDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface VxJobLikeService extends IService<VxJobLike> {
|
||||
|
||||
/**
|
||||
* 根据用户id查询关注岗位列表
|
||||
* @param userId 用户ID
|
||||
* @return VxJobLikeDto列表
|
||||
*
|
||||
* */
|
||||
List<VxJobLikeDto> getJobLikeListById(Integer userId);
|
||||
|
||||
}
|
|
@ -27,9 +27,12 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|||
}
|
||||
|
||||
@Override
|
||||
public Integer updateCompanyDetail(String address, String addressDetail, String companyDetail, String companyName, String creditCode, String encoding, String established, String images, String legalRepresentative, String treatment, String registeredCapital, Integer userId) {
|
||||
public Integer updateCompanyDetail(String address, String addressDetail, String companyDetail, String companyName,
|
||||
String creditCode, String encoding, String established, String images, String legalRepresentative,
|
||||
String treatment, String registeredCapital, Integer userId,String companyLogo,
|
||||
String staffNumber) {
|
||||
if (address==null||addressDetail==null||companyDetail==null||companyName==null||creditCode==null||established==null||images==null||legalRepresentative==null
|
||||
||treatment==null||registeredCapital==null||userId==null){
|
||||
||treatment==null||registeredCapital==null||userId==null||staffNumber==null||companyLogo==null){
|
||||
return -1;
|
||||
}
|
||||
//通过公司编码查询公司
|
||||
|
@ -48,6 +51,8 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|||
company.setRegisteredCapital(registeredCapital);
|
||||
company.setUpdateTime(TimeUtil.getTime());
|
||||
company.setUpdateUser(userId);
|
||||
company.setCompanyLogo(companyLogo);
|
||||
company.setStaffNumber(staffNumber);
|
||||
Integer i = companyMapper.updateById(company);
|
||||
return i;
|
||||
|
||||
|
|
|
@ -274,4 +274,39 @@ public class JobListServiceImpl extends ServiceImpl<JobMapper, JobEntity> implem
|
|||
}
|
||||
return jobMapper.delete(queryWrapper);
|
||||
}
|
||||
|
||||
//----------------------------------------------------vx----------------------------------------------
|
||||
|
||||
@Override
|
||||
public List<JobDto> vxSearchJob(String searchName, String address) {
|
||||
|
||||
LambdaQueryWrapper<JobEntity> queryWrapper=new LambdaQueryWrapper<>();
|
||||
|
||||
queryWrapper.like(JobEntity::getJobName,searchName).like(JobEntity::getAddress,address);
|
||||
|
||||
List<JobEntity> jobEntities = jobMapper.selectList(queryWrapper);
|
||||
List<JobDto> jobDtoList = jobEntities.stream().map((item) -> {
|
||||
|
||||
JobDto jobDto=new JobDto();
|
||||
|
||||
jobDto.setId(item.getId());
|
||||
jobDto.setJobName(item.getJobName());
|
||||
jobDto.setJobType(item.getJobType());
|
||||
jobDto.setDetail(item.getDetails());
|
||||
String number=item.getMinNumber()+"-"+item.getMaxNumber();
|
||||
jobDto.setNumber(number);
|
||||
String Address= MyStringUtils.convertString(item.getAddress())+item.getAddressDetail();
|
||||
jobDto.setAddress(Address);
|
||||
String salary=item.getMinSalary()+"-"+item.getMaxSalary();
|
||||
jobDto.setSalary(salary);
|
||||
jobDto.setStatus(item.getStatus());
|
||||
jobDto.setCreateUser(item.getCreateUser());
|
||||
jobDto.setCreateTime(item.getCreateTime());
|
||||
jobDto.setUpdateUser(item.getUpdateUser());
|
||||
jobDto.setUpdateTime(item.getUpdateTime());
|
||||
return jobDto;
|
||||
}).collect(Collectors.toList());
|
||||
return jobDtoList;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,12 +21,13 @@ public class ResumeServiceImpl extends ServiceImpl<ResumeMapper, Resume> impleme
|
|||
@Autowired
|
||||
private JobExpectationMapper jobExpectationMapper;
|
||||
@Override
|
||||
public Integer writeResume( String name, String sex, String status, String graduateTime, String birthday,
|
||||
public Integer writeResume( String name, String avatar,String sex, String status, String graduateTime, String birthday,
|
||||
String phone, String email, String vx, String personalAdvantage, String other,
|
||||
List<String> jobExpectation, List<String> workExperience, List<String> projectExperience,
|
||||
List<Integer> jobExpectation, List<String> workExperience, List<String> projectExperience,
|
||||
Integer userId) {
|
||||
Resume resume=new Resume();
|
||||
resume.setName(name);
|
||||
resume.setAvatar(avatar);
|
||||
resume.setSex(sex);
|
||||
resume.setStatus(status);
|
||||
resume.setGraduateTime(graduateTime);
|
||||
|
@ -62,8 +63,9 @@ public class ResumeServiceImpl extends ServiceImpl<ResumeMapper, Resume> impleme
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<JobExpectation> getJobExpectation() {
|
||||
public List<JobExpectation> getJobExpectation(Integer userId) {
|
||||
LambdaQueryWrapper<JobExpectation> queryWrapper=new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(JobExpectation::getUserId,userId);
|
||||
List<JobExpectation> list = jobExpectationMapper.selectList(queryWrapper);
|
||||
return list;
|
||||
}
|
||||
|
@ -95,10 +97,14 @@ public class ResumeServiceImpl extends ServiceImpl<ResumeMapper, Resume> impleme
|
|||
}
|
||||
|
||||
@Override
|
||||
public Integer updateResume(Integer id, String name, String sex, String status, String graduateTime, String birthday, String phone, String email, String vx, String personalAdvantage, String other, List<String> jobExpectation, List<String> workExperience, List<String> projectExperience, Integer userId) {
|
||||
public Integer updateResume(Integer id, String name, String avatar,String sex, String status,
|
||||
String graduateTime, String birthday, String phone, String email, String vx,
|
||||
String personalAdvantage, String other, List<Integer> jobExpectation, List<String> workExperience,
|
||||
List<String> projectExperience, Integer userId) {
|
||||
Resume resume=new Resume();
|
||||
resume.setId(id);
|
||||
resume.setName(name);
|
||||
resume.setAvatar(avatar);
|
||||
resume.setSex(sex);
|
||||
resume.setStatus(status);
|
||||
resume.setGraduateTime(graduateTime);
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
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.VxCarouselChart;
|
||||
import com.yzdx.AiInterviewer.mapper.VxCarouselChartMapper;
|
||||
import com.yzdx.AiInterviewer.service.VxCarouselChartService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class VxCarouselChartServiceImpl extends ServiceImpl<VxCarouselChartMapper, VxCarouselChart> implements VxCarouselChartService {
|
||||
|
||||
@Autowired
|
||||
private VxCarouselChartMapper vxCarouselChartMapper;
|
||||
|
||||
@Override
|
||||
public String getVxCarouselChartService() {
|
||||
LambdaQueryWrapper<VxCarouselChart> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
VxCarouselChart vxCarouselChart= vxCarouselChartMapper.selectOne(queryWrapper);
|
||||
|
||||
return vxCarouselChart.getImages();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
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.JobEntity;
|
||||
import com.yzdx.AiInterviewer.entity.VxJobLike;
|
||||
import com.yzdx.AiInterviewer.entity.dto.VxJobLikeDto;
|
||||
import com.yzdx.AiInterviewer.mapper.VxJobLikeMapper;
|
||||
import com.yzdx.AiInterviewer.service.CompanyService;
|
||||
import com.yzdx.AiInterviewer.service.JobListService;
|
||||
import com.yzdx.AiInterviewer.service.VxJobLikeService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class VxJobLikeServiceImpl extends ServiceImpl<VxJobLikeMapper, VxJobLike> implements VxJobLikeService {
|
||||
|
||||
@Autowired
|
||||
private VxJobLikeMapper vxJobLikeMapper;
|
||||
@Autowired
|
||||
private JobListService jobListService;
|
||||
@Autowired
|
||||
private CompanyService companyService;
|
||||
|
||||
@Override
|
||||
public List<VxJobLikeDto> getJobLikeListById(Integer userId) {
|
||||
LambdaQueryWrapper<VxJobLike> queryWrapper=new LambdaQueryWrapper<>();
|
||||
|
||||
queryWrapper.eq(VxJobLike::getUserId,userId);
|
||||
|
||||
List<VxJobLike> vxJobLikes = vxJobLikeMapper.selectList(queryWrapper);
|
||||
|
||||
if(vxJobLikes.size()==0){
|
||||
return null;
|
||||
}
|
||||
|
||||
List<VxJobLikeDto> vxJobLikeDtoList=vxJobLikes.stream().map(item->{
|
||||
VxJobLikeDto vxJobLikeDto=new VxJobLikeDto();
|
||||
|
||||
BeanUtils.copyProperties(item,vxJobLikeDto);
|
||||
|
||||
JobEntity findJob = jobListService.getJobById(item.getJobId());
|
||||
|
||||
vxJobLikeDto.setJobName(findJob.getJobName());
|
||||
|
||||
vxJobLikeDto.setSalary(findJob.getMinSalary()+"-"+findJob.getMaxSalary()+"k");
|
||||
|
||||
Company companyDetail = companyService.getCompanyDetail(findJob.getCompanyEncoding());
|
||||
|
||||
vxJobLikeDto.setCompany(companyDetail.getCompanyName());
|
||||
|
||||
vxJobLikeDto.setStaffNumber(companyDetail.getStaffNumber());
|
||||
|
||||
vxJobLikeDto.setLabel(findJob.getJobTips());
|
||||
|
||||
vxJobLikeDto.setPosition(findJob.getAddressDetail());
|
||||
|
||||
|
||||
return vxJobLikeDto;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
return vxJobLikeDtoList;
|
||||
}
|
||||
}
|
|
@ -3,9 +3,9 @@ server:
|
|||
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:mysql://117.88.94.226:3306/ai_interviewer?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: Jerry
|
||||
url: jdbc:mysql://101.43.255.47:3306/ai_interviewer?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
|
||||
username: Jerry
|
||||
password: 2002811
|
||||
|
||||
jackson:
|
||||
default-property-inclusion: non_null
|
||||
|
|
Loading…
Reference in New Issue