This commit is contained in:
parent
a10fcd998a
commit
699e5bd380
|
@ -326,8 +326,10 @@ public class RecruitmentController {
|
|||
@ApiOperation(value = "更新公司详情",notes = "")
|
||||
public R UpdateCompanyDetail(@RequestBody Map<String,Object> updateInfo){
|
||||
String encoding=(String) updateInfo.get("encoding");
|
||||
String type=(String) updateInfo.get("type");
|
||||
List<String> address=(List<String>) updateInfo.get("address");
|
||||
Integer userId=(Integer) updateInfo.get("userId");
|
||||
String companyAllName=(String) updateInfo.get("companyAllName");
|
||||
String addressDetail=(String) updateInfo.get("addressDetail");
|
||||
String companyDetail=(String) updateInfo.get("companyDetail");
|
||||
String companyName=(String) updateInfo.get("companyName");
|
||||
|
@ -340,9 +342,9 @@ public class RecruitmentController {
|
|||
String companyLogo=(String) updateInfo.get("companyLogo");
|
||||
String staffNumber=(String) updateInfo.get("staffNumber");
|
||||
|
||||
System.out.println(address.toString());
|
||||
|
||||
|
||||
Integer row = companyService.updateCompanyDetail(address.toString(), addressDetail,
|
||||
Integer row = companyService.updateCompanyDetail(address.toString(), addressDetail,type,companyAllName,
|
||||
companyDetail, companyName,
|
||||
creditCode, encoding, established,
|
||||
images, legalRepresentative,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.yzdx.AiInterviewer.controller;
|
||||
package com.yzdx.AiInterviewer.controller.VxController;
|
||||
|
||||
import com.yzdx.AiInterviewer.comment.R;
|
||||
import com.yzdx.AiInterviewer.service.VxCarouselChartService;
|
||||
import com.yzdx.AiInterviewer.service.VxService.VxCarouselChartService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@ -0,0 +1,75 @@
|
|||
package com.yzdx.AiInterviewer.controller.VxController;
|
||||
|
||||
import com.yzdx.AiInterviewer.comment.R;
|
||||
import com.yzdx.AiInterviewer.entity.VxEntityDto.VxCompanyLikeDto;
|
||||
import com.yzdx.AiInterviewer.entity.VxEntityDto.VxJobLikeDto;
|
||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxCompanyLike;
|
||||
import com.yzdx.AiInterviewer.service.CompanyService;
|
||||
import com.yzdx.AiInterviewer.service.JobListService;
|
||||
import com.yzdx.AiInterviewer.service.VxService.VxJobLikeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/vxJob")
|
||||
public class VxJobController {
|
||||
|
||||
@Autowired
|
||||
private JobListService jobListService;
|
||||
|
||||
@Autowired
|
||||
private VxJobLikeService vxJobLikeService;
|
||||
|
||||
@Autowired
|
||||
private CompanyService companyService;
|
||||
// @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);
|
||||
|
||||
}
|
||||
|
||||
@PostMapping("/addJobLike")
|
||||
public R addJobLike(@RequestParam(value = "jobId")Integer jobId,
|
||||
@RequestParam(value = "userId")Integer userId){
|
||||
|
||||
Integer rows= vxJobLikeService.addJobLike(jobId,userId);
|
||||
|
||||
if(rows!=1){
|
||||
return R.error("收藏失败");
|
||||
}
|
||||
return R.success("收藏成功");
|
||||
|
||||
}
|
||||
@GetMapping("/searchJobList")
|
||||
public R searchJobList(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);
|
||||
|
||||
}
|
||||
}
|
|
@ -1,9 +1,13 @@
|
|||
package com.yzdx.AiInterviewer.controller;
|
||||
package com.yzdx.AiInterviewer.controller.VxController;
|
||||
|
||||
import com.yzdx.AiInterviewer.comment.R;
|
||||
import com.yzdx.AiInterviewer.entity.JobExpectation;
|
||||
import com.yzdx.AiInterviewer.entity.VxEntityDto.VxCompanyLikeDto;
|
||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxHelpEntity;
|
||||
import com.yzdx.AiInterviewer.service.ResumeService;
|
||||
import com.yzdx.AiInterviewer.service.UserService;
|
||||
import com.yzdx.AiInterviewer.service.VxService.VxCompanyLikeService;
|
||||
import com.yzdx.AiInterviewer.service.VxService.VxHelpService;
|
||||
import com.yzdx.AiInterviewer.utiles.GetPostUntil;
|
||||
import com.yzdx.AiInterviewer.utiles.WechatUtils;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
|
@ -26,6 +30,10 @@ public class VxUserController {
|
|||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
@Autowired
|
||||
private VxCompanyLikeService vxCompanyLikeService;
|
||||
|
||||
private VxHelpService vxHelpService;
|
||||
|
||||
|
||||
@ApiImplicitParams({
|
||||
|
@ -248,5 +256,22 @@ public class VxUserController {
|
|||
return R.success("删除成功");
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/getHelpList")
|
||||
public R getHelpList(){
|
||||
|
||||
List<VxHelpEntity> helpList = vxHelpService.getHelpList();
|
||||
|
||||
return R.success(helpList);
|
||||
|
||||
}
|
||||
|
||||
@GetMapping("/getCompanyLikeList")
|
||||
public R getCompanyLikeList(Integer userId){
|
||||
List<VxCompanyLikeDto> VxCompanyLikeDtos=vxCompanyLikeService.getCompanyLikeListById(userId);
|
||||
return R.success(VxCompanyLikeDtos);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -14,8 +14,10 @@ public class Company extends BaseEntity {
|
|||
@ApiModelProperty("公司id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer id;
|
||||
@ApiModelProperty("公司名称")
|
||||
@ApiModelProperty("公司简称")
|
||||
private String companyName;
|
||||
@ApiModelProperty("公司全称")
|
||||
private String companyAllName;
|
||||
@ApiModelProperty("公司详情")
|
||||
private String companyDetail;
|
||||
@ApiModelProperty("公司类型")
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
package com.yzdx.AiInterviewer.entity.VxEntityDto;
|
||||
|
||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxCompanyLike;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class VxCompanyLikeDto extends VxCompanyLike {
|
||||
|
||||
private Integer companyId;
|
||||
|
||||
private String companyName;
|
||||
|
||||
private String companyType;
|
||||
|
||||
private String companyImgUrl;
|
||||
|
||||
private String staffNum;
|
||||
|
||||
private List<Map<String,Object>> jobRelative;
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
package com.yzdx.AiInterviewer.entity.dto;
|
||||
package com.yzdx.AiInterviewer.entity.VxEntityDto;
|
||||
|
||||
import com.yzdx.AiInterviewer.entity.VxJobLike;
|
||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxJobLike;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
|
@ -1,4 +1,4 @@
|
|||
package com.yzdx.AiInterviewer.entity;
|
||||
package com.yzdx.AiInterviewer.entity.vxEntity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
@ -0,0 +1,21 @@
|
|||
package com.yzdx.AiInterviewer.entity.vxEntity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.yzdx.AiInterviewer.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@TableName("company_like")
|
||||
public class VxCompanyLike extends BaseEntity {
|
||||
@ApiModelProperty("关注公司id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer id;
|
||||
@ApiModelProperty("公司id")
|
||||
private Integer companyId;
|
||||
@ApiModelProperty("用户id")
|
||||
private Integer userId;
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.yzdx.AiInterviewer.entity.vxEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class VxHelpEntity {
|
||||
|
||||
private Integer id;
|
||||
|
||||
private Integer type;
|
||||
|
||||
private String helpTitle;
|
||||
|
||||
private String content;
|
||||
}
|
|
@ -1,13 +1,14 @@
|
|||
package com.yzdx.AiInterviewer.entity;
|
||||
package com.yzdx.AiInterviewer.entity.vxEntity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.yzdx.AiInterviewer.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@Data
|
||||
@TableName("job_like")
|
||||
public class VxJobLike extends BaseEntity{
|
||||
public class VxJobLike extends BaseEntity {
|
||||
@ApiModelProperty("关注岗位id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer id;
|
|
@ -1,7 +1,7 @@
|
|||
package com.yzdx.AiInterviewer.mapper;
|
||||
package com.yzdx.AiInterviewer.mapper.VxMapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yzdx.AiInterviewer.entity.VxCarouselChart;
|
||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxCarouselChart;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
|
@ -0,0 +1,9 @@
|
|||
package com.yzdx.AiInterviewer.mapper.VxMapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxCompanyLike;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface VxCompanyLikeMapper extends BaseMapper<VxCompanyLike> {
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package com.yzdx.AiInterviewer.mapper.VxMapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxHelpEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface VxHelpMapper extends BaseMapper<VxHelpEntity> {
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
package com.yzdx.AiInterviewer.mapper;
|
||||
package com.yzdx.AiInterviewer.mapper.VxMapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yzdx.AiInterviewer.entity.VxJobLike;
|
||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxJobLike;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
|
@ -2,6 +2,9 @@ package com.yzdx.AiInterviewer.service;
|
|||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yzdx.AiInterviewer.entity.Company;
|
||||
import com.yzdx.AiInterviewer.entity.VxEntityDto.VxCompanyLikeDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface CompanyService extends IService<Company> {
|
||||
|
||||
|
@ -31,6 +34,8 @@ public interface CompanyService extends IService<Company> {
|
|||
* */
|
||||
Integer updateCompanyDetail(String address,
|
||||
String addressDetail,
|
||||
String type,
|
||||
String companyAllName,
|
||||
String companyDetail,
|
||||
String companyName,
|
||||
String creditCode,
|
||||
|
@ -45,4 +50,7 @@ public interface CompanyService extends IService<Company> {
|
|||
String staffNumber);
|
||||
|
||||
|
||||
//----------------------------------------------vx--------------------------------------------------
|
||||
|
||||
List<VxCompanyLikeDto> searchCompanyList(String searchName, String address);
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.yzdx.AiInterviewer.service;
|
|||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yzdx.AiInterviewer.entity.JobEntity;
|
||||
import com.yzdx.AiInterviewer.entity.dto.JobDto;
|
||||
import com.yzdx.AiInterviewer.entity.VxEntityDto.VxJobLikeDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -129,7 +130,5 @@ public interface JobListService extends IService<JobEntity> {
|
|||
*
|
||||
* */
|
||||
|
||||
List<JobDto> vxSearchJob(String searchName, String address);
|
||||
|
||||
|
||||
List<VxJobLikeDto> searchJobList(String searchName, String address);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.yzdx.AiInterviewer.service;
|
||||
package com.yzdx.AiInterviewer.service.VxService;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yzdx.AiInterviewer.entity.VxCarouselChart;
|
||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxCarouselChart;
|
||||
|
||||
public interface VxCarouselChartService extends IService<VxCarouselChart> {
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package com.yzdx.AiInterviewer.service.VxService;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yzdx.AiInterviewer.entity.VxEntityDto.VxCompanyLikeDto;
|
||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxCompanyLike;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface VxCompanyLikeService extends IService<VxCompanyLike> {
|
||||
|
||||
List<VxCompanyLikeDto> getCompanyLikeListById(Integer userId);
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package com.yzdx.AiInterviewer.service.VxService;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxHelpEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface VxHelpService extends IService<VxHelpEntity> {
|
||||
|
||||
List<VxHelpEntity> getHelpList();
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
package com.yzdx.AiInterviewer.service;
|
||||
package com.yzdx.AiInterviewer.service.VxService;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yzdx.AiInterviewer.entity.VxJobLike;
|
||||
import com.yzdx.AiInterviewer.entity.dto.VxJobLikeDto;
|
||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxJobLike;
|
||||
import com.yzdx.AiInterviewer.entity.VxEntityDto.VxJobLikeDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -16,4 +16,8 @@ public interface VxJobLikeService extends IService<VxJobLike> {
|
|||
* */
|
||||
List<VxJobLikeDto> getJobLikeListById(Integer userId);
|
||||
|
||||
|
||||
Integer addJobLike(Integer jobId, Integer userId);
|
||||
|
||||
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
package com.yzdx.AiInterviewer.service.impl;
|
||||
package com.yzdx.AiInterviewer.service.VxService.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 com.yzdx.AiInterviewer.entity.vxEntity.VxCarouselChart;
|
||||
import com.yzdx.AiInterviewer.mapper.VxMapper.VxCarouselChartMapper;
|
||||
import com.yzdx.AiInterviewer.service.VxService.VxCarouselChartService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
@ -16,9 +16,8 @@ public class VxCarouselChartServiceImpl extends ServiceImpl<VxCarouselChartMappe
|
|||
|
||||
@Override
|
||||
public String getVxCarouselChartService() {
|
||||
LambdaQueryWrapper<VxCarouselChart> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
VxCarouselChart vxCarouselChart= vxCarouselChartMapper.selectOne(queryWrapper);
|
||||
VxCarouselChart vxCarouselChart= vxCarouselChartMapper.selectOne(null);
|
||||
|
||||
return vxCarouselChart.getImages();
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
package com.yzdx.AiInterviewer.service.VxService.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.VxEntityDto.VxCompanyLikeDto;
|
||||
import com.yzdx.AiInterviewer.entity.dto.JobDto;
|
||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxCompanyLike;
|
||||
import com.yzdx.AiInterviewer.mapper.CompanyMapper;
|
||||
import com.yzdx.AiInterviewer.mapper.VxMapper.VxCompanyLikeMapper;
|
||||
import com.yzdx.AiInterviewer.service.JobListService;
|
||||
import com.yzdx.AiInterviewer.service.VxService.VxCompanyLikeService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class VxCompanyLikeServiceImpl extends ServiceImpl<VxCompanyLikeMapper, VxCompanyLike> implements VxCompanyLikeService {
|
||||
@Autowired
|
||||
private VxCompanyLikeMapper vxCompanyLikeMapper;
|
||||
@Autowired
|
||||
private CompanyMapper companyMapper;
|
||||
@Autowired
|
||||
private JobListService jobListService;
|
||||
|
||||
@Override
|
||||
public List<VxCompanyLikeDto> getCompanyLikeListById(Integer userId) {
|
||||
|
||||
LambdaQueryWrapper<VxCompanyLike> queryWrapper=new LambdaQueryWrapper<>();
|
||||
|
||||
queryWrapper.eq(VxCompanyLike::getUserId,userId);
|
||||
|
||||
List<VxCompanyLike> vxCompanyLikes = vxCompanyLikeMapper.selectList(queryWrapper);
|
||||
|
||||
List<VxCompanyLikeDto> vxCompanyLikeDtos=vxCompanyLikes.stream().map(item->{
|
||||
|
||||
VxCompanyLikeDto vxCompanyLikeDto=new VxCompanyLikeDto();
|
||||
|
||||
BeanUtils.copyProperties(item,vxCompanyLikeDto);
|
||||
// 得到公司id
|
||||
LambdaQueryWrapper<Company> queryWrapper1=new LambdaQueryWrapper<>();
|
||||
|
||||
queryWrapper1.eq(Company::getId,vxCompanyLikeDto.getCompanyId());
|
||||
|
||||
Company company = companyMapper.selectOne(queryWrapper1);
|
||||
|
||||
vxCompanyLikeDto.setCompanyId(company.getId());
|
||||
|
||||
vxCompanyLikeDto.setCompanyName(company.getCompanyName());
|
||||
//得到公司类型
|
||||
|
||||
|
||||
vxCompanyLikeDto.setCompanyType(company.getType());
|
||||
//得到公司logo url
|
||||
|
||||
vxCompanyLikeDto.setCompanyImgUrl(company.getCompanyLogo());
|
||||
//得到企业人数
|
||||
|
||||
vxCompanyLikeDto.setStaffNum(company.getStaffNumber());
|
||||
//得到相关信息
|
||||
List<JobDto> jobList = jobListService.getJobList(company.getEncoding());
|
||||
List<Map<String,Object>> jobRelatives=jobList.stream().map(i->{
|
||||
Map<String,Object> jobRelative=new HashMap<>();
|
||||
|
||||
jobRelative.put("jobname",i.getJobName());
|
||||
jobRelative.put("salary",i.getSalary());
|
||||
return jobRelative;
|
||||
|
||||
}).collect(Collectors.toList());
|
||||
vxCompanyLikeDto.setJobRelative(jobRelatives);
|
||||
return vxCompanyLikeDto;
|
||||
}).collect(Collectors.toList());
|
||||
return vxCompanyLikeDtos;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.yzdx.AiInterviewer.service.VxService.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxHelpEntity;
|
||||
import com.yzdx.AiInterviewer.mapper.VxMapper.VxHelpMapper;
|
||||
import com.yzdx.AiInterviewer.service.VxService.VxHelpService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class VxHelpServiceImpl extends ServiceImpl<VxHelpMapper, VxHelpEntity> implements VxHelpService {
|
||||
|
||||
@Autowired
|
||||
private VxHelpMapper vxHelpMapper;
|
||||
@Override
|
||||
public List<VxHelpEntity> getHelpList() {
|
||||
|
||||
List<VxHelpEntity> vxHelpEntities = vxHelpMapper.selectList(null);
|
||||
|
||||
return vxHelpEntities;
|
||||
|
||||
}
|
||||
}
|
|
@ -1,15 +1,16 @@
|
|||
package com.yzdx.AiInterviewer.service.impl;
|
||||
package com.yzdx.AiInterviewer.service.VxService.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.entity.vxEntity.VxJobLike;
|
||||
import com.yzdx.AiInterviewer.entity.VxEntityDto.VxJobLikeDto;
|
||||
import com.yzdx.AiInterviewer.mapper.VxMapper.VxJobLikeMapper;
|
||||
import com.yzdx.AiInterviewer.service.CompanyService;
|
||||
import com.yzdx.AiInterviewer.service.JobListService;
|
||||
import com.yzdx.AiInterviewer.service.VxJobLikeService;
|
||||
import com.yzdx.AiInterviewer.service.VxService.VxJobLikeService;
|
||||
import com.yzdx.AiInterviewer.utiles.TimeUtil;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -48,7 +49,7 @@ public class VxJobLikeServiceImpl extends ServiceImpl<VxJobLikeMapper, VxJobLike
|
|||
|
||||
vxJobLikeDto.setJobName(findJob.getJobName());
|
||||
|
||||
vxJobLikeDto.setSalary(findJob.getMinSalary()+"-"+findJob.getMaxSalary()+"k");
|
||||
vxJobLikeDto.setSalary(findJob.getMinSalary()+"-"+findJob.getMaxSalary());
|
||||
|
||||
Company companyDetail = companyService.getCompanyDetail(findJob.getCompanyEncoding());
|
||||
|
||||
|
@ -66,4 +67,33 @@ public class VxJobLikeServiceImpl extends ServiceImpl<VxJobLikeMapper, VxJobLike
|
|||
|
||||
return vxJobLikeDtoList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer addJobLike(Integer jobId, Integer userId) {
|
||||
|
||||
LambdaQueryWrapper<VxJobLike> queryWrapper =new LambdaQueryWrapper<>();
|
||||
|
||||
queryWrapper.eq(VxJobLike::getJobId,jobId);
|
||||
|
||||
VxJobLike vxJobLike1 = vxJobLikeMapper.selectOne(queryWrapper);
|
||||
|
||||
if(vxJobLike1!=null){
|
||||
return -1;
|
||||
}
|
||||
|
||||
VxJobLike vxJobLike=new VxJobLike();
|
||||
|
||||
vxJobLike.setJobId(jobId);
|
||||
|
||||
vxJobLike.setUserId(userId);
|
||||
|
||||
vxJobLike.setCreateTime(TimeUtil.getTime());
|
||||
|
||||
vxJobLike.setCreateUser(userId);
|
||||
|
||||
Integer rows = vxJobLikeMapper.insert(vxJobLike);
|
||||
|
||||
return rows;
|
||||
|
||||
}
|
||||
}
|
|
@ -3,18 +3,32 @@ 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.VxEntityDto.VxCompanyLikeDto;
|
||||
import com.yzdx.AiInterviewer.entity.dto.JobDto;
|
||||
import com.yzdx.AiInterviewer.mapper.CompanyMapper;
|
||||
import com.yzdx.AiInterviewer.mapper.JobMapper;
|
||||
import com.yzdx.AiInterviewer.service.CompanyService;
|
||||
import com.yzdx.AiInterviewer.service.JobListService;
|
||||
import com.yzdx.AiInterviewer.utiles.TimeUtil;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> implements CompanyService {
|
||||
|
||||
@Autowired
|
||||
private CompanyMapper companyMapper;
|
||||
|
||||
@Autowired
|
||||
private JobMapper jobMapper;
|
||||
|
||||
@Override
|
||||
public Company getCompanyDetail(String encoding) {
|
||||
LambdaQueryWrapper<Company> queryWrapper=new LambdaQueryWrapper<>();
|
||||
|
@ -27,12 +41,12 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|||
}
|
||||
|
||||
@Override
|
||||
public Integer updateCompanyDetail(String address, String addressDetail, String companyDetail, String companyName,
|
||||
public Integer updateCompanyDetail(String address, String addressDetail, String type,String companyAllName,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||staffNumber==null||companyLogo==null){
|
||||
||treatment==null||registeredCapital==null||userId==null||staffNumber==null||companyLogo==null||type==null||companyAllName==null){
|
||||
return -1;
|
||||
}
|
||||
//通过公司编码查询公司
|
||||
|
@ -46,6 +60,8 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|||
company.setCreditCode(creditCode);
|
||||
company.setEstablished(established);
|
||||
company.setImages(images);
|
||||
company.setType(type);
|
||||
company.setCompanyAllName(companyAllName);
|
||||
company.setLegalRepresentative(legalRepresentative);
|
||||
company.setTreatment(treatment);
|
||||
company.setRegisteredCapital(registeredCapital);
|
||||
|
@ -57,6 +73,54 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|||
return i;
|
||||
|
||||
}
|
||||
//-------------------------------------------------vx----------------------------------------------
|
||||
|
||||
@Override
|
||||
public List<VxCompanyLikeDto> searchCompanyList(String searchName, String address) {
|
||||
|
||||
LambdaQueryWrapper<Company> queryWrapper=new LambdaQueryWrapper<>();
|
||||
|
||||
queryWrapper.like(Company::getCompanyName,searchName).like(Company::getAddressDetail,address);
|
||||
|
||||
List<Company> companies = companyMapper.selectList(queryWrapper);
|
||||
|
||||
List<VxCompanyLikeDto> CompanyLikeDtos=companies.stream().map(item->{
|
||||
|
||||
VxCompanyLikeDto vxCompanyLikeDto=new VxCompanyLikeDto();
|
||||
|
||||
vxCompanyLikeDto.setCompanyId(item.getId());
|
||||
|
||||
vxCompanyLikeDto.setCompanyName(item.getCompanyName());
|
||||
//得到公司类型
|
||||
|
||||
|
||||
vxCompanyLikeDto.setCompanyType(item.getType());
|
||||
//得到公司logo url
|
||||
|
||||
vxCompanyLikeDto.setCompanyImgUrl(item.getCompanyLogo());
|
||||
//得到企业人数
|
||||
|
||||
vxCompanyLikeDto.setStaffNum(item.getStaffNumber());
|
||||
//得到相关信息
|
||||
LambdaQueryWrapper<JobEntity > queryWrapper1=new LambdaQueryWrapper<>();
|
||||
|
||||
queryWrapper1.eq(JobEntity::getCompanyEncoding,item.getEncoding());
|
||||
|
||||
List<JobEntity> jobList = jobMapper.selectList(queryWrapper1);
|
||||
|
||||
List<Map<String,Object>> jobRelatives=jobList.stream().map(i->{
|
||||
Map<String,Object> jobRelative=new HashMap<>();
|
||||
|
||||
jobRelative.put("jobname",i.getJobName());
|
||||
jobRelative.put("salary",i.getMinSalary()+"-"+i.getMaxSalary());
|
||||
return jobRelative;
|
||||
|
||||
}).collect(Collectors.toList());
|
||||
vxCompanyLikeDto.setJobRelative(jobRelatives);
|
||||
return vxCompanyLikeDto;
|
||||
}).collect(Collectors.toList());
|
||||
return CompanyLikeDtos;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -2,10 +2,12 @@ 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.dto.JobDto;
|
||||
import com.yzdx.AiInterviewer.entity.dto.QuestionDto;
|
||||
import com.yzdx.AiInterviewer.entity.VxEntityDto.VxJobLikeDto;
|
||||
import com.yzdx.AiInterviewer.mapper.JobMapper;
|
||||
import com.yzdx.AiInterviewer.service.CompanyService;
|
||||
import com.yzdx.AiInterviewer.service.JobListService;
|
||||
import com.yzdx.AiInterviewer.utiles.MyStringUtils;
|
||||
import com.yzdx.AiInterviewer.utiles.TimeUtil;
|
||||
|
@ -21,6 +23,8 @@ public class JobListServiceImpl extends ServiceImpl<JobMapper, JobEntity> implem
|
|||
|
||||
@Autowired
|
||||
private JobMapper jobMapper;
|
||||
@Autowired
|
||||
private CompanyService companyService;
|
||||
|
||||
@Override
|
||||
public Integer addJob(List<String> address, String address_detail, String details, String jobName, String startTime, String endTime, List<String> jobTips, Integer jobType, String min_salary, String max_salary, String min_number, String max_number, Integer requirement, Integer userId, String encoding) {
|
||||
|
@ -275,38 +279,43 @@ public class JobListServiceImpl extends ServiceImpl<JobMapper, JobEntity> implem
|
|||
return jobMapper.delete(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------vx----------------------------------------------
|
||||
|
||||
@Override
|
||||
public List<JobDto> vxSearchJob(String searchName, String address) {
|
||||
|
||||
public List<VxJobLikeDto> searchJobList(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();
|
||||
List<VxJobLikeDto> vxJobLikeDtoList=jobEntities.stream().map(item->{
|
||||
VxJobLikeDto vxJobLikeDto=new VxJobLikeDto();
|
||||
|
||||
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;
|
||||
BeanUtils.copyProperties(item,vxJobLikeDto);
|
||||
|
||||
vxJobLikeDto.setJobName(item.getJobName());
|
||||
|
||||
vxJobLikeDto.setSalary(item.getMinSalary()+"-"+item.getMaxSalary());
|
||||
|
||||
Company companyDetail = companyService.getCompanyDetail(item.getCompanyEncoding());
|
||||
|
||||
vxJobLikeDto.setCompany(companyDetail.getCompanyName());
|
||||
|
||||
vxJobLikeDto.setStaffNumber(companyDetail.getStaffNumber());
|
||||
|
||||
vxJobLikeDto.setLabel(item.getJobTips());
|
||||
|
||||
vxJobLikeDto.setPosition(item.getAddressDetail());
|
||||
|
||||
|
||||
return vxJobLikeDto;
|
||||
}).collect(Collectors.toList());
|
||||
return jobDtoList;
|
||||
|
||||
return vxJobLikeDtoList;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue