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);
|
||||
}
|
||||
}
|
@@ -0,0 +1,118 @@
|
||||
package com.ruoyi.cms.controller.cms;
|
||||
|
||||
import com.ruoyi.cms.domain.BussinessDictData;
|
||||
import com.ruoyi.cms.service.IBussinessDictDataService;
|
||||
import com.ruoyi.cms.service.IBussinessDictTypeService;
|
||||
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.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 数据字典信息
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/cms/dict/data")
|
||||
public class BussinessDictDataController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBussinessDictDataService dictDataService;
|
||||
|
||||
@Autowired
|
||||
private IBussinessDictTypeService dictTypeService;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BussinessDictData dictData)
|
||||
{
|
||||
startPage();
|
||||
List<BussinessDictData> list = dictDataService.selectDictDataList(dictData);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "字典数据", businessType = BusinessType.EXPORT)
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BussinessDictData dictData)
|
||||
{
|
||||
List<BussinessDictData> list = dictDataService.selectDictDataList(dictData);
|
||||
ExcelUtil<BussinessDictData> util = new ExcelUtil<BussinessDictData>(BussinessDictData.class);
|
||||
util.exportExcel(response, list, "字典数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询字典数据详细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:query')")
|
||||
@GetMapping(value = "/{dictCode}")
|
||||
public AjaxResult getInfo(@PathVariable Long dictCode)
|
||||
{
|
||||
return success(dictDataService.selectDictDataById(dictCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据字典类型查询字典数据信息
|
||||
*/
|
||||
@GetMapping(value = "/type/{dictType}")
|
||||
public AjaxResult dictType(@PathVariable String dictType)
|
||||
{
|
||||
List<BussinessDictData> data = dictTypeService.selectDictDataByType(dictType);
|
||||
if (StringUtils.isNull(data))
|
||||
{
|
||||
data = new ArrayList<BussinessDictData>();
|
||||
}
|
||||
return success(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增字典类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:add')")
|
||||
@Log(title = "字典数据", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody BussinessDictData dict)
|
||||
{
|
||||
dict.setCreateBy(getUsername());
|
||||
return toAjax(dictDataService.insertDictData(dict));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存字典类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:edit')")
|
||||
@Log(title = "字典数据", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody BussinessDictData dict)
|
||||
{
|
||||
dict.setUpdateBy(getUsername());
|
||||
return toAjax(dictDataService.updateDictData(dict));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除字典类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:remove')")
|
||||
@Log(title = "字典类型", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{dictCodes}")
|
||||
public AjaxResult remove(@PathVariable Long[] dictCodes)
|
||||
{
|
||||
dictDataService.deleteDictDataByIds(dictCodes);
|
||||
return success();
|
||||
}
|
||||
}
|
@@ -0,0 +1,127 @@
|
||||
package com.ruoyi.cms.controller.cms;
|
||||
|
||||
import com.ruoyi.cms.domain.BussinessDictType;
|
||||
import com.ruoyi.cms.service.IBussinessDictTypeService;
|
||||
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.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 数据字典信息
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/cms/dict/type")
|
||||
public class BussinessDictTypeController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBussinessDictTypeService dictTypeService;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BussinessDictType dictType)
|
||||
{
|
||||
startPage();
|
||||
List<BussinessDictType> list = dictTypeService.selectDictTypeList(dictType);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "字典类型", businessType = BusinessType.EXPORT)
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BussinessDictType dictType)
|
||||
{
|
||||
List<BussinessDictType> list = dictTypeService.selectDictTypeList(dictType);
|
||||
ExcelUtil<BussinessDictType> util = new ExcelUtil<BussinessDictType>(BussinessDictType.class);
|
||||
util.exportExcel(response, list, "字典类型");
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询字典类型详细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:query')")
|
||||
@GetMapping(value = "/{dictId}")
|
||||
public AjaxResult getInfo(@PathVariable Long dictId)
|
||||
{
|
||||
return success(dictTypeService.selectDictTypeById(dictId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增字典类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:add')")
|
||||
@Log(title = "字典类型", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody BussinessDictType dict)
|
||||
{
|
||||
if (!dictTypeService.checkDictTypeUnique(dict))
|
||||
{
|
||||
return error("新增字典'" + dict.getDictName() + "'失败,字典类型已存在");
|
||||
}
|
||||
dict.setCreateBy(getUsername());
|
||||
return toAjax(dictTypeService.insertDictType(dict));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改字典类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:edit')")
|
||||
@Log(title = "字典类型", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody BussinessDictType dict)
|
||||
{
|
||||
if (!dictTypeService.checkDictTypeUnique(dict))
|
||||
{
|
||||
return error("修改字典'" + dict.getDictName() + "'失败,字典类型已存在");
|
||||
}
|
||||
dict.setUpdateBy(getUsername());
|
||||
return toAjax(dictTypeService.updateDictType(dict));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除字典类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:remove')")
|
||||
@Log(title = "字典类型", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{dictIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] dictIds)
|
||||
{
|
||||
dictTypeService.deleteDictTypeByIds(dictIds);
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新字典缓存
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:remove')")
|
||||
@Log(title = "字典类型", businessType = BusinessType.CLEAN)
|
||||
@DeleteMapping("/refreshCache")
|
||||
public AjaxResult refreshCache()
|
||||
{
|
||||
dictTypeService.resetDictCache();
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字典选择框列表
|
||||
*/
|
||||
@GetMapping("/optionselect")
|
||||
public AjaxResult optionselect()
|
||||
{
|
||||
List<BussinessDictType> dictTypes = dictTypeService.selectDictTypeAll();
|
||||
return success(dictTypes);
|
||||
}
|
||||
}
|
@@ -0,0 +1,72 @@
|
||||
package com.ruoyi.cms.controller.cms;
|
||||
|
||||
import com.ruoyi.cms.domain.BussinessOperLog;
|
||||
import com.ruoyi.cms.service.IBussinessOperLogService;
|
||||
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.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
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 javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 操作日志记录
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/cms/operlog")
|
||||
@Api(tags = "后台:App用户日志")
|
||||
public class BussinessOperlogController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBussinessOperLogService operLogService;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('monitor:operlog:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("日志列表")
|
||||
public TableDataInfo list(BussinessOperLog operLog)
|
||||
{
|
||||
startPage();
|
||||
List<BussinessOperLog> list = operLogService.selectOperLogList(operLog);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "操作日志", businessType = BusinessType.EXPORT)
|
||||
@PreAuthorize("@ss.hasPermi('monitor:operlog:export')")
|
||||
@PostMapping("/export")
|
||||
@ApiOperation("日志导出excel")
|
||||
public void export(HttpServletResponse response, BussinessOperLog operLog)
|
||||
{
|
||||
List<BussinessOperLog> list = operLogService.selectOperLogList(operLog);
|
||||
ExcelUtil<BussinessOperLog> util = new ExcelUtil<BussinessOperLog>(BussinessOperLog.class);
|
||||
util.exportExcel(response, list, "操作日志");
|
||||
}
|
||||
|
||||
@Log(title = "操作日志", businessType = BusinessType.DELETE)
|
||||
@PreAuthorize("@ss.hasPermi('monitor:operlog:remove')")
|
||||
@DeleteMapping("/{operIds}")
|
||||
@ApiOperation("删除操作日志")
|
||||
public AjaxResult remove(@PathVariable Long[] operIds)
|
||||
{
|
||||
return toAjax(operLogService.deleteOperLogByIds(operIds));
|
||||
}
|
||||
|
||||
@Log(title = "操作日志", businessType = BusinessType.CLEAN)
|
||||
@PreAuthorize("@ss.hasPermi('monitor:operlog:remove')")
|
||||
@DeleteMapping("/clean")
|
||||
@ApiOperation("清空操作日志")
|
||||
public AjaxResult clean()
|
||||
{
|
||||
operLogService.cleanOperLog();
|
||||
return success();
|
||||
}
|
||||
}
|
@@ -0,0 +1,114 @@
|
||||
package com.ruoyi.cms.controller.cms;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.ruoyi.cms.domain.AppUser;
|
||||
import com.ruoyi.cms.service.IAppUserService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* APP用户Controller
|
||||
*
|
||||
* @author lishundong
|
||||
* @date 2024-09-03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/cms/appUser")
|
||||
@Api(tags = "后台:APP用户管理")
|
||||
public class CmsAppUserController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IAppUserService appUserService;
|
||||
|
||||
/**
|
||||
* 查询APP用户列表
|
||||
*/
|
||||
@ApiOperation("查询APP用户列表")
|
||||
@PreAuthorize("@ss.hasPermi('bussiness:user:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(AppUser appUser)
|
||||
{
|
||||
startPage();
|
||||
List<AppUser> list = appUserService.selectAppUserList(appUser);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出APP用户列表
|
||||
*/
|
||||
@ApiOperation("导出APP用户列表")
|
||||
@PreAuthorize("@ss.hasPermi('bussiness:user:export')")
|
||||
@Log(title = "APP用户", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, AppUser appUser)
|
||||
{
|
||||
List<AppUser> list = appUserService.selectAppUserList(appUser);
|
||||
ExcelUtil<AppUser> util = new ExcelUtil<AppUser>(AppUser.class);
|
||||
util.exportExcel(response, list, "APP用户数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取APP用户详细信息
|
||||
*/
|
||||
@ApiOperation("获取APP用户详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('bussiness:user:query')")
|
||||
@GetMapping(value = "/{userId}")
|
||||
public AjaxResult getInfo(@PathVariable("userId") Long userId)
|
||||
{
|
||||
return success(appUserService.selectAppUserByUserId(userId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增APP用户
|
||||
*/
|
||||
@ApiOperation("新增APP用户")
|
||||
@PreAuthorize("@ss.hasPermi('bussiness:user:add')")
|
||||
@Log(title = "APP用户", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AppUser appUser)
|
||||
{
|
||||
return toAjax(appUserService.insertAppUser(appUser));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改APP用户
|
||||
*/
|
||||
@ApiOperation("修改APP用户")
|
||||
@PreAuthorize("@ss.hasPermi('bussiness:user:edit')")
|
||||
@Log(title = "APP用户", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AppUser appUser)
|
||||
{
|
||||
return toAjax(appUserService.updateAppUser(appUser));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除APP用户
|
||||
*/
|
||||
@ApiOperation("删除APP用户")
|
||||
@PreAuthorize("@ss.hasPermi('bussiness:user:remove')")
|
||||
@Log(title = "APP用户", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{userIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] userIds)
|
||||
{
|
||||
return toAjax(appUserService.deleteAppUserByUserIds(userIds));
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,129 @@
|
||||
package com.ruoyi.cms.controller.cms;
|
||||
|
||||
import com.ruoyi.cms.domain.Job;
|
||||
import com.ruoyi.cms.domain.vo.CandidateVO;
|
||||
import com.ruoyi.cms.service.IJobService;
|
||||
import com.ruoyi.common.annotation.Anonymous;
|
||||
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.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
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 javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 岗位Controller
|
||||
*
|
||||
* @author lishundong
|
||||
* @date 2024-09-03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/cms/job")
|
||||
@Api(tags = "后台:岗位管理")
|
||||
@Anonymous
|
||||
public class CmsJobController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IJobService jobService;
|
||||
/**
|
||||
* 查询岗位列表
|
||||
*/
|
||||
@ApiOperation("查询岗位列表")
|
||||
@PreAuthorize("@ss.hasPermi('bussiness:job:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Job job)
|
||||
{
|
||||
startPage();
|
||||
List<Job> list = jobService.selectJobList(job);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取岗位详细信息
|
||||
*/
|
||||
@ApiOperation("获取岗位详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('bussiness:job:query')")
|
||||
@GetMapping(value = "/{jobId}")
|
||||
public AjaxResult getInfo(@PathVariable("jobId") Long jobId)
|
||||
{
|
||||
return success(jobService.selectJobByJobId(jobId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出岗位列表
|
||||
*/
|
||||
@ApiOperation("导出岗位列表")
|
||||
@PreAuthorize("@ss.hasPermi('app:job:export')")
|
||||
@Log(title = "岗位", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Job job)
|
||||
{
|
||||
List<Job> list = jobService.selectJobList(job);
|
||||
ExcelUtil<Job> util = new ExcelUtil<Job>(Job.class);
|
||||
util.exportExcel(response, list, "岗位数据");
|
||||
}
|
||||
/**
|
||||
* 新增岗位
|
||||
*/
|
||||
@ApiOperation("新增岗位")
|
||||
@PreAuthorize("@ss.hasPermi('app:job:add')")
|
||||
@Log(title = "岗位", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody Job job)
|
||||
{
|
||||
return toAjax(jobService.insertJob(job));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改岗位
|
||||
*/
|
||||
@ApiOperation("修改岗位")
|
||||
@PreAuthorize("@ss.hasPermi('app:job:edit')")
|
||||
@Log(title = "岗位", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Job job)
|
||||
{
|
||||
return toAjax(jobService.updateJob(job));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除岗位
|
||||
*/
|
||||
@ApiOperation("删除岗位")
|
||||
@PreAuthorize("@ss.hasPermi('app:job:remove')")
|
||||
@Log(title = "岗位", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{jobIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] jobIds)
|
||||
{
|
||||
return toAjax(jobService.deleteJobByJobIds(jobIds));
|
||||
}
|
||||
@ApiOperation("候选人查询")
|
||||
@Log(title = "岗位", businessType = BusinessType.DELETE)
|
||||
@GetMapping("/candidates")
|
||||
public TableDataInfo candidates(Long jobId)
|
||||
{
|
||||
startPage();
|
||||
List<CandidateVO> list = jobService.candidates(jobId);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@GetMapping("/import")
|
||||
public AjaxResult importData()
|
||||
{
|
||||
jobService.importData();
|
||||
return success();
|
||||
}
|
||||
@GetMapping("/importRow")
|
||||
public AjaxResult importRow()
|
||||
{
|
||||
jobService.importRow();
|
||||
return success();
|
||||
}
|
||||
}
|
@@ -0,0 +1,85 @@
|
||||
package com.ruoyi.cms.controller.cms;
|
||||
|
||||
import com.ruoyi.cms.domain.AppNotice;
|
||||
import com.ruoyi.cms.service.IAppNoticeService;
|
||||
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.enums.BusinessType;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公告 信息操作处理
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/cms/notice")
|
||||
public class CmsNoticeController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IAppNoticeService noticeService;
|
||||
|
||||
/**
|
||||
* 获取通知公告列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:notice:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(AppNotice notice)
|
||||
{
|
||||
startPage();
|
||||
List<AppNotice> list = noticeService.selectNoticeList(notice);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据通知公告编号获取详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:notice:query')")
|
||||
@GetMapping(value = "/{noticeId}")
|
||||
public AjaxResult getInfo(@PathVariable Long noticeId)
|
||||
{
|
||||
return success(noticeService.selectNoticeById(noticeId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增通知公告
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:notice:add')")
|
||||
@Log(title = "通知公告", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody AppNotice notice)
|
||||
{
|
||||
notice.setCreateBy(getUsername());
|
||||
return toAjax(noticeService.insertNotice(notice));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改通知公告
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:notice:edit')")
|
||||
@Log(title = "通知公告", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody AppNotice notice)
|
||||
{
|
||||
notice.setUpdateBy(getUsername());
|
||||
return toAjax(noticeService.updateNotice(notice));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除通知公告
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:notice:remove')")
|
||||
@Log(title = "通知公告", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{noticeIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] noticeIds)
|
||||
{
|
||||
return toAjax(noticeService.deleteNoticeByIds(noticeIds));
|
||||
}
|
||||
}
|
@@ -0,0 +1,113 @@
|
||||
package com.ruoyi.cms.controller.cms;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.ruoyi.cms.domain.CommercialArea;
|
||||
import com.ruoyi.cms.service.ICommercialAreaService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 商圈Controller
|
||||
*
|
||||
* @author Lishundong
|
||||
* @date 2024-11-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/cms/area")
|
||||
@Api(tags = "后台:商圈")
|
||||
public class CommercialAreaController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ICommercialAreaService commercialAreaService;
|
||||
|
||||
/**
|
||||
* 查询商圈列表
|
||||
*/
|
||||
@ApiOperation("查询商圈列表")
|
||||
@PreAuthorize("@ss.hasPermi('cms:area:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CommercialArea commercialArea)
|
||||
{
|
||||
startPage();
|
||||
List<CommercialArea> list = commercialAreaService.selectCommercialAreaList(commercialArea);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出商圈列表
|
||||
*/
|
||||
@ApiOperation("导出商圈列表")
|
||||
@PreAuthorize("@ss.hasPermi('cms:area:export')")
|
||||
@Log(title = "商圈", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CommercialArea commercialArea)
|
||||
{
|
||||
List<CommercialArea> list = commercialAreaService.selectCommercialAreaList(commercialArea);
|
||||
ExcelUtil<CommercialArea> util = new ExcelUtil<CommercialArea>(CommercialArea.class);
|
||||
util.exportExcel(response, list, "商圈数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商圈详细信息
|
||||
*/
|
||||
@ApiOperation("获取商圈详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('cms:area:query')")
|
||||
@GetMapping(value = "/{commercialAreaId}")
|
||||
public AjaxResult getInfo(@PathVariable("commercialAreaId") Long commercialAreaId)
|
||||
{
|
||||
return success(commercialAreaService.selectCommercialAreaByCommercialAreaId(commercialAreaId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商圈
|
||||
*/
|
||||
@ApiOperation("新增商圈")
|
||||
@PreAuthorize("@ss.hasPermi('cms:area:add')")
|
||||
@Log(title = "商圈", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody CommercialArea commercialArea)
|
||||
{
|
||||
return toAjax(commercialAreaService.insertCommercialArea(commercialArea));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商圈
|
||||
*/
|
||||
@ApiOperation("修改商圈")
|
||||
@PreAuthorize("@ss.hasPermi('cms:area:edit')")
|
||||
@Log(title = "商圈", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody CommercialArea commercialArea)
|
||||
{
|
||||
return toAjax(commercialAreaService.updateCommercialArea(commercialArea));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商圈
|
||||
*/
|
||||
@ApiOperation("删除商圈")
|
||||
@PreAuthorize("@ss.hasPermi('cms:area:remove')")
|
||||
@Log(title = "商圈", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{commercialAreaIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] commercialAreaIds)
|
||||
{
|
||||
return toAjax(commercialAreaService.deleteCommercialAreaByCommercialAreaIds(commercialAreaIds));
|
||||
}
|
||||
}
|
@@ -0,0 +1,116 @@
|
||||
package com.ruoyi.cms.controller.cms;
|
||||
|
||||
import java.sql.Array;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.ruoyi.cms.domain.CompanyCard;
|
||||
import com.ruoyi.cms.service.ICompanyCardService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 公司卡片Controller
|
||||
*
|
||||
* @author ${author}
|
||||
* @date 2025-02-18
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/cms/card")
|
||||
@Api(tags = "公司卡片")
|
||||
public class CompanyCardController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ICompanyCardService companyCardService;
|
||||
|
||||
/**
|
||||
* 查询公司卡片列表
|
||||
*/
|
||||
@ApiOperation("查询公司卡片列表")
|
||||
@PreAuthorize("@ss.hasPermi('system:card:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CompanyCard companyCard)
|
||||
{
|
||||
startPage();
|
||||
List<CompanyCard> list = companyCardService.selectCompanyCardList(companyCard);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出公司卡片列表
|
||||
*/
|
||||
@ApiOperation("导出公司卡片列表")
|
||||
@PreAuthorize("@ss.hasPermi('system:card:export')")
|
||||
@Log(title = "公司卡片", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CompanyCard companyCard)
|
||||
{
|
||||
List<CompanyCard> list = companyCardService.selectCompanyCardList(companyCard);
|
||||
ExcelUtil<CompanyCard> util = new ExcelUtil<CompanyCard>(CompanyCard.class);
|
||||
util.exportExcel(response, list, "公司卡片数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取公司卡片详细信息
|
||||
*/
|
||||
@ApiOperation("获取公司卡片详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('system:card:query')")
|
||||
@GetMapping(value = "/{companyCardId}")
|
||||
public AjaxResult getInfo(@PathVariable("companyCardId") Long companyCardId)
|
||||
{
|
||||
return success(companyCardService.selectCompanyCardByCompanyCardId(companyCardId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增公司卡片
|
||||
*/
|
||||
@ApiOperation("新增公司卡片")
|
||||
@PreAuthorize("@ss.hasPermi('system:card:add')")
|
||||
@Log(title = "公司卡片", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody CompanyCard companyCard)
|
||||
{
|
||||
return toAjax(companyCardService.insertCompanyCard(companyCard));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改公司卡片
|
||||
*/
|
||||
@ApiOperation("修改公司卡片")
|
||||
@PreAuthorize("@ss.hasPermi('system:card:edit')")
|
||||
@Log(title = "公司卡片", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody CompanyCard companyCard)
|
||||
{
|
||||
return toAjax(companyCardService.updateCompanyCard(companyCard));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除公司卡片
|
||||
*/
|
||||
@ApiOperation("删除公司卡片")
|
||||
@PreAuthorize("@ss.hasPermi('system:card:remove')")
|
||||
@Log(title = "公司卡片", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{companyCardIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] companyCardIds)
|
||||
{
|
||||
return toAjax(companyCardService.deleteCompanyCardByCompanyCardIds(companyCardIds));
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,110 @@
|
||||
package com.ruoyi.cms.controller.cms;
|
||||
|
||||
|
||||
import com.ruoyi.cms.domain.Company;
|
||||
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.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
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 javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公司Controller
|
||||
*
|
||||
* @author lishundong
|
||||
* @date 2024-09-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/cms/company")
|
||||
@Api(tags = "后台:公司管理")
|
||||
public class CompanyController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ICompanyService companyService;
|
||||
|
||||
/**
|
||||
* 查询公司列表
|
||||
*/
|
||||
@ApiOperation("查询公司列表")
|
||||
@PreAuthorize("@ss.hasPermi('app:company:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Company company)
|
||||
{
|
||||
startPage();
|
||||
List<Company> list = companyService.selectCompanyList(company);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出公司列表
|
||||
*/
|
||||
@ApiOperation("导出公司列表")
|
||||
@PreAuthorize("@ss.hasPermi('app:company:export')")
|
||||
@Log(title = "公司", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Company company)
|
||||
{
|
||||
List<Company> list = companyService.selectCompanyList(company);
|
||||
ExcelUtil<Company> util = new ExcelUtil<Company>(Company.class);
|
||||
util.exportExcel(response, list, "公司数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取公司详细信息
|
||||
*/
|
||||
@ApiOperation("获取公司详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('app:company:query')")
|
||||
@GetMapping(value = "/{companyId}")
|
||||
public AjaxResult getInfo(@PathVariable("companyId") Long companyId)
|
||||
{
|
||||
return success(companyService.selectCompanyByCompanyId(companyId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增公司
|
||||
*/
|
||||
@ApiOperation("新增公司")
|
||||
@PreAuthorize("@ss.hasPermi('app:company:add')")
|
||||
@Log(title = "公司", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody Company company)
|
||||
{
|
||||
return toAjax(companyService.insertCompany(company));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改公司
|
||||
*/
|
||||
@ApiOperation("修改公司")
|
||||
@PreAuthorize("@ss.hasPermi('app:company:edit')")
|
||||
@Log(title = "公司", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Company company)
|
||||
{
|
||||
return toAjax(companyService.updateCompany(company));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除公司
|
||||
*/
|
||||
@ApiOperation("删除公司")
|
||||
@PreAuthorize("@ss.hasPermi('app:company:remove')")
|
||||
@Log(title = "公司", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{companyIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] companyIds)
|
||||
{
|
||||
return toAjax(companyService.deleteCompanyByCompanyIds(companyIds));
|
||||
}
|
||||
}
|
@@ -0,0 +1,134 @@
|
||||
package com.ruoyi.cms.controller.cms;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.Industry;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.ruoyi.cms.service.IIndustryService;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* 行业Controller
|
||||
*
|
||||
* @author LishunDong
|
||||
* @date 2024-11-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/cms/industry")
|
||||
@Api(tags = "后台:行业管理")
|
||||
public class IndustryController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IIndustryService industryService;
|
||||
|
||||
/**
|
||||
* 查询行业列表
|
||||
*/
|
||||
@ApiOperation("查询行业列表")
|
||||
@PreAuthorize("@ss.hasPermi('cms:industry:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Industry industry)
|
||||
{
|
||||
startPage();
|
||||
List<Industry> list = industryService.selectIndustryList(industry);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@ApiOperation("行业树结构")
|
||||
@PreAuthorize("@ss.hasPermi('cms:industry:list')")
|
||||
@GetMapping("/treeselect")
|
||||
public AjaxResult treeselect(Industry industry)
|
||||
{
|
||||
List<Industry> industryList = industryService.selectIndustryList(industry);
|
||||
return success(industryService.buildIndustryTreeSelect(industryList));
|
||||
}
|
||||
/**
|
||||
* 导出行业列表
|
||||
*/
|
||||
@ApiOperation("导出行业列表")
|
||||
@PreAuthorize("@ss.hasPermi('cms:industry:export')")
|
||||
@Log(title = "行业", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Industry industry)
|
||||
{
|
||||
List<Industry> list = industryService.selectIndustryList(industry);
|
||||
ExcelUtil<Industry> util = new ExcelUtil<Industry>(Industry.class);
|
||||
util.exportExcel(response, list, "行业数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取行业详细信息
|
||||
*/
|
||||
@ApiOperation("获取行业详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('cms:industry:query')")
|
||||
@GetMapping(value = "/{industryId}")
|
||||
public AjaxResult getInfo(@PathVariable("industryId") Long industryId)
|
||||
{
|
||||
return success(industryService.selectIndustryByIndustryId(industryId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增行业
|
||||
*/
|
||||
@ApiOperation("新增行业")
|
||||
@PreAuthorize("@ss.hasPermi('cms:industry:add')")
|
||||
@Log(title = "行业", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody Industry industry)
|
||||
{
|
||||
return toAjax(industryService.insertIndustry(industry));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改行业
|
||||
*/
|
||||
@ApiOperation("修改行业")
|
||||
@PreAuthorize("@ss.hasPermi('cms:industry:edit')")
|
||||
@Log(title = "行业", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Industry industry)
|
||||
{
|
||||
return toAjax(industryService.updateIndustry(industry));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除行业
|
||||
*/
|
||||
@ApiOperation("删除行业")
|
||||
@PreAuthorize("@ss.hasPermi('cms:industry:remove')")
|
||||
@Log(title = "行业", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{industryId}")
|
||||
public AjaxResult remove(@PathVariable Long industryId)
|
||||
{
|
||||
if (industryService.hasChildByIndustryId(industryId))
|
||||
{
|
||||
return warn("存在子行业,不允许删除");
|
||||
}
|
||||
Long[] industryIds = {industryId};
|
||||
return toAjax(industryService.deleteIndustryByIndustryIds(industryIds));
|
||||
}
|
||||
@GetMapping("/import")
|
||||
public AjaxResult importData()
|
||||
{
|
||||
industryService.importData();
|
||||
return success();
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,110 @@
|
||||
package com.ruoyi.cms.controller.cms;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
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 com.ruoyi.cms.domain.JobFair;
|
||||
import com.ruoyi.cms.service.IJobFairService;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* 招聘会信息Controller
|
||||
*
|
||||
* @author lishundong
|
||||
* @date 2024-09-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/cms/fair")
|
||||
@Api(tags = "后台:招聘会信息")
|
||||
public class JobFairController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IJobFairService jobFairService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询招聘会信息列表
|
||||
*/
|
||||
@ApiOperation("查询招聘会信息列表")
|
||||
@PreAuthorize("@ss.hasPermi('app:fair:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(JobFair jobFair)
|
||||
{
|
||||
startPage();
|
||||
List<JobFair> list = jobFairService.selectJobFairList(jobFair);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出招聘会信息列表
|
||||
*/
|
||||
@ApiOperation("导出招聘会信息列表")
|
||||
@PreAuthorize("@ss.hasPermi('app:fair:export')")
|
||||
@Log(title = "招聘会信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, JobFair jobFair)
|
||||
{
|
||||
List<JobFair> list = jobFairService.selectJobFairList(jobFair);
|
||||
ExcelUtil<JobFair> util = new ExcelUtil<JobFair>(JobFair.class);
|
||||
util.exportExcel(response, list, "招聘会信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取招聘会信息详细信息
|
||||
*/
|
||||
@ApiOperation("获取招聘会信息详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('app:fair:query')")
|
||||
@GetMapping(value = "/{jobFairId}")
|
||||
public AjaxResult getInfo(@PathVariable("jobFairId") Long jobFairId)
|
||||
{
|
||||
return success(jobFairService.selectJobFairByJobFairId(jobFairId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增招聘会信息
|
||||
*/
|
||||
@ApiOperation("新增招聘会信息")
|
||||
@PreAuthorize("@ss.hasPermi('app:fair:add')")
|
||||
@Log(title = "招聘会信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody JobFair jobFair)
|
||||
{
|
||||
return toAjax(jobFairService.insertJobFair(jobFair));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改招聘会信息
|
||||
*/
|
||||
@ApiOperation("修改招聘会信息")
|
||||
@PreAuthorize("@ss.hasPermi('app:fair:edit')")
|
||||
@Log(title = "招聘会信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody JobFair jobFair)
|
||||
{
|
||||
return toAjax(jobFairService.updateJobFair(jobFair));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除招聘会信息
|
||||
*/
|
||||
@ApiOperation("删除招聘会信息")
|
||||
@PreAuthorize("@ss.hasPermi('app:fair:remove')")
|
||||
@Log(title = "招聘会信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{jobFairIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] jobFairIds)
|
||||
{
|
||||
return toAjax(jobFairService.deleteJobFairByJobFairIds(jobFairIds));
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,142 @@
|
||||
package com.ruoyi.cms.controller.cms;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.cms.domain.BussinessDictData;
|
||||
import com.ruoyi.common.core.domain.entity.Industry;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.ruoyi.common.core.domain.entity.JobTitle;
|
||||
import com.ruoyi.cms.service.IJobTitleService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 岗位Controller
|
||||
*
|
||||
* @author Lishundong
|
||||
* @date 2024-11-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/cms/job/titile")
|
||||
@Api(tags = "后台:职位接口")
|
||||
public class JobTitleController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IJobTitleService jobTitleService;
|
||||
|
||||
/**
|
||||
* 查询岗位列表
|
||||
*/
|
||||
@ApiOperation("查询岗位列表")
|
||||
@PreAuthorize("@ss.hasPermi('cms:title:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(JobTitle jobTitle)
|
||||
{
|
||||
startPage();
|
||||
List<JobTitle> list = jobTitleService.selectJobTitleList(jobTitle);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出岗位列表
|
||||
*/
|
||||
@ApiOperation("导出岗位列表")
|
||||
@PreAuthorize("@ss.hasPermi('cms:title:export')")
|
||||
@Log(title = "岗位", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, JobTitle jobTitle)
|
||||
{
|
||||
List<JobTitle> list = jobTitleService.selectJobTitleList(jobTitle);
|
||||
ExcelUtil<JobTitle> util = new ExcelUtil<JobTitle>(JobTitle.class);
|
||||
util.exportExcel(response, list, "岗位数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取岗位详细信息
|
||||
*/
|
||||
@ApiOperation("获取岗位详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('cms:title:query')")
|
||||
@GetMapping(value = "/{jobId}")
|
||||
public AjaxResult getInfo(@PathVariable("jobId") Long jobId)
|
||||
{
|
||||
return success(jobTitleService.selectJobTitleByJobId(jobId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增岗位
|
||||
*/
|
||||
@ApiOperation("新增岗位")
|
||||
@PreAuthorize("@ss.hasPermi('cms:title:add')")
|
||||
@Log(title = "岗位", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody JobTitle jobTitle)
|
||||
{
|
||||
return toAjax(jobTitleService.insertJobTitle(jobTitle));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改岗位
|
||||
*/
|
||||
@ApiOperation("修改岗位")
|
||||
@PreAuthorize("@ss.hasPermi('cms:title:edit')")
|
||||
@Log(title = "岗位", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody JobTitle jobTitle)
|
||||
{
|
||||
return toAjax(jobTitleService.updateJobTitle(jobTitle));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除岗位
|
||||
*/
|
||||
@ApiOperation("删除岗位")
|
||||
@PreAuthorize("@ss.hasPermi('cms:title:remove')")
|
||||
@Log(title = "岗位", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{jobId}")
|
||||
public AjaxResult remove(@PathVariable Long jobId)
|
||||
{
|
||||
if (jobTitleService.hasChildByJobId(jobId))
|
||||
{
|
||||
return warn("存在子岗位,不允许删除");
|
||||
}
|
||||
Long[] jobIds = {jobId};
|
||||
return toAjax(jobTitleService.deleteJobTitleByJobIds(jobIds));
|
||||
}
|
||||
@ApiOperation("行业树结构")
|
||||
@GetMapping("/treeselect")
|
||||
public AjaxResult treeselect(JobTitle jobTitle)
|
||||
{
|
||||
List<JobTitle> jobTitleList = jobTitleService.selectJobTitleList(jobTitle);
|
||||
return success(jobTitleService.buildJobTitleTreeSelect(jobTitleList));
|
||||
}
|
||||
|
||||
@GetMapping("/import")
|
||||
public AjaxResult importJobTitle()
|
||||
{
|
||||
jobTitleService.importJobTitle();
|
||||
return success();
|
||||
}
|
||||
|
||||
@GetMapping("/levelOne")
|
||||
public AjaxResult levelOne()
|
||||
{
|
||||
List<JobTitle> result = jobTitleService.levelOne();
|
||||
return success(result);
|
||||
}
|
||||
}
|
@@ -0,0 +1,88 @@
|
||||
package com.ruoyi.cms.controller.cms;
|
||||
|
||||
import com.ruoyi.cms.domain.BussinessDictType;
|
||||
import com.ruoyi.cms.domain.query.Staticsquery;
|
||||
import com.ruoyi.cms.service.StaticsqueryService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
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;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/cms/statics")
|
||||
public class StaticsController extends BaseController {
|
||||
@Autowired
|
||||
private StaticsqueryService service;
|
||||
//分行业趋势分析
|
||||
@GetMapping("/industry")
|
||||
public AjaxResult industry(Staticsquery staticsquery)
|
||||
{
|
||||
Map<String,Object> result = service.industry(staticsquery);
|
||||
return success(result);
|
||||
}
|
||||
//分行业趋势分析
|
||||
@GetMapping("/industryGen")
|
||||
public AjaxResult industryGen()
|
||||
{
|
||||
service.industryGen();
|
||||
return success();
|
||||
}
|
||||
//分行业趋势分析
|
||||
@GetMapping("/industryAreaGen")
|
||||
public AjaxResult industryAreaGen()
|
||||
{
|
||||
service.areaGen();
|
||||
return success();
|
||||
}
|
||||
//分行业趋势分析
|
||||
@GetMapping("/salaryGen")
|
||||
public AjaxResult salarysalaryGen()
|
||||
{
|
||||
service.salarysalaryGen();
|
||||
return success();
|
||||
}
|
||||
@GetMapping("/salary")
|
||||
public AjaxResult salary(Staticsquery staticsquery)
|
||||
{
|
||||
Map<String,Object> result = service.salary(staticsquery);
|
||||
return success(result);
|
||||
}
|
||||
@GetMapping("/industryArea")
|
||||
public AjaxResult industryArea(Staticsquery staticsquery)
|
||||
{
|
||||
Map<String,Object> result = service.industryArea(staticsquery);
|
||||
return success(result);
|
||||
}
|
||||
//分行业趋势分析
|
||||
@GetMapping("/workYearGen")
|
||||
public AjaxResult workYearGen()
|
||||
{
|
||||
service.workYearGen();
|
||||
return success();
|
||||
}
|
||||
@GetMapping("/workYear")
|
||||
public AjaxResult workYear(Staticsquery staticsquery)
|
||||
{
|
||||
Map<String,Object> result = service.workYear(staticsquery);
|
||||
return success(result);
|
||||
}
|
||||
//分行业趋势分析
|
||||
@GetMapping("/educationGen")
|
||||
public AjaxResult educationGen()
|
||||
{
|
||||
service.educationGen();
|
||||
return success();
|
||||
}
|
||||
@GetMapping("/education")
|
||||
public AjaxResult education(Staticsquery staticsquery)
|
||||
{
|
||||
Map<String,Object> result = service.education(staticsquery);
|
||||
return success(result);
|
||||
}
|
||||
}
|
@@ -0,0 +1,100 @@
|
||||
package com.ruoyi.cms.controller.cms;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.annotation.BussinessLog;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.ruoyi.cms.domain.SubwayLine;
|
||||
import com.ruoyi.cms.service.ISubwayLineService;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 地铁线路Controller
|
||||
*
|
||||
* @author Lishundong
|
||||
* @date 2024-11-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/cms/line")
|
||||
@Api(tags = "后台:地铁线路")
|
||||
public class SubwayLineController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISubwayLineService subwayLineService;
|
||||
|
||||
/**
|
||||
* 查询地铁线路列表
|
||||
*/
|
||||
@ApiOperation("查询地铁线路列表")
|
||||
@GetMapping("/list")
|
||||
@BussinessLog(title = "查询地铁线路列表", businessType = BusinessType.CLEAN)
|
||||
public TableDataInfo list(SubwayLine subwayLine)
|
||||
{
|
||||
startPage();
|
||||
List<SubwayLine> list = subwayLineService.selectSubwayLineList(subwayLine);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取地铁线路详细信息
|
||||
*/
|
||||
@ApiOperation("获取地铁线路详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('system:line:query')")
|
||||
@GetMapping(value = "/{lineId}")
|
||||
public AjaxResult getInfo(@PathVariable("lineId") Long lineId)
|
||||
{
|
||||
return success(subwayLineService.selectSubwayLineByLineId(lineId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增地铁线路
|
||||
*/
|
||||
@ApiOperation("新增地铁线路")
|
||||
@PreAuthorize("@ss.hasPermi('system:line:add')")
|
||||
@Log(title = "地铁线路", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SubwayLine subwayLine)
|
||||
{
|
||||
return toAjax(subwayLineService.insertSubwayLine(subwayLine));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改地铁线路
|
||||
*/
|
||||
@ApiOperation("修改地铁线路")
|
||||
@PreAuthorize("@ss.hasPermi('system:line:edit')")
|
||||
@Log(title = "地铁线路", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SubwayLine subwayLine)
|
||||
{
|
||||
return toAjax(subwayLineService.updateSubwayLine(subwayLine));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除地铁线路
|
||||
*/
|
||||
@ApiOperation("删除地铁线路")
|
||||
@PreAuthorize("@ss.hasPermi('system:line:remove')")
|
||||
@Log(title = "地铁线路", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{lineId}")
|
||||
public AjaxResult remove(@PathVariable Long lineId)
|
||||
{
|
||||
return toAjax(subwayLineService.deleteSubwayLineByLineIds(lineId));
|
||||
}
|
||||
}
|
@@ -0,0 +1,103 @@
|
||||
package com.ruoyi.cms.controller.cms;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.ruoyi.cms.domain.SubwayStation;
|
||||
import com.ruoyi.cms.service.ISubwayStationService;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 地铁站点Controller
|
||||
*
|
||||
* @author Lishundong
|
||||
* @date 2024-11-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/cms/station")
|
||||
@Api(tags = "后台:地铁站点")
|
||||
public class SubwayStationController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISubwayStationService subwayStationService;
|
||||
|
||||
/**
|
||||
* 查询地铁站点列表
|
||||
*/
|
||||
@ApiOperation("查询地铁站点列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SubwayStation subwayStation)
|
||||
{
|
||||
startPage();
|
||||
List<SubwayStation> list = subwayStationService.selectSubwayStationList(subwayStation);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取地铁站点详细信息
|
||||
*/
|
||||
@ApiOperation("获取地铁站点详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('system:station:query')")
|
||||
@GetMapping(value = "/{stationId}")
|
||||
public AjaxResult getInfo(@PathVariable("stationId") Long stationId)
|
||||
{
|
||||
return success(subwayStationService.selectSubwayStationByStationId(stationId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增地铁站点
|
||||
*/
|
||||
@ApiOperation("新增地铁站点")
|
||||
@PreAuthorize("@ss.hasPermi('system:station:add')")
|
||||
@Log(title = "地铁站点", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SubwayStation subwayStation)
|
||||
{
|
||||
return toAjax(subwayStationService.insertSubwayStation(subwayStation));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改地铁站点
|
||||
*/
|
||||
@ApiOperation("修改地铁站点")
|
||||
@PreAuthorize("@ss.hasPermi('system:station:edit')")
|
||||
@Log(title = "地铁站点", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SubwayStation subwayStation)
|
||||
{
|
||||
return toAjax(subwayStationService.updateSubwayStation(subwayStation));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除地铁站点
|
||||
*/
|
||||
@ApiOperation("删除地铁站点")
|
||||
@PreAuthorize("@ss.hasPermi('system:station:remove')")
|
||||
@Log(title = "地铁站点", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{stationIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] stationIds)
|
||||
{
|
||||
return toAjax(subwayStationService.deleteSubwayStationByStationIds(stationIds));
|
||||
}
|
||||
@GetMapping("/import")
|
||||
public AjaxResult importStation(){
|
||||
subwayStationService.importStation();
|
||||
return success();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user