添加查询公告邮箱 投递地址 岗位地址
This commit is contained in:
@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
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.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
@@ -48,6 +49,24 @@ public class RecruitAnnouncementController {
|
|||||||
return recruitAnnouncementService.pageAnnouncement(param);
|
return recruitAnnouncementService.pageAnnouncement(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 根据公告id查询公告地址 */
|
||||||
|
@GetMapping("/announcementUrl")
|
||||||
|
public String getAnnouncementUrl(@RequestParam Long id) {
|
||||||
|
return recruitAnnouncementService.getAnnouncementUrl(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 根据公告id查询岗位投递地址 */
|
||||||
|
@GetMapping("/applyUrl")
|
||||||
|
public String getApplyUrl(@RequestParam Long id) {
|
||||||
|
return recruitAnnouncementService.getApplyUrl(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 根据公告id查询投递邮箱 */
|
||||||
|
@GetMapping("/applyEmail")
|
||||||
|
public String getApplyEmail(@RequestParam Long id) {
|
||||||
|
return recruitAnnouncementService.getApplyEmail(id);
|
||||||
|
}
|
||||||
|
|
||||||
/** 查询公告批次列表(去重) */
|
/** 查询公告批次列表(去重) */
|
||||||
@GetMapping("/batch")
|
@GetMapping("/batch")
|
||||||
public List<String> listBatchName() {
|
public List<String> listBatchName() {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import org.jiayunet.pojo.PageResult;
|
|||||||
import org.jiayunet.pojo.dto.recruitAnnouncement.RecruitAnnouncementDto;
|
import org.jiayunet.pojo.dto.recruitAnnouncement.RecruitAnnouncementDto;
|
||||||
import org.jiayunet.pojo.dto.recruitAnnouncement.RecruitAnnouncementStatisticsDto;
|
import org.jiayunet.pojo.dto.recruitAnnouncement.RecruitAnnouncementStatisticsDto;
|
||||||
import org.jiayunet.pojo.param.recruitAnnouncement.RecruitAnnouncementQueryParam;
|
import org.jiayunet.pojo.param.recruitAnnouncement.RecruitAnnouncementQueryParam;
|
||||||
|
import org.jiayunet.pojo.po.RecruitAnnouncement;
|
||||||
import org.jiayunet.pojo.po.RecruitAnnouncementBatch;
|
import org.jiayunet.pojo.po.RecruitAnnouncementBatch;
|
||||||
import org.jiayunet.pojo.po.RecruitAnnouncementCategory;
|
import org.jiayunet.pojo.po.RecruitAnnouncementCategory;
|
||||||
import org.jiayunet.pojo.po.RecruitAnnouncementCity;
|
import org.jiayunet.pojo.po.RecruitAnnouncementCity;
|
||||||
@@ -123,6 +124,33 @@ public class RecruitAnnouncementService {
|
|||||||
return new PageResult<>(page.getCurrent(), page.getSize(), page.getTotal(), dtoList);
|
return new PageResult<>(page.getCurrent(), page.getSize(), page.getTotal(), dtoList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据公告id查询公告地址
|
||||||
|
* <p>只查单列,公告不存在时返回null</p>
|
||||||
|
*/
|
||||||
|
public String getAnnouncementUrl(Long id) {
|
||||||
|
RecruitAnnouncement po = recruitAnnouncementMapper.selectOne(new LambdaQueryWrapper<RecruitAnnouncement>().select(RecruitAnnouncement::getAnnouncementUrl).eq(RecruitAnnouncement::getId, id));
|
||||||
|
return po == null ? null : po.getAnnouncementUrl();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据公告id查询岗位投递地址
|
||||||
|
* <p>只查单列,公告不存在时返回null</p>
|
||||||
|
*/
|
||||||
|
public String getApplyUrl(Long id) {
|
||||||
|
RecruitAnnouncement po = recruitAnnouncementMapper.selectOne(new LambdaQueryWrapper<RecruitAnnouncement>().select(RecruitAnnouncement::getApplyUrl).eq(RecruitAnnouncement::getId, id));
|
||||||
|
return po == null ? null : po.getApplyUrl();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据公告id查询投递邮箱
|
||||||
|
* <p>只查单列,公告不存在时返回null</p>
|
||||||
|
*/
|
||||||
|
public String getApplyEmail(Long id) {
|
||||||
|
RecruitAnnouncement po = recruitAnnouncementMapper.selectOne(new LambdaQueryWrapper<RecruitAnnouncement>().select(RecruitAnnouncement::getApplyEmail).eq(RecruitAnnouncement::getId, id));
|
||||||
|
return po == null ? null : po.getApplyEmail();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 统计公告数量(今日新增/本月新增/累计)
|
* 统计公告数量(今日新增/本月新增/累计)
|
||||||
* <p>1. 按东八区算出今日零点、本月1号零点 2. 一次SQL条件聚合出三个计数 3. 转DTO返回</p>
|
* <p>1. 按东八区算出今日零点、本月1号零点 2. 一次SQL条件聚合出三个计数 3. 转DTO返回</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user