package com.lxj.recruitment.openData.controller;
import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.lxj.common.entities.ResponseEntity;
import com.lxj.common.util.AddressUtil;
import com.lxj.common.util.BeanUtil;
import com.lxj.common.util.DateUtil;
import com.lxj.common.util.StringUtils;
import com.lxj.recruitment.feign.CityFeign;
import com.lxj.recruitment.feign.CompanyRecruitmentOpenFeign;
import com.lxj.recruitment.feign.UserNoticeFeign;
import com.lxj.recruitment.feign.vo.CompanyRecruitmentOpenVo;
import com.lxj.recruitment.openData.entities.Company;
import com.lxj.recruitment.openData.entities.CompanyRecruitment;
import com.lxj.recruitment.openData.entities.CompanyRecruitmentOpen;
import com.lxj.recruitment.openData.entities.vo.*;
import com.lxj.recruitment.openData.service.ICompanyRecruitmentOpenService;
import com.lxj.recruitment.openData.service.ICompanyRecruitmentService;
import com.lxj.recruitment.openData.service.ICompanyService;
import com.lxj.recruitment.openData.util.MaxUtil;
import com.lxj.recruitment.openData.util.UserUtil;
import com.sun.org.apache.regexp.internal.RE;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.validation.constraints.NotNull;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
@Controller
@Slf4j
@ResponseBody
@RequestMapping("/recruitment")
public class CompanyRecruitmentController implements CompanyRecruitmentOpenFeign {
@Resource
private ICompanyRecruitmentService iCompanyRecruitmentService;
@Resource
private ICompanyService companyService;
@Resource
private ICompanyRecruitmentOpenService companyRecruitmentOpenService;
@Resource
private UserUtil userUtil;
@Resource
private HttpServletRequest request;
@Resource
private CityFeign cityFeign;
@Resource
private UserNoticeFeign userNoticeFeign;
/**
* 获取列表数据
* @param pageSize 数据条数
* @param pageNumber 第几页
* @param companyName 岗位名称
* @param recordSchooling 学历
* @param businessType 公司类型
* @param jobsType 岗位类型
* @param numberOf 公司人数
* @param experience 经验
* @param order 排序方式
* @return 状态码
*/
@GetMapping("/getList")
public ResponseEntity<PageInfo<SelectRecruitmentVo>> getList(@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
@RequestParam(value = "pageNumber",defaultValue = "1") Integer pageNumber,
@RequestParam(value = "companyName",required = false) String companyName,
@RequestParam(value = "jobsType",required = false) String jobsType,
@RequestParam(value = "cityName",required = false) String cityName,
@RequestParam(value = "businessType",required = false) String businessType,
@RequestParam(value = "salary",required = false) String salary,
@RequestParam(value = "detailsType",required = false) String detailsType,
@RequestParam(value = "order",required = true) String order,
@RequestParam(value = "numberOf",required = false) String numberOf,
@RequestParam(value = "recordSchooling",required = false) String recordSchooling,
@RequestParam(value = "experience",required = false) String experience){
Map<String,Object> map=new HashMap<>();
if (!StringUtils.isEmpty(companyName)) {
map.put("companyName","%"+companyName+"%");
}
if (!StringUtils.isEmpty(recordSchooling)) {
map.put("recordSchooling",recordSchooling);
}
if (!StringUtils.isEmpty(experience)) {
map.put("experience",experience);
}
if (!StringUtils.isEmpty(jobsType)) {
map.put("jobsType",jobsType);
}
if (!StringUtils.isEmpty(numberOf)) {
map.put("numberOf",numberOf);
}
if (!StringUtils.isEmpty(businessType)) {
map.put("businessType",businessType);
}
if (!StringUtils.isEmpty(salary)) {
if (salary.contains("-")) {
String[] split = salary.split("-");
String min = split[0].substring(0,split[0].length() - 1) + "000";
String max = split[1].substring(0,split[1].length() - 1) + "000";
map.put("min",min);
map.put("max",max);
} else {
String min = salary.substring(0,salary.length() - 1) + "000";
map.put("min",min);
}
}
if (!StringUtils.isEmpty(cityName)) {
map.put("cityName",cityName);
}
if (!StringUtils.isEmpty(order)) {
if (order.equals("1")) {
map.put("two","two");
} else if (order.equals("2")) {
map.put("there","there");
}
}
if (!StringUtils.isEmpty(detailsType)) {
map.put("type",detailsType);
}
PageHelper.startPage(pageNumber,pageSize);
List<SelectRecruitmentVo> selectList = this.iCompanyRecruitmentService.getSelectList(map);
PageInfo<SelectRecruitmentVo> pageInfo=new PageInfo<>(selectList);
return ResponseEntity.success(pageInfo);
}
@GetMapping("/getUserRecruitmentList")
public ResponseEntity<Object> getUserRecruitmentList(@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
@RequestParam(value = "pageNumber",defaultValue = "1") Integer pageNumber){
Integer userId = this.userUtil.getUserId(this.request);
if (userId == null) {
return ResponseEntity.isNotLogin();
}
PageHelper.startPage(pageNumber,pageSize);
QueryWrapper<CompanyRecruitment> queryWrapper=new QueryWrapper<>();
queryWrapper.eq("user_id",userId);
List<CompanyRecruitment> list = this.iCompanyRecruitmentService.list(queryWrapper);
PageInfo<CompanyRecruitment> pageInfo=new PageInfo<>(list);
return ResponseEntity.success(pageInfo);
}
@GetMapping("/getNotAuditMessage/{id}")
public ResponseEntity<String> getNotAuditMessage(@PathVariable("id") @NotNull(message = "参数缺失") Integer id){
CompanyRecruitment byId = this.iCompanyRecruitmentService.getById(id);
if (byId.getAuditStatus() == 0) {
return ResponseEntity.error("已经通过审核没有未通过原因");
}
return ResponseEntity.success(byId.getNoAuditMessage());
}
@PostMapping("/audit")
public ResponseEntity<Object> audit(@RequestParam("id") Integer id,
@RequestParam("status") Integer status,
@RequestParam(value = "message",required = false) String message){
boolean userType = this.userUtil.isUserType(this.request);
if (!userType) {
return ResponseEntity.error();
}
CompanyRecruitment byId = this.iCompanyRecruitmentService.
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
该项目是基于Java和Spring Cloud的个人招聘项目设计源码,包含700个文件,其中包括238个Class文件、236个Java文件、58个XML文件、51个Vue文件、33个JavaScript文件、16个PNG图片文件、14个YAML文件、10个JAR文件、7个JPG图片文件和6个CSS文件。该项目是一个小型的个人开发项目,主要用于巩固学习Spring Cloud框架等相关知识。
资源推荐
资源详情
资源评论
收起资源包目录
基于Java和Spring Cloud的个人招聘项目设计源码 (701个子文件)
CompanyRecruitmentController.class 22KB
CompanyRecruitment.class 17KB
RecruitmentDetailsVo.class 16KB
UserInteractiveController.class 15KB
UserDetailsController.class 14KB
UserMessageController.class 11KB
ManagementCompanyVo.class 10KB
Company.class 10KB
CompanyRecruitmentVo.class 10KB
UserDetails.class 9KB
UserInteractiveVo.class 9KB
User.class 9KB
LoginController.class 9KB
CompanyController.class 9KB
UserDetailsVo.class 9KB
BeanUtil.class 8KB
MessageUtil.class 8KB
UserController.class 8KB
UserMessageServiceImpl.class 8KB
SelectRecruitmentVo.class 8KB
UserGiveLikeController.class 8KB
EmailController.class 7KB
RecruitmentRecordVo.class 7KB
UserRealController.class 7KB
UserCollectionVo.class 7KB
ResponseCompanyVo.class 7KB
UserInteractiveServiceImpl.class 7KB
UserServiceImpl.class 6KB
GatewayConfig.class 6KB
UserMessage.class 6KB
EmailUtil.class 6KB
ResponseEntity.class 6KB
ResponseRealVo.class 6KB
UserInteractiveCommentsServiceImpl.class 6KB
UserReal.class 6KB
UserAndUserDetailsVo.class 6KB
PoolUtil.class 6KB
ReportVo.class 5KB
AddressController.class 5KB
ChnCity.class 5KB
UserInteractive.class 5KB
CompanyVo.class 5KB
CompanyReport.class 5KB
UserCollectionController.class 5KB
CompanyReportController.class 5KB
UserNoticeController.class 5KB
MessageListVo.class 5KB
WebSocketServer.class 5KB
ChnProvince.class 5KB
UserUtil.class 4KB
UserBlackController.class 4KB
CorsResponseHeaderFilter.class 4KB
ChnArea.class 4KB
MaxUtil.class 4KB
UserInteractiveComments.class 4KB
UserVipDetails.class 4KB
DateUtil.class 4KB
UserExpressionPackage.class 4KB
UserInteractiveRecord.class 4KB
UserInteractiveRecordServiceImpl.class 4KB
UserNotice.class 4KB
InteractiveCommentsVo.class 4KB
UserMessageList.class 4KB
EmailServiceImpl.class 4KB
CompanyRecruitmentOpenServiceImpl.class 4KB
InteractiveUserDetailsVo.class 3KB
UserCollection.class 3KB
UpdateCompanyVo.class 3KB
UserVipDetailsController.class 3KB
RealVo.class 3KB
UserDetailsServiceImpl.class 3KB
UserGiveLike.class 3KB
CompanyRecruitmentOpen.class 3KB
RecommendedRecruitmentVo.class 3KB
UserVo.class 3KB
LoginRecord.class 3KB
UserBrowse.class 3KB
UserCacheData.class 3KB
UserInteractiveCommentsController.class 3KB
PassWordMd5.class 3KB
Validation.class 3KB
JSONUtil.class 3KB
UserMessageListServiceImpl.class 3KB
WorkTypeDetails.class 3KB
UserExpressionPackageServiceImpl.class 3KB
EmailCodeCache.class 3KB
UserCancelRecord.class 3KB
InteractiveImgSrc.class 3KB
UserBlackVo.class 3KB
UserMessageBlackServiceImpl.class 3KB
UserExpressionPackageController.class 3KB
UserDto.class 3KB
CompanyRecruitmentServiceImpl.class 3KB
UserVipDetailsServiceImpl.class 3KB
ManagementController.class 3KB
RecruitmentOpenVo.class 2KB
UserCollectionVo.class 2KB
EmailCodeCache$1.class 2KB
MessageEntitiesVo.class 2KB
CompanyServiceImpl.class 2KB
共 701 条
- 1
- 2
- 3
- 4
- 5
- 6
- 8
资源评论
沐知全栈开发
- 粉丝: 5705
- 资源: 5216
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功