update
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
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;
|
||||
@@ -8,22 +7,17 @@ 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 org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
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 = "移动端:常用参数查询")
|
||||
@@ -73,6 +67,7 @@ public class AppCommonController extends BaseController {
|
||||
List<BussinessDictData> dictData = iBussinessDictTypeService.selectDictDataByType(dictType);
|
||||
return success(dictData);
|
||||
}
|
||||
@ApiOperation("字段标准")
|
||||
@GetMapping("/standar/filed")
|
||||
public AjaxResult standarFiled()
|
||||
{
|
||||
|
@@ -1,7 +1,6 @@
|
||||
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;
|
||||
@@ -9,16 +8,14 @@ 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.annotation.BussinessLog;
|
||||
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;
|
||||
@@ -46,7 +43,6 @@ public class AppCompanyController extends BaseController
|
||||
* 获取公司详细信息
|
||||
*/
|
||||
@ApiOperation("获取公司详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('bussiness:company:query')")
|
||||
@GetMapping(value = "/{companyId}")
|
||||
public AjaxResult getInfo(@PathVariable("companyId") Long companyId)
|
||||
{
|
||||
@@ -55,7 +51,7 @@ public class AppCompanyController extends BaseController
|
||||
/**
|
||||
* 用户收藏公司
|
||||
*/
|
||||
@Log(title = "用户收藏公司")
|
||||
@BussinessLog(title = "用户收藏公司")
|
||||
@PostMapping("/collection/{companyId}")
|
||||
@ApiOperation("用户收藏公司")
|
||||
public AjaxResult companyCollection(@PathVariable("companyId") Long companyId)
|
||||
@@ -66,7 +62,7 @@ public class AppCompanyController extends BaseController
|
||||
/**
|
||||
* 用户取消收藏公司
|
||||
*/
|
||||
@Log(title = "用户取消收藏公司")
|
||||
@BussinessLog(title = "用户取消收藏公司")
|
||||
@DeleteMapping("/collection/{companyId}")
|
||||
@ApiOperation("用户取消收藏公司")
|
||||
public AjaxResult companyCancel(@PathVariable("companyId") Long companyId)
|
||||
@@ -76,7 +72,6 @@ public class AppCompanyController extends BaseController
|
||||
/**
|
||||
* 公司下的岗位
|
||||
*/
|
||||
@Log(title = "公司下的岗位")
|
||||
@GetMapping("/job/{companyId}")
|
||||
@ApiOperation("公司下的岗位")
|
||||
public TableDataInfo jobCompany(@ApiParam("公司id") @PathVariable Long companyId)
|
||||
@@ -84,7 +79,6 @@ public class AppCompanyController extends BaseController
|
||||
startPage();
|
||||
return getDataTable(companyCollectionService.jobCompany(companyId));
|
||||
}
|
||||
@Log(title = "查看企业卡片")
|
||||
@GetMapping("/card")
|
||||
@ApiOperation("查看企业卡片")
|
||||
public TableDataInfo card()
|
||||
@@ -92,7 +86,7 @@ public class AppCompanyController extends BaseController
|
||||
startPage();
|
||||
return getDataTable(companyCardService.cardApp());
|
||||
}
|
||||
@Log(title = "收藏企业卡片")
|
||||
@BussinessLog(title = "收藏企业卡片")
|
||||
@PutMapping("/card/collection/{companyCardId}")
|
||||
@ApiOperation("收藏企业卡片")
|
||||
public AjaxResult cardCollection(@PathVariable Long companyCardId)
|
||||
@@ -100,7 +94,7 @@ public class AppCompanyController extends BaseController
|
||||
companyCardService.cardCollection(companyCardId);
|
||||
return success();
|
||||
}
|
||||
@Log(title = "取消收藏企业卡片")
|
||||
@BussinessLog(title = "取消收藏企业卡片")
|
||||
@DeleteMapping("/card/collection/{companyCardId}")
|
||||
@ApiOperation("取消收藏公司卡片")
|
||||
public AjaxResult cardCancel(@PathVariable Long companyCardId)
|
||||
@@ -108,7 +102,6 @@ public class AppCompanyController extends BaseController
|
||||
companyCardService.cardCancel(companyCardId);
|
||||
return success();
|
||||
}
|
||||
@Log(title = "公司招聘的岗位数量")
|
||||
@GetMapping("/count/{companyId}")
|
||||
@ApiOperation("公司招聘的岗位数量")
|
||||
public AjaxResult count(@PathVariable Long companyId)
|
||||
@@ -116,7 +109,6 @@ public class AppCompanyController extends BaseController
|
||||
Integer count = companyService.count(companyId);
|
||||
return success(count);
|
||||
}
|
||||
@Log(title = "公司标签下的公司")
|
||||
@GetMapping("/label")
|
||||
@ApiOperation("公司标签下的公司")
|
||||
public TableDataInfo label(LabelQuery labelQuery)
|
||||
@@ -126,14 +118,5 @@ public class AppCompanyController extends BaseController
|
||||
List<Company> companyList = companyService.label(companyCard,labelQuery);
|
||||
return getDataTable(companyList);
|
||||
}
|
||||
@GetMapping("/importLabel500")
|
||||
public void importLabel()
|
||||
{
|
||||
companyService.importLabel();
|
||||
}
|
||||
@GetMapping("/importLabelBank")
|
||||
public void importLabelBank()
|
||||
{
|
||||
companyService.importLabelBank();
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@ 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.annotation.BussinessLog;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
@@ -33,7 +33,7 @@ public class AppFairController extends BaseController
|
||||
/**
|
||||
* 招聘会列表
|
||||
*/
|
||||
@Log(title = "招聘会列表")
|
||||
@BussinessLog(title = "招聘会列表")
|
||||
@GetMapping
|
||||
public TableDataInfo list(JobFair jobFair)
|
||||
{
|
||||
@@ -45,7 +45,7 @@ public class AppFairController extends BaseController
|
||||
/**
|
||||
* 招聘会详情
|
||||
*/
|
||||
@Log(title = "招聘会详情")
|
||||
@BussinessLog(title = "招聘会详情")
|
||||
@GetMapping("/{fairId}")
|
||||
public AjaxResult appDetail(@ApiParam("招聘会id") @PathVariable Long fairId)
|
||||
{
|
||||
@@ -55,7 +55,7 @@ public class AppFairController extends BaseController
|
||||
/**
|
||||
* 用户收藏招聘会
|
||||
*/
|
||||
@Log(title = "用户收藏招聘会")
|
||||
@BussinessLog(title = "用户收藏招聘会")
|
||||
@PostMapping("/collection/{fairId}")
|
||||
public AjaxResult companyCollection(@ApiParam("招聘会id") @PathVariable Long fairId)
|
||||
{
|
||||
@@ -65,7 +65,7 @@ public class AppFairController extends BaseController
|
||||
/**
|
||||
* 用户取消收藏招聘会
|
||||
*/
|
||||
@Log(title = "用户取消收藏招聘会")
|
||||
@BussinessLog(title = "用户取消收藏招聘会")
|
||||
@DeleteMapping("/collection/{fairId}")
|
||||
public AjaxResult companyCancel(@ApiParam("招聘会id") @PathVariable Long fairId)
|
||||
{
|
||||
|
@@ -1,6 +1,7 @@
|
||||
package com.ruoyi.cms.controller.app;
|
||||
|
||||
import com.ruoyi.cms.service.IFileService;
|
||||
import com.ruoyi.common.annotation.BussinessLog;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -14,6 +15,7 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
public class AppFileController {
|
||||
@Autowired
|
||||
private IFileService fileService;
|
||||
@BussinessLog(title = "上传文件")
|
||||
@PostMapping("/upload")
|
||||
public AjaxResult uploadFile(@RequestParam("file") MultipartFile file, @RequestParam(value = "bussinessId",required = false) Long bussinessId) {
|
||||
return fileService.uploadFile(file,bussinessId);
|
||||
|
@@ -8,6 +8,7 @@ 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.BussinessLog;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
@@ -18,8 +19,9 @@ 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.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* 岗位Controller
|
||||
@@ -39,37 +41,28 @@ public class AppJobController extends BaseController
|
||||
@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)
|
||||
public TableDataInfo list(ESJobSearch job)
|
||||
{
|
||||
// 打印请求参数
|
||||
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);
|
||||
return getTableDataInfo2(list,job);
|
||||
}
|
||||
|
||||
private TableDataInfo getTableDataInfo2(EsPageInfo<ESJobDocument> list, ESJobSearch job) {
|
||||
long total = list.getTotal();
|
||||
TableDataInfo rspData = new TableDataInfo();
|
||||
rspData.setCode(200);
|
||||
rspData.setRows(list.getList());
|
||||
rspData.setTotal(total > 200 ? 200 : total);
|
||||
job.setCompany(null);
|
||||
rspData.setData(job);
|
||||
return rspData;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取5条推荐岗位
|
||||
*/
|
||||
@@ -78,12 +71,9 @@ public class AppJobController extends BaseController
|
||||
public AjaxResult recommend(ESJobSearch esJobSearch)
|
||||
{
|
||||
List<ESJobDocument> jobList = jobService.recommend(esJobSearch);
|
||||
for (ESJobDocument esJobDocument:jobList){
|
||||
esJobDocument.setPostingDate(date);
|
||||
}
|
||||
return success(jobList);
|
||||
}
|
||||
@ApiOperation("获取littleVideo")
|
||||
@ApiOperation("获取短视频")
|
||||
@GetMapping("/littleVideo")
|
||||
public AjaxResult littleVideo(ESJobSearch esJobSearch)
|
||||
{
|
||||
@@ -91,21 +81,13 @@ public class AppJobController extends BaseController
|
||||
return success(jobList);
|
||||
}
|
||||
|
||||
@ApiOperation("获取littleVideo")
|
||||
@ApiOperation("随机获取短视频")
|
||||
@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);
|
||||
return success(jobList);
|
||||
}
|
||||
/**
|
||||
* 获取5条推荐岗位
|
||||
*/
|
||||
@GetMapping("/updateLon")
|
||||
public void updateLon()
|
||||
{
|
||||
jobService.updateLon();
|
||||
}
|
||||
/**
|
||||
* 附件工作
|
||||
*/
|
||||
@@ -115,9 +97,6 @@ public class AppJobController extends BaseController
|
||||
{
|
||||
EsPageInfo<ESJobDocument> list = esJobSearchService.nearJob(jobQuery);
|
||||
List<ESJobDocument> jobList = list.getList();
|
||||
for (ESJobDocument esJobDocument:jobList){
|
||||
esJobDocument.setPostingDate(date);
|
||||
}
|
||||
list.setList(jobList);
|
||||
return getTableDataInfo(list);
|
||||
}
|
||||
@@ -130,9 +109,6 @@ public class AppJobController extends BaseController
|
||||
{
|
||||
EsPageInfo<ESJobDocument> list = jobService.countyJobList(job);
|
||||
List<ESJobDocument> jobList = list.getList();
|
||||
for (ESJobDocument esJobDocument:jobList){
|
||||
esJobDocument.setPostingDate(date);
|
||||
}
|
||||
list.setList(jobList);
|
||||
return getTableDataInfo(list);
|
||||
}
|
||||
@@ -145,9 +121,6 @@ public class AppJobController extends BaseController
|
||||
{
|
||||
EsPageInfo<ESJobDocument> list = jobService.subway(jobQuery);
|
||||
List<ESJobDocument> jobList = list.getList();
|
||||
for (ESJobDocument esJobDocument:jobList){
|
||||
esJobDocument.setPostingDate(date);
|
||||
}
|
||||
list.setList(jobList);
|
||||
return getTableDataInfo(list);
|
||||
}
|
||||
@@ -161,9 +134,6 @@ public class AppJobController extends BaseController
|
||||
{
|
||||
EsPageInfo<ESJobDocument> list = jobService.commercialArea(jobQuery);
|
||||
List<ESJobDocument> jobList = list.getList();
|
||||
for (ESJobDocument esJobDocument:jobList){
|
||||
esJobDocument.setPostingDate(date);
|
||||
}
|
||||
list.setList(jobList);
|
||||
return getTableDataInfo(list);
|
||||
}
|
||||
@@ -175,14 +145,13 @@ public class AppJobController extends BaseController
|
||||
public AjaxResult getInfo(@PathVariable("jobId") Long jobId)
|
||||
{
|
||||
Job job = jobService.selectJobByJobIdApp(jobId);
|
||||
job.setPostingDate(date);
|
||||
return success(job);
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户收藏岗位
|
||||
*/
|
||||
@Log(title = "用户收藏岗位")
|
||||
@BussinessLog(title = "用户收藏岗位")
|
||||
@PostMapping("/collection/{jobId}")
|
||||
@ApiOperation("用户收藏")
|
||||
public AjaxResult jobCollection(@ApiParam("岗位id") @PathVariable Long jobId)
|
||||
@@ -193,7 +162,7 @@ public class AppJobController extends BaseController
|
||||
/**
|
||||
* 用户取消收藏岗位
|
||||
*/
|
||||
@Log(title = "用户取消收藏岗位")
|
||||
@BussinessLog(title = "用户取消收藏岗位")
|
||||
@DeleteMapping("/collection/{jobId}")
|
||||
@ApiOperation("用户取消收藏岗位")
|
||||
public AjaxResult cancel(@ApiParam("岗位id") @PathVariable Long jobId)
|
||||
@@ -203,38 +172,17 @@ public class AppJobController extends BaseController
|
||||
/**
|
||||
* 用户申请岗位
|
||||
*/
|
||||
@Log(title = "用户申请岗位")
|
||||
@BussinessLog(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);
|
||||
return success(jobCollectionService.competitiveness(jobId));
|
||||
}
|
||||
private TableDataInfo getTableDataInfo(EsPageInfo<ESJobDocument> result){
|
||||
long total = result.getTotal();
|
||||
@@ -244,45 +192,5 @@ public class AppJobController extends BaseController
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,15 +1,12 @@
|
||||
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.annotation.BussinessLog;
|
||||
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;
|
||||
@@ -17,8 +14,6 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.ruoyi.common.utils.PageUtils.startPage;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/app/notice")
|
||||
@Api(tags = "移动端:消息")
|
||||
@@ -43,6 +38,7 @@ public class AppNoticeInfoController extends BaseController {
|
||||
}
|
||||
@ApiOperation("系统通知已读")
|
||||
@PostMapping("/read/sysNotice")
|
||||
@BussinessLog(title = "系统通知标记已读")
|
||||
public AjaxResult sysNotice(@RequestParam String id)
|
||||
{
|
||||
appNoticeService.sysNotice(id);
|
||||
@@ -50,6 +46,7 @@ public class AppNoticeInfoController extends BaseController {
|
||||
}
|
||||
@ApiOperation("岗位推荐、招聘会已读")
|
||||
@PostMapping("/read")
|
||||
@BussinessLog(title = "岗位推荐、招聘会已读标记已读")
|
||||
public AjaxResult read(@RequestParam String id)
|
||||
{
|
||||
appNoticeService.read(id);
|
||||
|
@@ -0,0 +1,73 @@
|
||||
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.ICompanyService;
|
||||
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 java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* 岗位Controller
|
||||
*
|
||||
* @author lishundong
|
||||
* @date 2024-09-03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/app/script")
|
||||
@Api(tags = "移动端:脚本")
|
||||
public class AppScriptController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IJobService jobService;
|
||||
@Autowired
|
||||
private ICompanyService companyService;
|
||||
//更新经纬度
|
||||
@GetMapping("/updateLon")
|
||||
public void updateLon()
|
||||
{
|
||||
jobService.updateLon();
|
||||
}
|
||||
//导入数据
|
||||
@GetMapping("/import")
|
||||
public AjaxResult importData()
|
||||
{
|
||||
jobService.importData();
|
||||
return success();
|
||||
}
|
||||
//导入原始数据
|
||||
@GetMapping("/importRow")
|
||||
public AjaxResult importRow(@RequestParam String path)
|
||||
{
|
||||
jobService.importRow(path);
|
||||
return success();
|
||||
}
|
||||
// 导入500强
|
||||
@GetMapping("/importLabel500")
|
||||
public void importLabel()
|
||||
{
|
||||
companyService.importLabel();
|
||||
}
|
||||
// 随机导入3个公司到银行标签
|
||||
@GetMapping("/importLabelBank")
|
||||
public void importLabelBank()
|
||||
{
|
||||
companyService.importLabelBank();
|
||||
}
|
||||
}
|
@@ -0,0 +1,37 @@
|
||||
package com.ruoyi.cms.controller.app;
|
||||
|
||||
import com.alibaba.nls.client.AccessToken;
|
||||
import com.ruoyi.cms.handler.SpeechRecognizerAI;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* app语音Controller
|
||||
*
|
||||
* @author lishundong
|
||||
* @date 2024-09-03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/app/speech")
|
||||
@Api(tags = "移动端:用户相关")
|
||||
public class AppSpeechController extends BaseController
|
||||
{
|
||||
private String appKey = "4lFYn2yPsQymwGu8";
|
||||
private String id = "LTAI5t9hhSqdDHqwH3RjgyYj";
|
||||
private String secret = "ni5aW3vxrWouMwcGqJPfh9Uu56PBuv";
|
||||
private String url = System.getenv().getOrDefault("NLS_GATEWAY_URL", "wss://nls-gateway-cn-shanghai.aliyuncs.com/ws/v1");
|
||||
@ApiOperation("统计")
|
||||
@GetMapping("/getToken")
|
||||
public AjaxResult getToken()
|
||||
{
|
||||
SpeechRecognizerAI recognizerDemo = new SpeechRecognizerAI(appKey, id, secret, url);
|
||||
AccessToken accessToken = recognizerDemo.getAccessToken();
|
||||
String token = "wss://nls-gateway.cn-shanghai.aliyuncs.com/ws/v1?appkey="+appKey+"&token="+accessToken.getToken();
|
||||
return AjaxResult.success(token);
|
||||
}
|
||||
}
|
@@ -6,6 +6,7 @@ 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.annotation.BussinessLog;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
@@ -46,6 +47,7 @@ public class AppUserController extends BaseController
|
||||
*/
|
||||
@ApiOperation("保存简历")
|
||||
@PostMapping("/resume")
|
||||
@BussinessLog(title = "保存简历")
|
||||
public AjaxResult saveResume(@RequestBody AppUser appUser)
|
||||
{
|
||||
appUser.setUserId(SecurityUtils.getUserId());
|
||||
|
@@ -24,7 +24,7 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/cms/operlog")
|
||||
@Api(tags = "后台:App用户日志")
|
||||
@Api(tags = "后台:App用户操作日志")
|
||||
public class BussinessOperlogController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
|
@@ -121,9 +121,9 @@ public class CmsJobController extends BaseController
|
||||
return success();
|
||||
}
|
||||
@GetMapping("/importRow")
|
||||
public AjaxResult importRow()
|
||||
public AjaxResult importRow(@RequestParam String path)
|
||||
{
|
||||
jobService.importRow();
|
||||
jobService.importRow(path);
|
||||
return success();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user