WechatGroup
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
package com.ruoyi.cms.controller.app;
|
||||
|
||||
import com.ruoyi.cms.domain.AppUser;
|
||||
import com.ruoyi.cms.domain.BussinessDictData;
|
||||
import com.ruoyi.cms.domain.CommercialArea;
|
||||
import com.ruoyi.cms.domain.SubwayLine;
|
||||
import com.ruoyi.cms.service.*;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.TreeSelect;
|
||||
import com.ruoyi.common.core.domain.entity.JobTitle;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.ruoyi.common.utils.PageUtils.startPage;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/app/common")
|
||||
@Api(tags = "移动端:常用参数查询")
|
||||
public class AppCommonController extends BaseController {
|
||||
@Autowired
|
||||
private ISubwayLineService iSubwayLineService;
|
||||
@Autowired
|
||||
private ICommercialAreaService iCommercialAreaService;
|
||||
@Autowired
|
||||
private IJobTitleService iJobTitleService;
|
||||
@Autowired
|
||||
private IIndustryService industryService;
|
||||
@Autowired
|
||||
private IBussinessDictTypeService iBussinessDictTypeService;
|
||||
@ApiOperation("查询地铁")
|
||||
@GetMapping("/subway")
|
||||
public AjaxResult subway()
|
||||
{
|
||||
List<SubwayLine> list = iSubwayLineService.appSubway();
|
||||
return success(list);
|
||||
}
|
||||
@ApiOperation("查询商圈")
|
||||
@GetMapping("/commercialArea")
|
||||
public AjaxResult commercialArea()
|
||||
{
|
||||
List<CommercialArea> list = iCommercialAreaService.appCommercialArea();
|
||||
return success(list);
|
||||
}
|
||||
@ApiOperation("查询职业 树结构")
|
||||
@GetMapping("/jobTitle/treeselect")
|
||||
public AjaxResult jobTitle()
|
||||
{
|
||||
List<TreeSelect> jobTitleList = iJobTitleService.appJobTitle();
|
||||
return success(jobTitleList);
|
||||
}
|
||||
@ApiOperation("查询行业 树结构")
|
||||
@GetMapping("/industry/treeselect")
|
||||
public AjaxResult industry()
|
||||
{
|
||||
List<TreeSelect> industryList = industryService.appIndustry();
|
||||
return success(industryList);
|
||||
}
|
||||
@ApiOperation("查询字典")
|
||||
@GetMapping("/dict/{dictType}")
|
||||
public AjaxResult listDict(@PathVariable String dictType)
|
||||
{
|
||||
List<BussinessDictData> dictData = iBussinessDictTypeService.selectDictDataByType(dictType);
|
||||
return success(dictData);
|
||||
}
|
||||
@GetMapping("/standar/filed")
|
||||
public AjaxResult standarFiled()
|
||||
{
|
||||
Map<String,Object> filed = iBussinessDictTypeService.standarFiled();
|
||||
return success(filed);
|
||||
}
|
||||
}
|
@@ -0,0 +1,139 @@
|
||||
package com.ruoyi.cms.controller.app;
|
||||
|
||||
|
||||
import com.ruoyi.cms.domain.BussinessDictData;
|
||||
import com.ruoyi.cms.domain.Company;
|
||||
import com.ruoyi.cms.domain.CompanyCard;
|
||||
import com.ruoyi.cms.domain.query.LabelQuery;
|
||||
import com.ruoyi.cms.mapper.CompanyCardMapper;
|
||||
import com.ruoyi.cms.service.ICompanyCardService;
|
||||
import com.ruoyi.cms.service.ICompanyCollectionService;
|
||||
import com.ruoyi.cms.service.ICompanyService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.page.TableSupport;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公司Controller
|
||||
*
|
||||
* @author lishundong
|
||||
* @date 2024-09-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/app/company")
|
||||
@Api(tags = "移动端:公司")
|
||||
public class AppCompanyController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ICompanyService companyService;
|
||||
@Autowired
|
||||
private ICompanyCollectionService companyCollectionService;
|
||||
@Autowired
|
||||
private ICompanyCardService companyCardService;
|
||||
@Autowired
|
||||
private CompanyCardMapper companyCardMapper;
|
||||
/**
|
||||
* 获取公司详细信息
|
||||
*/
|
||||
@ApiOperation("获取公司详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('bussiness:company:query')")
|
||||
@GetMapping(value = "/{companyId}")
|
||||
public AjaxResult getInfo(@PathVariable("companyId") Long companyId)
|
||||
{
|
||||
return success(companyService.selectCompanyByCompanyId(companyId));
|
||||
}
|
||||
/**
|
||||
* 用户收藏公司
|
||||
*/
|
||||
@Log(title = "用户收藏公司")
|
||||
@PostMapping("/collection/{companyId}")
|
||||
@ApiOperation("用户收藏公司")
|
||||
public AjaxResult companyCollection(@PathVariable("companyId") Long companyId)
|
||||
{
|
||||
return toAjax(companyCollectionService.companyCollection(companyId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户取消收藏公司
|
||||
*/
|
||||
@Log(title = "用户取消收藏公司")
|
||||
@DeleteMapping("/collection/{companyId}")
|
||||
@ApiOperation("用户取消收藏公司")
|
||||
public AjaxResult companyCancel(@PathVariable("companyId") Long companyId)
|
||||
{
|
||||
return toAjax(companyCollectionService.companyCancel(companyId));
|
||||
}
|
||||
/**
|
||||
* 公司下的岗位
|
||||
*/
|
||||
@Log(title = "公司下的岗位")
|
||||
@GetMapping("/job/{companyId}")
|
||||
@ApiOperation("公司下的岗位")
|
||||
public TableDataInfo jobCompany(@ApiParam("公司id") @PathVariable Long companyId)
|
||||
{
|
||||
startPage();
|
||||
return getDataTable(companyCollectionService.jobCompany(companyId));
|
||||
}
|
||||
@Log(title = "查看企业卡片")
|
||||
@GetMapping("/card")
|
||||
@ApiOperation("查看企业卡片")
|
||||
public TableDataInfo card()
|
||||
{
|
||||
startPage();
|
||||
return getDataTable(companyCardService.cardApp());
|
||||
}
|
||||
@Log(title = "收藏企业卡片")
|
||||
@PutMapping("/card/collection/{companyCardId}")
|
||||
@ApiOperation("收藏企业卡片")
|
||||
public AjaxResult cardCollection(@PathVariable Long companyCardId)
|
||||
{
|
||||
companyCardService.cardCollection(companyCardId);
|
||||
return success();
|
||||
}
|
||||
@Log(title = "取消收藏企业卡片")
|
||||
@DeleteMapping("/card/collection/{companyCardId}")
|
||||
@ApiOperation("取消收藏公司卡片")
|
||||
public AjaxResult cardCancel(@PathVariable Long companyCardId)
|
||||
{
|
||||
companyCardService.cardCancel(companyCardId);
|
||||
return success();
|
||||
}
|
||||
@Log(title = "公司招聘的岗位数量")
|
||||
@GetMapping("/count/{companyId}")
|
||||
@ApiOperation("公司招聘的岗位数量")
|
||||
public AjaxResult count(@PathVariable Long companyId)
|
||||
{
|
||||
Integer count = companyService.count(companyId);
|
||||
return success(count);
|
||||
}
|
||||
@Log(title = "公司标签下的公司")
|
||||
@GetMapping("/label")
|
||||
@ApiOperation("公司标签下的公司")
|
||||
public TableDataInfo label(LabelQuery labelQuery)
|
||||
{
|
||||
CompanyCard companyCard = companyCardMapper.selectById(labelQuery.getCardId());
|
||||
startPage();
|
||||
List<Company> companyList = companyService.label(companyCard,labelQuery);
|
||||
return getDataTable(companyList);
|
||||
}
|
||||
@GetMapping("/importLabel500")
|
||||
public void importLabel()
|
||||
{
|
||||
companyService.importLabel();
|
||||
}
|
||||
@GetMapping("/importLabelBank")
|
||||
public void importLabelBank()
|
||||
{
|
||||
companyService.importLabelBank();
|
||||
}
|
||||
}
|
@@ -0,0 +1,74 @@
|
||||
package com.ruoyi.cms.controller.app;
|
||||
|
||||
|
||||
import com.ruoyi.cms.domain.JobFair;
|
||||
import com.ruoyi.cms.service.IFairCollectionService;
|
||||
import com.ruoyi.cms.service.IJobFairService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 招聘会Controller
|
||||
*
|
||||
* @author lishundong
|
||||
* @date 2024-09-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/app/fair")
|
||||
@Api(tags = "移动端:招聘会")
|
||||
public class AppFairController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IJobFairService jobFairService;
|
||||
@Autowired
|
||||
private IFairCollectionService fairCollectionService;
|
||||
/**
|
||||
* 招聘会列表
|
||||
*/
|
||||
@Log(title = "招聘会列表")
|
||||
@GetMapping
|
||||
public TableDataInfo list(JobFair jobFair)
|
||||
{
|
||||
startPage();
|
||||
List<JobFair> results = jobFairService.appList(jobFair);
|
||||
return getDataTable(results);
|
||||
}
|
||||
|
||||
/**
|
||||
* 招聘会详情
|
||||
*/
|
||||
@Log(title = "招聘会详情")
|
||||
@GetMapping("/{fairId}")
|
||||
public AjaxResult appDetail(@ApiParam("招聘会id") @PathVariable Long fairId)
|
||||
{
|
||||
return success(jobFairService.appDetail(fairId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户收藏招聘会
|
||||
*/
|
||||
@Log(title = "用户收藏招聘会")
|
||||
@PostMapping("/collection/{fairId}")
|
||||
public AjaxResult companyCollection(@ApiParam("招聘会id") @PathVariable Long fairId)
|
||||
{
|
||||
return toAjax(fairCollectionService.fairCollection(fairId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户取消收藏招聘会
|
||||
*/
|
||||
@Log(title = "用户取消收藏招聘会")
|
||||
@DeleteMapping("/collection/{fairId}")
|
||||
public AjaxResult companyCancel(@ApiParam("招聘会id") @PathVariable Long fairId)
|
||||
{
|
||||
return toAjax(fairCollectionService.cancel(fairId));
|
||||
}
|
||||
}
|
@@ -0,0 +1,21 @@
|
||||
package com.ruoyi.cms.controller.app;
|
||||
|
||||
import com.ruoyi.cms.service.IFileService;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/app/file")
|
||||
public class AppFileController {
|
||||
@Autowired
|
||||
private IFileService fileService;
|
||||
@PostMapping("/upload")
|
||||
public AjaxResult uploadFile(@RequestParam("file") MultipartFile file, @RequestParam(value = "bussinessId",required = false) Long bussinessId) {
|
||||
return fileService.uploadFile(file,bussinessId);
|
||||
}
|
||||
}
|
@@ -0,0 +1,294 @@
|
||||
package com.ruoyi.cms.controller.app;
|
||||
|
||||
import com.ruoyi.cms.domain.ESJobDocument;
|
||||
import com.ruoyi.cms.domain.Job;
|
||||
import com.ruoyi.cms.domain.query.ESJobSearch;
|
||||
import com.ruoyi.cms.domain.vo.CompetitivenessResponse;
|
||||
import com.ruoyi.cms.domain.vo.RadarChart;
|
||||
import com.ruoyi.cms.service.IESJobSearchService;
|
||||
import com.ruoyi.cms.service.IJobCollectionService;
|
||||
import com.ruoyi.cms.service.IJobService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.dromara.easyes.core.biz.EsPageInfo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 岗位Controller
|
||||
*
|
||||
* @author lishundong
|
||||
* @date 2024-09-03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/app/job")
|
||||
@Api(tags = "移动端:岗位相关接口")
|
||||
public class AppJobController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IJobService jobService;
|
||||
@Autowired
|
||||
private IJobCollectionService jobCollectionService;
|
||||
@Autowired
|
||||
private IESJobSearchService esJobSearchService;
|
||||
|
||||
private Calendar calendar = Calendar.getInstance();
|
||||
private Date date = new Date();
|
||||
{
|
||||
calendar.set(Calendar.YEAR, 2025); // 设置年份
|
||||
calendar.set(Calendar.MONTH, Calendar.JULY); // 设置月份(7月)
|
||||
calendar.set(Calendar.DAY_OF_MONTH, 12); // 设置日期
|
||||
date = calendar.getTime(); // 转换为Date对象
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询岗位列表
|
||||
*/
|
||||
@ApiOperation("查询岗位列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ESJobSearch job, HttpServletRequest request)
|
||||
{
|
||||
// 打印请求参数
|
||||
System.out.println("Request Parameters:");
|
||||
request.getParameterMap().forEach((key, value) -> {
|
||||
System.out.println(key + " = " + String.join(", ", value));
|
||||
});
|
||||
// 打印请求头
|
||||
System.out.println("Request Headers:");
|
||||
Enumeration<String> headerNames = request.getHeaderNames();
|
||||
Iterator<String> iterator = Collections.list(headerNames).iterator();
|
||||
iterator.forEachRemaining(headerName -> {
|
||||
System.out.println(headerName + " = " + request.getHeader(headerName));
|
||||
});
|
||||
EsPageInfo<ESJobDocument> list = jobService.appList(job);
|
||||
return getTableDataInfo(list);
|
||||
}
|
||||
/**
|
||||
* 获取5条推荐岗位
|
||||
*/
|
||||
@ApiOperation("获取推荐岗位")
|
||||
@GetMapping("/recommend")
|
||||
public AjaxResult recommend(ESJobSearch esJobSearch)
|
||||
{
|
||||
List<ESJobDocument> jobList = jobService.recommend(esJobSearch);
|
||||
for (ESJobDocument esJobDocument:jobList){
|
||||
esJobDocument.setPostingDate(date);
|
||||
}
|
||||
return success(jobList);
|
||||
}
|
||||
@ApiOperation("获取littleVideo")
|
||||
@GetMapping("/littleVideo")
|
||||
public AjaxResult littleVideo(ESJobSearch esJobSearch)
|
||||
{
|
||||
List<ESJobDocument> jobList = jobService.littleVideo(esJobSearch);
|
||||
for (ESJobDocument esJobDocument:jobList){
|
||||
esJobDocument.setPostingDate(date);
|
||||
}
|
||||
return success(jobList);
|
||||
}
|
||||
|
||||
@ApiOperation("获取littleVideo")
|
||||
@GetMapping("/littleVideo/random")
|
||||
public AjaxResult littleVideo(@RequestParam(required = true) String uuid,@RequestParam(required = false) Integer count,@RequestParam(required = false) String jobTitle)
|
||||
{
|
||||
List<ESJobDocument> jobList = jobService.littleVideoRandom(uuid,count,jobTitle);
|
||||
for (ESJobDocument esJobDocument:jobList){
|
||||
esJobDocument.setPostingDate(date);
|
||||
}
|
||||
return success(jobList);
|
||||
}
|
||||
/**
|
||||
* 获取5条推荐岗位
|
||||
*/
|
||||
@GetMapping("/updateLon")
|
||||
public void updateLon()
|
||||
{
|
||||
jobService.updateLon();
|
||||
}
|
||||
/**
|
||||
* 附件工作
|
||||
*/
|
||||
@ApiOperation("附近工作")
|
||||
@PostMapping(value = "/nearJob")
|
||||
public TableDataInfo nearJob(@RequestBody ESJobSearch jobQuery)
|
||||
{
|
||||
EsPageInfo<ESJobDocument> list = esJobSearchService.nearJob(jobQuery);
|
||||
List<ESJobDocument> jobList = list.getList();
|
||||
for (ESJobDocument esJobDocument:jobList){
|
||||
esJobDocument.setPostingDate(date);
|
||||
}
|
||||
list.setList(jobList);
|
||||
return getTableDataInfo(list);
|
||||
}
|
||||
/**
|
||||
* 附件工作
|
||||
*/
|
||||
@ApiOperation("区县工作")
|
||||
@PostMapping(value = "/countyJob")
|
||||
public TableDataInfo countyJob(@RequestBody ESJobSearch job)
|
||||
{
|
||||
EsPageInfo<ESJobDocument> list = jobService.countyJobList(job);
|
||||
List<ESJobDocument> jobList = list.getList();
|
||||
for (ESJobDocument esJobDocument:jobList){
|
||||
esJobDocument.setPostingDate(date);
|
||||
}
|
||||
list.setList(jobList);
|
||||
return getTableDataInfo(list);
|
||||
}
|
||||
/**
|
||||
* 地铁周边
|
||||
*/
|
||||
@ApiOperation("地铁周边")
|
||||
@PostMapping(value = "/subway")
|
||||
public TableDataInfo subway(@RequestBody ESJobSearch jobQuery)
|
||||
{
|
||||
EsPageInfo<ESJobDocument> list = jobService.subway(jobQuery);
|
||||
List<ESJobDocument> jobList = list.getList();
|
||||
for (ESJobDocument esJobDocument:jobList){
|
||||
esJobDocument.setPostingDate(date);
|
||||
}
|
||||
list.setList(jobList);
|
||||
return getTableDataInfo(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 商圈周边
|
||||
*/
|
||||
@ApiOperation("商圈周边")
|
||||
@PostMapping(value = "/commercialArea")
|
||||
public TableDataInfo commercialArea(@RequestBody ESJobSearch jobQuery)
|
||||
{
|
||||
EsPageInfo<ESJobDocument> list = jobService.commercialArea(jobQuery);
|
||||
List<ESJobDocument> jobList = list.getList();
|
||||
for (ESJobDocument esJobDocument:jobList){
|
||||
esJobDocument.setPostingDate(date);
|
||||
}
|
||||
list.setList(jobList);
|
||||
return getTableDataInfo(list);
|
||||
}
|
||||
/**
|
||||
* 获取岗位详细信息
|
||||
*/
|
||||
@ApiOperation("获取岗位详细信息")
|
||||
@GetMapping(value = "/{jobId}")
|
||||
public AjaxResult getInfo(@PathVariable("jobId") Long jobId)
|
||||
{
|
||||
Job job = jobService.selectJobByJobIdApp(jobId);
|
||||
job.setPostingDate(date);
|
||||
return success(job);
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户收藏岗位
|
||||
*/
|
||||
@Log(title = "用户收藏岗位")
|
||||
@PostMapping("/collection/{jobId}")
|
||||
@ApiOperation("用户收藏")
|
||||
public AjaxResult jobCollection(@ApiParam("岗位id") @PathVariable Long jobId)
|
||||
{
|
||||
return toAjax(jobCollectionService.jobCollection(jobId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户取消收藏岗位
|
||||
*/
|
||||
@Log(title = "用户取消收藏岗位")
|
||||
@DeleteMapping("/collection/{jobId}")
|
||||
@ApiOperation("用户取消收藏岗位")
|
||||
public AjaxResult cancel(@ApiParam("岗位id") @PathVariable Long jobId)
|
||||
{
|
||||
return toAjax(jobCollectionService.cancel(jobId));
|
||||
}
|
||||
/**
|
||||
* 用户申请岗位
|
||||
*/
|
||||
@Log(title = "用户申请岗位")
|
||||
@GetMapping("/apply/{jobId}")
|
||||
@ApiOperation("用户申请岗位")
|
||||
public AjaxResult apply(@ApiParam("岗位id") @PathVariable Long jobId)
|
||||
{
|
||||
return toAjax(jobCollectionService.apply(jobId));
|
||||
}
|
||||
@Log(title = "竞争力分析")
|
||||
@GetMapping("/competitiveness/{jobId}")
|
||||
@ApiOperation("竞争力分析")
|
||||
public AjaxResult competitiveness(@ApiParam("岗位id") @PathVariable Long jobId) {
|
||||
// Generate random values for the response
|
||||
Random random = new Random();
|
||||
|
||||
// Build radar chart with random values between 60-95
|
||||
RadarChart radarChart = new RadarChart();
|
||||
radarChart.setAge(60 + random.nextInt(36)); // 60-95
|
||||
radarChart.setExperience(60 + random.nextInt(36));
|
||||
radarChart.setEducation(60 + random.nextInt(36));
|
||||
radarChart.setSkill(60 + random.nextInt(36));
|
||||
radarChart.setSalary(60 + random.nextInt(36));
|
||||
radarChart.setLocation(60 + random.nextInt(36));
|
||||
|
||||
// Build response with random values
|
||||
CompetitivenessResponse response = new CompetitivenessResponse();
|
||||
response.setTotalApplicants(0); // Always 0 as requested
|
||||
response.setMatchScore(60 + random.nextInt(41)); // 60-100
|
||||
response.setRank(1 + random.nextInt(10)); // 1-10
|
||||
response.setPercentile(random.nextInt(101)); // 0-100
|
||||
response.setRadarChart(radarChart);
|
||||
|
||||
return success(response);
|
||||
}
|
||||
private TableDataInfo getTableDataInfo(EsPageInfo<ESJobDocument> result){
|
||||
long total = result.getTotal();
|
||||
TableDataInfo rspData = new TableDataInfo();
|
||||
rspData.setCode(200);
|
||||
rspData.setRows(result.getList());
|
||||
rspData.setTotal(total > 200 ? 200 : total);
|
||||
return rspData;
|
||||
}
|
||||
@GetMapping("/import")
|
||||
public AjaxResult importData()
|
||||
{
|
||||
jobService.importData();
|
||||
return success();
|
||||
}
|
||||
@GetMapping("/importRow")
|
||||
public AjaxResult importRow()
|
||||
{
|
||||
jobService.importRow();
|
||||
return success();
|
||||
}
|
||||
@GetMapping("/update")
|
||||
public AjaxResult update()
|
||||
{
|
||||
jobService.updateEs();
|
||||
return success();
|
||||
}
|
||||
@PostMapping("/getWechatUrl")
|
||||
public AjaxResult getWechatUrl(@RequestBody HashMap<String,String> url)
|
||||
{
|
||||
String s = url.get("imgUrl");
|
||||
return AjaxResult.success(jobService.getWechatUrl(s));
|
||||
}
|
||||
@PostMapping("/insert")
|
||||
public AjaxResult insertTemp(@RequestBody Job job)
|
||||
{
|
||||
return AjaxResult.success(jobService.insertTemp(job));
|
||||
}
|
||||
@ApiOperation("生成分享的html")
|
||||
@GetMapping("/htmlGen/{id}")
|
||||
public AjaxResult htmlGen(@PathVariable(required = true) Long id)
|
||||
{
|
||||
String result = jobService.htmlGen(id);
|
||||
return AjaxResult.success(result);
|
||||
}
|
||||
@GetMapping("/fix")
|
||||
public void fix()
|
||||
{
|
||||
jobService.fix();
|
||||
}
|
||||
}
|
@@ -0,0 +1,66 @@
|
||||
package com.ruoyi.cms.controller.app;
|
||||
|
||||
import com.ruoyi.cms.domain.AppUser;
|
||||
import com.ruoyi.cms.domain.Job;
|
||||
import com.ruoyi.cms.domain.Notice;
|
||||
import com.ruoyi.cms.domain.vo.AppNoticeVO;
|
||||
import com.ruoyi.cms.service.IAppNoticeService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.PageDomain;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.ruoyi.common.utils.PageUtils.startPage;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/app/notice")
|
||||
@Api(tags = "移动端:消息")
|
||||
public class AppNoticeInfoController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IAppNoticeService appNoticeService;
|
||||
@ApiOperation("消息列表")
|
||||
@GetMapping("/info")
|
||||
public AjaxResult listNotRead(@RequestParam(required = false) Integer isRead)
|
||||
{
|
||||
List<Notice> appNoticeVO = appNoticeService.listNotRead(isRead);
|
||||
return AjaxResult.success(appNoticeVO);
|
||||
}
|
||||
@ApiOperation("推荐岗位列表")
|
||||
@GetMapping("/recommend")
|
||||
public TableDataInfo recommend(@RequestParam(required = false)String jobTitle)
|
||||
{
|
||||
startPage();
|
||||
List<Job> list = appNoticeService.recommend(jobTitle);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@ApiOperation("系统通知已读")
|
||||
@PostMapping("/read/sysNotice")
|
||||
public AjaxResult sysNotice(@RequestParam String id)
|
||||
{
|
||||
appNoticeService.sysNotice(id);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
@ApiOperation("岗位推荐、招聘会已读")
|
||||
@PostMapping("/read")
|
||||
public AjaxResult read(@RequestParam String id)
|
||||
{
|
||||
appNoticeService.read(id);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
@ApiOperation("系统通知列表")
|
||||
@GetMapping("/sysNotice")
|
||||
public TableDataInfo sysNoticeList()
|
||||
{
|
||||
startPage();
|
||||
List<Notice> list = appNoticeService.sysNoticeList();
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
@@ -0,0 +1,117 @@
|
||||
package com.ruoyi.cms.controller.app;
|
||||
|
||||
import com.ruoyi.cms.domain.AppUser;
|
||||
import com.ruoyi.cms.domain.Company;
|
||||
import com.ruoyi.cms.domain.Job;
|
||||
import com.ruoyi.cms.domain.JobFair;
|
||||
import com.ruoyi.cms.domain.query.MineJobQuery;
|
||||
import com.ruoyi.cms.service.*;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* app用户Controller
|
||||
*
|
||||
* @author lishundong
|
||||
* @date 2024-09-03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/app/user")
|
||||
@Api(tags = "移动端:用户相关")
|
||||
public class AppUserController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IAppUserService appUserService;
|
||||
@Autowired
|
||||
private IAppReviewJobService appReviewJobService;
|
||||
@Autowired
|
||||
private IJobCollectionService jobCollectionService;
|
||||
@Autowired
|
||||
private ICompanyCollectionService companyCollectionService;
|
||||
@Autowired
|
||||
private IJobApplyService jobApplyService;
|
||||
@Autowired
|
||||
private IFairCollectionService fairCollectionService;
|
||||
/**
|
||||
* 查询岗位列表
|
||||
*/
|
||||
@ApiOperation("保存简历")
|
||||
@PostMapping("/resume")
|
||||
public AjaxResult saveResume(@RequestBody AppUser appUser)
|
||||
{
|
||||
appUser.setUserId(SecurityUtils.getUserId());
|
||||
appUserService.updateAppUser(appUser);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
@ApiOperation("查看简历")
|
||||
@GetMapping("/resume")
|
||||
public AjaxResult getResume()
|
||||
{
|
||||
AppUser appUser = appUserService.selectAppUserByUserId(SecurityUtils.getUserId());
|
||||
return AjaxResult.success(appUser);
|
||||
}
|
||||
@ApiOperation("我的浏览")
|
||||
@GetMapping("/review")
|
||||
public TableDataInfo review(MineJobQuery jobQuery)
|
||||
{
|
||||
startPage();
|
||||
List<Job> jobs = appReviewJobService.review(jobQuery);
|
||||
return getDataTable(jobs);
|
||||
}
|
||||
@ApiOperation("我的浏览-日期数组")
|
||||
@GetMapping("/review/array")
|
||||
public AjaxResult reviewArray(MineJobQuery jobQuery)
|
||||
{
|
||||
|
||||
List<String> dateList = appReviewJobService.reviewArray();
|
||||
return AjaxResult.success(dateList);
|
||||
}
|
||||
@ApiOperation("我的岗位收藏")
|
||||
@GetMapping("/collection/job")
|
||||
public TableDataInfo collectionJob()
|
||||
{
|
||||
startPage();
|
||||
List<Job> jobs = jobCollectionService.collectionJob();
|
||||
return getDataTable(jobs);
|
||||
}
|
||||
@ApiOperation("我的公司收藏")
|
||||
@GetMapping("/collection/company")
|
||||
public TableDataInfo collectionCompany()
|
||||
{
|
||||
startPage();
|
||||
List<Company> jobs = companyCollectionService.collectionCompany();
|
||||
return getDataTable(jobs);
|
||||
}
|
||||
@ApiOperation("我的招聘会收藏")
|
||||
@GetMapping("/collection/fair")
|
||||
public TableDataInfo collectionFair(@RequestParam(name = "type") Integer type)
|
||||
{
|
||||
startPage();
|
||||
List<JobFair> jobs = fairCollectionService.appCollectionFair(type);
|
||||
return getDataTable(jobs);
|
||||
}
|
||||
@ApiOperation("我申请的岗位")
|
||||
@GetMapping("/apply/job")
|
||||
public TableDataInfo applyJob()
|
||||
{
|
||||
startPage();
|
||||
List<Job> jobs = jobApplyService.applyJob();
|
||||
return getDataTable(jobs);
|
||||
}
|
||||
@ApiOperation("统计")
|
||||
@GetMapping("/statistics")
|
||||
public AjaxResult statistics()
|
||||
{
|
||||
HashMap<String,Integer> result = jobApplyService.statistics();
|
||||
return AjaxResult.success(result);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user