123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448 |
- /**
- * Copyright © 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
- */
- package com.wechat.dao;
- import com.wechat.global.base.dao.Pagination;
- import com.wechat.global.base.dao.PagingResult;
- import com.wechat.global.base.dao.impl.BaseDao;
- import com.wechat.model.dbEntity.MdeJobAdvertised;
- import com.wechat.model.dbEntity.MdeJobAdvertisedEntity;
- import com.wechat.model.dbEntity.MdeJobInvitationRel;
- import com.wechat.model.dto.AvailableAndUsedCountDto;
- import com.wechat.model.dto.JobAdvertisedListDto;
- import com.wechat.model.dto.JobRepFormPvDto;
- import com.wechat.model.dto.ShowOfJobsDto;
- import com.wechat.model.responseDto.JobAdvertisedNologinResp;
- import com.wechat.model.responseDto.JobAdvertisedRes;
- import com.wechat.model.responseDto.JobAdvertisedResp;
- import org.springframework.stereotype.Repository;
- import java.util.HashMap;
- import java.util.List;
- import java.util.Map;
- /**
- * 单表生成DAO接口
- *
- * @author tangwc
- * @version 2018-05-23
- */
- @Repository
- public class MdeJobAdvertisedDao extends BaseDao {
- public MdeJobAdvertised getInfoById(int id, String lang) {
- Map<String, Object> map = new HashMap<String, Object>();
- map.put("id", id);
- map.put("lang", lang);
- return super.selectOne("MdeJobAdvertisedMapper.get", map);
- }
- public MdeJobAdvertisedEntity getJobAdvertisedById(int id) {
- Map<String, Object> map = new HashMap<String, Object>();
- map.put("id", id);
- return super.selectOne("MdeJobAdvertisedMapper.getInfoById", map);
- }
- /**
- * 根据id查询全部相关职位的详情
- *
- * @param id
- * @param lang
- * @return
- */
- public List<ShowOfJobsDto> getInfoByIds(List<String> idList) {
- Map<String, Object> map = new HashMap<String, Object>();
- map.put("idList", idList);
- return super.select("MdeJobAdvertisedMapper.getInfoByIds", map);
- }
- /**
- * 获取推荐职位
- *
- * @param limi
- * @return
- */
- public List<MdeJobAdvertised> getRecommentJobs(int limitSize) {
- return super.select("MdeJobAdvertisedMapper.getRecommentJobs", limitSize);
- }
- /**
- * 获取推荐职位-分页查询
- *
- * @param limi
- * @return
- */
- public PagingResult<JobAdvertisedListDto> getPagingRecommentJobs(Pagination page) {
- return super.selectPagination("MdeJobAdvertisedMapper.getPagingRecommentJobs", "MdeJobAdvertisedMapper.getPagingRecommentJobsCount", page);
- }
- /**
- * 优选职位
- *
- * @param userCode
- * @param recommentJobsLimitSize
- * @return
- */
- /* public List<MdeJobAdvertised> getRecommentJobs(String userCode, int recommentJobsLimitSize) {
- Map<String, Object> map = new HashMap<String, Object>();
- map.put("userCode", userCode);
- map.put("limitSize", recommentJobsLimitSize);
- return super.select("MdeJobAdvertisedMapper.getRecommentJobsByUserCode", map);
- }*/
- /**
- * 优选职位
- *
- * @param userCode
- * @param lang
- * @param limitSize
- * @return
- */
- /*public List<MdeJobAdvertised> getSuperiorJobs(String userCode, String lang, int limitSize) {
- Map<String, Object> map = new HashMap<String, Object>();
- map.put("userCode", userCode);
- map.put("lang", lang);
- map.put("limitSize", limitSize);
- return super.select("MdeJobAdvertisedMapper.getSuperiorJobs", map);
- }*/
- /**
- * 职位搜索
- *
- * @param page
- * @return
- */
- public PagingResult<JobAdvertisedListDto> searchJob(Pagination page) {
- return super.selectPagination("MdeJobAdvertisedMapper.searchJob", "MdeJobAdvertisedMapper.searchJobCount", page);
- }
- /**
- * 职位搜索
- *
- * @param page
- * @return
- */
- public PagingResult<JobAdvertisedListDto> searchPositionByKeyWord(Pagination page) {
- return super.selectPagination("MdeJobAdvertisedMapper.searchPositionByKeyWord", "MdeJobAdvertisedMapper.searchPositionByKeyWordCount", page);
- }
- /**
- * 职位搜索 (未登录)
- *
- * @param page
- * @return
- */
- public List<MdeJobAdvertised> searchJobNotLogin(Map<String, Object> param) {
- return sqlSession.selectList("MdeJobAdvertisedMapper.searchJobNotLogin", param);
- }
- /**
- * 获取相似职位
- *
- * @param jobId
- * @return
- */
- public List<JobAdvertisedListDto> getSimilarJobs(int jobId, int limitSize) {
- Map<String, Object> map = new HashMap<String, Object>();
- map.put("jobId", jobId);
- map.put("limitSize", limitSize);
- return super.select("MdeJobAdvertisedMapper.getSimilarJobs", map);
- }
- /**
- * 酒店的其他职位
- *
- * @param jobId
- * @return
- */
- public List<MdeJobAdvertised> gethotelOtherPositionList(int jobId, String publisher, int limitSize) {
- Map<String, Object> map = new HashMap<String, Object>();
- map.put("jobId", jobId);
- map.put("publisher", publisher);
- map.put("limitSize", limitSize);
- return super.select("MdeJobAdvertisedMapper.gethotelOtherPositionList", map);
- }
- public int insert(MdeJobAdvertised mdeJobAdvertised) {
- return super.insert("MdeJobAdvertisedMapper.insert", mdeJobAdvertised);
- }
- /**
- * 获取 企业正在招聘的职位
- *
- * @param publisher
- * @return
- */
- public List<MdeJobAdvertised> getByPublisher(String publisher) {
- return super.select("MdeJobAdvertisedMapper.getAdvertisedRecruitment", publisher);
- }
- /**
- * 获取已经投递过职位的用户code
- *
- * @param publisher
- * @return
- */
- public List<MdeJobAdvertised> getAlreadyAdvertisedByJobId(String publisher) {
- return super.select("MdeJobAdvertisedMapper.getAlreadyAdvertisedByJobId", publisher);
- }
- /**
- * 查看该企业是否发布某个职位
- *
- * @return
- */
- public MdeJobAdvertised findByPublisherAndJobId(MdeJobInvitationRel mdeJobInvitationRel) {
- return super.selectOne("MdeJobAdvertisedMapper.findByPublisherAndJobId", mdeJobInvitationRel);
- }
- public int updateJobAdvertisedStatus(Map<String, String> maps) {
- return sqlSession.update("MdeJobAdvertisedMapper.updateJobAdvertisedStatus", maps);
- }
- public List<MdeJobAdvertised> getAdvertisedRecruitment(String userCode) {
- return super.select("MdeJobAdvertisedMapper.getAdvertisedRecruitment", userCode);
- }
- /**
- * 更新职位首推状态
- */
- public int updateJobRecommend(Map<String, String> maps) {
- return sqlSession.update("MdeJobAdvertisedMapper.updateJobRecommend", maps);
- }
- /**
- * 更新招聘职位信息表
- *
- * @param mdeJobAdvertised
- * @return
- */
- public int update(MdeJobAdvertised mdeJobAdvertised) {
- return super.update("MdeJobAdvertisedMapper.update", mdeJobAdvertised);
- }
- public List<JobAdvertisedRes> getCollectionJobList(String[] jobListStr, String lang) {
- Map<String, Object> map = new HashMap<String, Object>();
- map.put("jobListStr", jobListStr);
- map.put("lang", lang);
- return super.select("MdeJobAdvertisedMapper.getCollectionJobList", map);
- }
- /**
- * 查询投递该公司的总简历数
- *
- * @param userCode 企业code
- * @return
- */
- public int getAllUserCvCount(String userCode) {
- return super.count("MdeJobAdvertisedMapper.getAllUserCvCount", userCode);
- }
- /**
- * 获取邀请面试简历数量
- *
- * @param userCode 企业code
- * @return
- */
- public int inviteAuditionCount(String userCode) {
- return super.count("MdeJobAdvertisedMapper.inviteAuditionCount", userCode);
- }
- /**
- * 获取指定企业新简历数量
- *
- * @param userCode 企业code
- * @return
- */
- public int getNewCvCountByPublisher(String userCode) {
- return super.count("MdeJobAdvertisedMapper.getNewCvCountByPublisher", userCode);
- }
- /**
- * 录用简历数量
- *
- * @param userCode 企业code
- * @return
- */
- public int matriculateUserCvCount(String userCode) {
- return super.count("MdeJobAdvertisedMapper.matriculateUserCvCount", userCode);
- }
- /**
- * 淘汰简历数量
- *
- * @param userCode 企业code
- * @return
- */
- public int eliminateUserCvCount(String userCode) {
- return super.count("MdeJobAdvertisedMapper.eliminateUserCvCount", userCode);
- }
- /**
- * 已发布信息
- *
- * @param userCode
- * @return
- */
- public PagingResult<JobAdvertisedResp> alreadyPublish(Pagination page) {
- return super.selectPagination("MdeJobAdvertisedMapper.alreadyPublish",
- "MdeJobAdvertisedMapper.alreadyPublishCount", page);
- }
- /**
- * @param page
- * @return PagingResult<JobAdvertisedResp>
- * @description 已发职位关键词检索
- * @author rayson
- * @date 2023-09-12 14:52
- **/
- public PagingResult<JobAdvertisedResp> searchAlreadyPublishByKeyWord(Pagination page) {
- return super.selectPagination("MdeJobAdvertisedMapper.searchAlreadyPublishByKeyWord",
- "MdeJobAdvertisedMapper.searchAlreadyPublishByKeyWordCount", page);
- }
- /**
- * 已发布职位个数
- *
- * @param userCode
- * @return
- */
- public int alreadyPublishNotVipCount(String userCode, String jobStatus) {
- Map<Object, Object> pageParam = new HashMap<Object, Object>();
- pageParam.put("userCode", userCode);
- pageParam.put("jobStatus", jobStatus);
- return super.count("MdeJobAdvertisedMapper.alreadyPublishNotVipCount", pageParam);
- }
- /**
- * 优选职位 大于50(未登录)
- *
- * @return
- */
- public List<MdeJobAdvertised> getNotLoginRecommentJobsRandJoin(Integer limitSize) {
- return super.select("MdeJobAdvertisedMapper.getNotLoginRecommentJobsRandJoin", limitSize);
- }
- /**
- * 优选职位 小于50(未登录)
- *
- * @return
- */
- public List<MdeJobAdvertised> getNotLoginRecommentJobsRand(Integer limitSize) {
- return super.select("MdeJobAdvertisedMapper.getNotLoginRecommentJobsRand", limitSize);
- }
- /**
- * 优选职位的数量
- *
- * @return
- */
- public int getNotLoginRecommentJobsCount() {
- return sqlSession.selectOne("MdeJobAdvertisedMapper.getNotLoginRecommentJobsCount");
- }
- /**
- * 批量更新发布日期(招聘中的职位)
- *
- * @param publisher
- * @return
- */
- public int batchUpdatePublishDate(String publisher) {
- return sqlSession.update("MdeJobAdvertisedMapper.batchUpdatePublishDate", publisher);
- }
- /**
- * 更新发布日期(招聘中的职位)
- *
- * @param jobId
- * @return
- */
- public int updatePublishDate(String userCode,Integer jobId) {
- Map<String, Object> map = new HashMap<String, Object>();
- map.put("userCode", userCode);
- map.put("jobId", jobId);
- return sqlSession.update("MdeJobAdvertisedMapper.updatePublishDate", map);
- }
- /**
- * 获取已发布的职位-非登录状态
- *
- * @param userCode
- * @param lang
- * @return
- */
- public List<JobAdvertisedNologinResp> getPublishingJobsByUserCodeNologin(String userCode, String lang) {
- Map<String, Object> map = new HashMap<String, Object>();
- map.put("userCode", userCode);
- map.put("lang", lang);
- return super.select("MdeJobAdvertisedMapper.getPublishingJobsByUserCode", map);
- }
- /**
- * 获取已发布的职位
- *
- * @param userCode
- * @param lang
- * @return
- */
- public List<JobAdvertisedResp> getPublishingJobsByUserCode(String userCode, String lang) {
- Map<String, Object> map = new HashMap<String, Object>();
- map.put("userCode", userCode);
- map.put("lang", lang);
- return super.select("MdeJobAdvertisedMapper.getPublishingJobsByUserCode", map);
- }
- /**
- * 获取已发布的职位
- *
- * @param userCode
- * @param lang
- * @return
- */
- public List<JobAdvertisedNologinResp> getPublishingJobsNologin(String userCode) {
- Map<String, Object> map = new HashMap<String, Object>();
- map.put("userCode", userCode);
- return super.select("MdeJobAdvertisedMapper.getPublishingJobsNologin", map);
- }
- /**
- * 获取酒店可首推和已首推个数
- *
- * @param userCode
- * @return
- */
- public AvailableAndUsedCountDto getAvailableAndUsedCount(String userCode) {
- Map<String, Object> map = new HashMap<String, Object>();
- map.put("userCode", userCode);
- return super.selectOne("MdeJobAdvertisedMapper.getAvailableAndUsedCount", map);
- }
- /**
- * 点击量查询
- *
- * @param statisticType 统计类型 按月,季度,年 统计
- * @return
- */
- public List<JobRepFormPvDto> findRepFormPvByDate(Map<String, Object> map) {
- return super.select("MdeJobAdvertisedMapper.findRepFormPvByDate", map);
- }
- /**
- * 点击量
- *
- * @param statisticType 统计类型 按月,季度,年 统计
- * @return
- */
- public Integer findGeneralPvByDate(Map<String, Object> map) {
- return super.selectOne("MdeJobAdvertisedMapper.findGeneralPvByDate", map);
- }
- }
|