MdeJobAdvertisedDao.java 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448
  1. /**
  2. * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
  3. */
  4. package com.wechat.dao;
  5. import com.wechat.global.base.dao.Pagination;
  6. import com.wechat.global.base.dao.PagingResult;
  7. import com.wechat.global.base.dao.impl.BaseDao;
  8. import com.wechat.model.dbEntity.MdeJobAdvertised;
  9. import com.wechat.model.dbEntity.MdeJobAdvertisedEntity;
  10. import com.wechat.model.dbEntity.MdeJobInvitationRel;
  11. import com.wechat.model.dto.AvailableAndUsedCountDto;
  12. import com.wechat.model.dto.JobAdvertisedListDto;
  13. import com.wechat.model.dto.JobRepFormPvDto;
  14. import com.wechat.model.dto.ShowOfJobsDto;
  15. import com.wechat.model.responseDto.JobAdvertisedNologinResp;
  16. import com.wechat.model.responseDto.JobAdvertisedRes;
  17. import com.wechat.model.responseDto.JobAdvertisedResp;
  18. import org.springframework.stereotype.Repository;
  19. import java.util.HashMap;
  20. import java.util.List;
  21. import java.util.Map;
  22. /**
  23. * 单表生成DAO接口
  24. *
  25. * @author tangwc
  26. * @version 2018-05-23
  27. */
  28. @Repository
  29. public class MdeJobAdvertisedDao extends BaseDao {
  30. public MdeJobAdvertised getInfoById(int id, String lang) {
  31. Map<String, Object> map = new HashMap<String, Object>();
  32. map.put("id", id);
  33. map.put("lang", lang);
  34. return super.selectOne("MdeJobAdvertisedMapper.get", map);
  35. }
  36. public MdeJobAdvertisedEntity getJobAdvertisedById(int id) {
  37. Map<String, Object> map = new HashMap<String, Object>();
  38. map.put("id", id);
  39. return super.selectOne("MdeJobAdvertisedMapper.getInfoById", map);
  40. }
  41. /**
  42. * 根据id查询全部相关职位的详情
  43. *
  44. * @param id
  45. * @param lang
  46. * @return
  47. */
  48. public List<ShowOfJobsDto> getInfoByIds(List<String> idList) {
  49. Map<String, Object> map = new HashMap<String, Object>();
  50. map.put("idList", idList);
  51. return super.select("MdeJobAdvertisedMapper.getInfoByIds", map);
  52. }
  53. /**
  54. * 获取推荐职位
  55. *
  56. * @param limi
  57. * @return
  58. */
  59. public List<MdeJobAdvertised> getRecommentJobs(int limitSize) {
  60. return super.select("MdeJobAdvertisedMapper.getRecommentJobs", limitSize);
  61. }
  62. /**
  63. * 获取推荐职位-分页查询
  64. *
  65. * @param limi
  66. * @return
  67. */
  68. public PagingResult<JobAdvertisedListDto> getPagingRecommentJobs(Pagination page) {
  69. return super.selectPagination("MdeJobAdvertisedMapper.getPagingRecommentJobs", "MdeJobAdvertisedMapper.getPagingRecommentJobsCount", page);
  70. }
  71. /**
  72. * 优选职位
  73. *
  74. * @param userCode
  75. * @param recommentJobsLimitSize
  76. * @return
  77. */
  78. /* public List<MdeJobAdvertised> getRecommentJobs(String userCode, int recommentJobsLimitSize) {
  79. Map<String, Object> map = new HashMap<String, Object>();
  80. map.put("userCode", userCode);
  81. map.put("limitSize", recommentJobsLimitSize);
  82. return super.select("MdeJobAdvertisedMapper.getRecommentJobsByUserCode", map);
  83. }*/
  84. /**
  85. * 优选职位
  86. *
  87. * @param userCode
  88. * @param lang
  89. * @param limitSize
  90. * @return
  91. */
  92. /*public List<MdeJobAdvertised> getSuperiorJobs(String userCode, String lang, int limitSize) {
  93. Map<String, Object> map = new HashMap<String, Object>();
  94. map.put("userCode", userCode);
  95. map.put("lang", lang);
  96. map.put("limitSize", limitSize);
  97. return super.select("MdeJobAdvertisedMapper.getSuperiorJobs", map);
  98. }*/
  99. /**
  100. * 职位搜索
  101. *
  102. * @param page
  103. * @return
  104. */
  105. public PagingResult<JobAdvertisedListDto> searchJob(Pagination page) {
  106. return super.selectPagination("MdeJobAdvertisedMapper.searchJob", "MdeJobAdvertisedMapper.searchJobCount", page);
  107. }
  108. /**
  109. * 职位搜索
  110. *
  111. * @param page
  112. * @return
  113. */
  114. public PagingResult<JobAdvertisedListDto> searchPositionByKeyWord(Pagination page) {
  115. return super.selectPagination("MdeJobAdvertisedMapper.searchPositionByKeyWord", "MdeJobAdvertisedMapper.searchPositionByKeyWordCount", page);
  116. }
  117. /**
  118. * 职位搜索 (未登录)
  119. *
  120. * @param page
  121. * @return
  122. */
  123. public List<MdeJobAdvertised> searchJobNotLogin(Map<String, Object> param) {
  124. return sqlSession.selectList("MdeJobAdvertisedMapper.searchJobNotLogin", param);
  125. }
  126. /**
  127. * 获取相似职位
  128. *
  129. * @param jobId
  130. * @return
  131. */
  132. public List<JobAdvertisedListDto> getSimilarJobs(int jobId, int limitSize) {
  133. Map<String, Object> map = new HashMap<String, Object>();
  134. map.put("jobId", jobId);
  135. map.put("limitSize", limitSize);
  136. return super.select("MdeJobAdvertisedMapper.getSimilarJobs", map);
  137. }
  138. /**
  139. * 酒店的其他职位
  140. *
  141. * @param jobId
  142. * @return
  143. */
  144. public List<MdeJobAdvertised> gethotelOtherPositionList(int jobId, String publisher, int limitSize) {
  145. Map<String, Object> map = new HashMap<String, Object>();
  146. map.put("jobId", jobId);
  147. map.put("publisher", publisher);
  148. map.put("limitSize", limitSize);
  149. return super.select("MdeJobAdvertisedMapper.gethotelOtherPositionList", map);
  150. }
  151. public int insert(MdeJobAdvertised mdeJobAdvertised) {
  152. return super.insert("MdeJobAdvertisedMapper.insert", mdeJobAdvertised);
  153. }
  154. /**
  155. * 获取 企业正在招聘的职位
  156. *
  157. * @param publisher
  158. * @return
  159. */
  160. public List<MdeJobAdvertised> getByPublisher(String publisher) {
  161. return super.select("MdeJobAdvertisedMapper.getAdvertisedRecruitment", publisher);
  162. }
  163. /**
  164. * 获取已经投递过职位的用户code
  165. *
  166. * @param publisher
  167. * @return
  168. */
  169. public List<MdeJobAdvertised> getAlreadyAdvertisedByJobId(String publisher) {
  170. return super.select("MdeJobAdvertisedMapper.getAlreadyAdvertisedByJobId", publisher);
  171. }
  172. /**
  173. * 查看该企业是否发布某个职位
  174. *
  175. * @return
  176. */
  177. public MdeJobAdvertised findByPublisherAndJobId(MdeJobInvitationRel mdeJobInvitationRel) {
  178. return super.selectOne("MdeJobAdvertisedMapper.findByPublisherAndJobId", mdeJobInvitationRel);
  179. }
  180. public int updateJobAdvertisedStatus(Map<String, String> maps) {
  181. return sqlSession.update("MdeJobAdvertisedMapper.updateJobAdvertisedStatus", maps);
  182. }
  183. public List<MdeJobAdvertised> getAdvertisedRecruitment(String userCode) {
  184. return super.select("MdeJobAdvertisedMapper.getAdvertisedRecruitment", userCode);
  185. }
  186. /**
  187. * 更新职位首推状态
  188. */
  189. public int updateJobRecommend(Map<String, String> maps) {
  190. return sqlSession.update("MdeJobAdvertisedMapper.updateJobRecommend", maps);
  191. }
  192. /**
  193. * 更新招聘职位信息表
  194. *
  195. * @param mdeJobAdvertised
  196. * @return
  197. */
  198. public int update(MdeJobAdvertised mdeJobAdvertised) {
  199. return super.update("MdeJobAdvertisedMapper.update", mdeJobAdvertised);
  200. }
  201. public List<JobAdvertisedRes> getCollectionJobList(String[] jobListStr, String lang) {
  202. Map<String, Object> map = new HashMap<String, Object>();
  203. map.put("jobListStr", jobListStr);
  204. map.put("lang", lang);
  205. return super.select("MdeJobAdvertisedMapper.getCollectionJobList", map);
  206. }
  207. /**
  208. * 查询投递该公司的总简历数
  209. *
  210. * @param userCode 企业code
  211. * @return
  212. */
  213. public int getAllUserCvCount(String userCode) {
  214. return super.count("MdeJobAdvertisedMapper.getAllUserCvCount", userCode);
  215. }
  216. /**
  217. * 获取邀请面试简历数量
  218. *
  219. * @param userCode 企业code
  220. * @return
  221. */
  222. public int inviteAuditionCount(String userCode) {
  223. return super.count("MdeJobAdvertisedMapper.inviteAuditionCount", userCode);
  224. }
  225. /**
  226. * 获取指定企业新简历数量
  227. *
  228. * @param userCode 企业code
  229. * @return
  230. */
  231. public int getNewCvCountByPublisher(String userCode) {
  232. return super.count("MdeJobAdvertisedMapper.getNewCvCountByPublisher", userCode);
  233. }
  234. /**
  235. * 录用简历数量
  236. *
  237. * @param userCode 企业code
  238. * @return
  239. */
  240. public int matriculateUserCvCount(String userCode) {
  241. return super.count("MdeJobAdvertisedMapper.matriculateUserCvCount", userCode);
  242. }
  243. /**
  244. * 淘汰简历数量
  245. *
  246. * @param userCode 企业code
  247. * @return
  248. */
  249. public int eliminateUserCvCount(String userCode) {
  250. return super.count("MdeJobAdvertisedMapper.eliminateUserCvCount", userCode);
  251. }
  252. /**
  253. * 已发布信息
  254. *
  255. * @param userCode
  256. * @return
  257. */
  258. public PagingResult<JobAdvertisedResp> alreadyPublish(Pagination page) {
  259. return super.selectPagination("MdeJobAdvertisedMapper.alreadyPublish",
  260. "MdeJobAdvertisedMapper.alreadyPublishCount", page);
  261. }
  262. /**
  263. * @param page
  264. * @return PagingResult<JobAdvertisedResp>
  265. * @description 已发职位关键词检索
  266. * @author rayson
  267. * @date 2023-09-12 14:52
  268. **/
  269. public PagingResult<JobAdvertisedResp> searchAlreadyPublishByKeyWord(Pagination page) {
  270. return super.selectPagination("MdeJobAdvertisedMapper.searchAlreadyPublishByKeyWord",
  271. "MdeJobAdvertisedMapper.searchAlreadyPublishByKeyWordCount", page);
  272. }
  273. /**
  274. * 已发布职位个数
  275. *
  276. * @param userCode
  277. * @return
  278. */
  279. public int alreadyPublishNotVipCount(String userCode, String jobStatus) {
  280. Map<Object, Object> pageParam = new HashMap<Object, Object>();
  281. pageParam.put("userCode", userCode);
  282. pageParam.put("jobStatus", jobStatus);
  283. return super.count("MdeJobAdvertisedMapper.alreadyPublishNotVipCount", pageParam);
  284. }
  285. /**
  286. * 优选职位 大于50(未登录)
  287. *
  288. * @return
  289. */
  290. public List<MdeJobAdvertised> getNotLoginRecommentJobsRandJoin(Integer limitSize) {
  291. return super.select("MdeJobAdvertisedMapper.getNotLoginRecommentJobsRandJoin", limitSize);
  292. }
  293. /**
  294. * 优选职位 小于50(未登录)
  295. *
  296. * @return
  297. */
  298. public List<MdeJobAdvertised> getNotLoginRecommentJobsRand(Integer limitSize) {
  299. return super.select("MdeJobAdvertisedMapper.getNotLoginRecommentJobsRand", limitSize);
  300. }
  301. /**
  302. * 优选职位的数量
  303. *
  304. * @return
  305. */
  306. public int getNotLoginRecommentJobsCount() {
  307. return sqlSession.selectOne("MdeJobAdvertisedMapper.getNotLoginRecommentJobsCount");
  308. }
  309. /**
  310. * 批量更新发布日期(招聘中的职位)
  311. *
  312. * @param publisher
  313. * @return
  314. */
  315. public int batchUpdatePublishDate(String publisher) {
  316. return sqlSession.update("MdeJobAdvertisedMapper.batchUpdatePublishDate", publisher);
  317. }
  318. /**
  319. * 更新发布日期(招聘中的职位)
  320. *
  321. * @param jobId
  322. * @return
  323. */
  324. public int updatePublishDate(String userCode,Integer jobId) {
  325. Map<String, Object> map = new HashMap<String, Object>();
  326. map.put("userCode", userCode);
  327. map.put("jobId", jobId);
  328. return sqlSession.update("MdeJobAdvertisedMapper.updatePublishDate", map);
  329. }
  330. /**
  331. * 获取已发布的职位-非登录状态
  332. *
  333. * @param userCode
  334. * @param lang
  335. * @return
  336. */
  337. public List<JobAdvertisedNologinResp> getPublishingJobsByUserCodeNologin(String userCode, String lang) {
  338. Map<String, Object> map = new HashMap<String, Object>();
  339. map.put("userCode", userCode);
  340. map.put("lang", lang);
  341. return super.select("MdeJobAdvertisedMapper.getPublishingJobsByUserCode", map);
  342. }
  343. /**
  344. * 获取已发布的职位
  345. *
  346. * @param userCode
  347. * @param lang
  348. * @return
  349. */
  350. public List<JobAdvertisedResp> getPublishingJobsByUserCode(String userCode, String lang) {
  351. Map<String, Object> map = new HashMap<String, Object>();
  352. map.put("userCode", userCode);
  353. map.put("lang", lang);
  354. return super.select("MdeJobAdvertisedMapper.getPublishingJobsByUserCode", map);
  355. }
  356. /**
  357. * 获取已发布的职位
  358. *
  359. * @param userCode
  360. * @param lang
  361. * @return
  362. */
  363. public List<JobAdvertisedNologinResp> getPublishingJobsNologin(String userCode) {
  364. Map<String, Object> map = new HashMap<String, Object>();
  365. map.put("userCode", userCode);
  366. return super.select("MdeJobAdvertisedMapper.getPublishingJobsNologin", map);
  367. }
  368. /**
  369. * 获取酒店可首推和已首推个数
  370. *
  371. * @param userCode
  372. * @return
  373. */
  374. public AvailableAndUsedCountDto getAvailableAndUsedCount(String userCode) {
  375. Map<String, Object> map = new HashMap<String, Object>();
  376. map.put("userCode", userCode);
  377. return super.selectOne("MdeJobAdvertisedMapper.getAvailableAndUsedCount", map);
  378. }
  379. /**
  380. * 点击量查询
  381. *
  382. * @param statisticType 统计类型 按月,季度,年 统计
  383. * @return
  384. */
  385. public List<JobRepFormPvDto> findRepFormPvByDate(Map<String, Object> map) {
  386. return super.select("MdeJobAdvertisedMapper.findRepFormPvByDate", map);
  387. }
  388. /**
  389. * 点击量
  390. *
  391. * @param statisticType 统计类型 按月,季度,年 统计
  392. * @return
  393. */
  394. public Integer findGeneralPvByDate(Map<String, Object> map) {
  395. return super.selectOne("MdeJobAdvertisedMapper.findGeneralPvByDate", map);
  396. }
  397. }