|
@@ -15,9 +15,7 @@ import com.wechat.global.base.interceptor.Page;
|
|
|
import com.wechat.global.message.InfoMsg;
|
|
|
import com.wechat.model.dbEntity.MdePositionCvRel;
|
|
|
import com.wechat.model.dbEntity.MdeUser;
|
|
|
-import com.wechat.model.dto.TalentRetrievalDto;
|
|
|
import com.wechat.model.dto.UserInfoResp;
|
|
|
-import com.wechat.model.dto.WorkDateDto;
|
|
|
import com.wechat.model.requestDto.*;
|
|
|
import com.wechat.model.responseDto.AlreadyPublishPositionResp;
|
|
|
import com.wechat.model.responseDto.ContactUserInfoResp;
|
|
@@ -31,7 +29,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
@@ -440,25 +437,25 @@ public class EnterpriseService extends BaseService {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * @param statusReq
|
|
|
+ * @param model 终端类型(1-PC端 只显示1个面试时间)
|
|
|
+ * @return Map<String, Object>
|
|
|
* @description 已发简历筛选
|
|
|
* @author rayson
|
|
|
- * @param statusReq
|
|
|
- * @param model 终端类型(1-PC端 只显示1个面试时间)
|
|
|
* @date 2023-09-19 14:46
|
|
|
- * @return Map<String,Object>
|
|
|
**/
|
|
|
public Map<String, Object> filterUserCv(HttpServletRequest req, UserCvStatusReq statusReq, String model) {
|
|
|
Map<String, Object> maps = Maps.newHashMap();
|
|
|
Pagination pagination = new Pagination(statusReq.getIndex(), statusReq.getSize());
|
|
|
Map<Object, Object> params = Maps.newHashMap();
|
|
|
- List<String> jobIdList = null;
|
|
|
- if (StringsUtils.isNotEmpty(statusReq.getJobIdList())) {
|
|
|
- jobIdList = Arrays.asList(statusReq.getJobIdList().split(","));
|
|
|
+ List<String> positionIdList = null;
|
|
|
+ if (StringsUtils.isNotEmpty(statusReq.getPositionIdList())) {
|
|
|
+ positionIdList = Arrays.asList(statusReq.getPositionIdList().split(","));
|
|
|
}
|
|
|
String userCode = commonService.getUserCode(req);
|
|
|
String lang = commonService.getLanguage(req);
|
|
|
- params.put("jobIdList", jobIdList);
|
|
|
- params.put("lang", lang);
|
|
|
+ params.put("positionIdList", positionIdList);
|
|
|
+ params.put("lang", lang);
|
|
|
params.put("publisher", userCode);
|
|
|
params.put("model", model);
|
|
|
params.put("status", statusReq.getType());
|
|
@@ -481,13 +478,13 @@ public class EnterpriseService extends BaseService {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * @param keyWordReq 关键词
|
|
|
+ * @return Map<String, Object>
|
|
|
* @description 已发简历关键词检索
|
|
|
* @author rayson
|
|
|
- * @param keyWordReq 关键词
|
|
|
* @date 2023-09-18 17:00
|
|
|
- * @return Map<String,Object>
|
|
|
**/
|
|
|
- public Map<String, Object> searchUserCvByKeyWord(HttpServletRequest req, KeyWordReq keyWordReq,String model){
|
|
|
+ public Map<String, Object> searchUserCvByKeyWord(HttpServletRequest req, KeyWordReq keyWordReq, String model) {
|
|
|
Map<String, Object> map = Maps.newHashMap();
|
|
|
if (keyWordReq != null && StringsUtils.isEmpty(keyWordReq.getKeyWord())) {
|
|
|
PagingResult<UserInfoResp> pagingResult = new PagingResult<>();
|
|
@@ -496,7 +493,7 @@ public class EnterpriseService extends BaseService {
|
|
|
pagingResult.setPageSize(keyWordReq.getSize());
|
|
|
pagingResult.setResultList(new ArrayList<UserInfoResp>());
|
|
|
pagingResult.setPageNoSize(10);
|
|
|
- map.put("page",pagingResult);
|
|
|
+ map.put("page", pagingResult);
|
|
|
return map;
|
|
|
}
|
|
|
String language = commonService.getLanguage(req);
|
|
@@ -507,7 +504,7 @@ public class EnterpriseService extends BaseService {
|
|
|
pageParam.put("publisher", userCode);
|
|
|
pageParam.put("lang", language);
|
|
|
pageParam.put("keyWord", keyWordReq.getKeyWord());
|
|
|
- pageParam.put("model",model);
|
|
|
+ pageParam.put("model", model);
|
|
|
page.setParams(pageParam);
|
|
|
PagingResult<UserInfoResp> result = mdePositionCvRelDao.searchUserCvByKeyWord(page);
|
|
|
// 所有简历数量
|
|
@@ -654,13 +651,16 @@ public class EnterpriseService extends BaseService {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * @return PagingResult<AlreadyPublishPositionResp>
|
|
|
* @description 获取已发布职位列表
|
|
|
* @author rayson
|
|
|
* @date 2023-09-19 14:34
|
|
|
- * @return PagingResult<AlreadyPublishPositionResp>
|
|
|
**/
|
|
|
- public List<AlreadyPublishPositionResp> alreadyPublishPositionList(HttpServletRequest req){
|
|
|
- return mdeJobAdvertisedDao.alreadyPublishPositionList( commonService.getUserCode(req));
|
|
|
+ public List<AlreadyPublishPositionResp> alreadyPublishPositionList(HttpServletRequest req) {
|
|
|
+ Map<String, Object> map = new HashMap<String, Object>();
|
|
|
+ map.put("userCode", commonService.getUserCode(req));
|
|
|
+ map.put("lang", commonService.getLanguage(req));
|
|
|
+ return mdeJobAdvertisedDao.alreadyPublishPositionList(map);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -762,20 +762,59 @@ public class EnterpriseService extends BaseService {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * @param jobId 发布职位id
|
|
|
+ * @param userCode 用户code
|
|
|
+ * @return void
|
|
|
* @description 更新发布日期(招聘中职位)
|
|
|
* @author rayson
|
|
|
- * @param jobId 发布职位id
|
|
|
- * @param userCode 用户code
|
|
|
* @date 2023-09-18 14:33
|
|
|
- * @return void
|
|
|
**/
|
|
|
@Transactional
|
|
|
- public void updatePublishDate(String userCode,Integer jobId) {
|
|
|
+ public void updatePublishDate(String userCode, Integer jobId) {
|
|
|
try {
|
|
|
- mdeJobAdvertisedDao.updatePublishDate(userCode,jobId);
|
|
|
+ mdeJobAdvertisedDao.updatePublishDate(userCode, jobId);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
throw new CustomException(InfoMsg.ERROR_UPDATE_USERCVSTATUS_FILE);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param userCode 用户code
|
|
|
+ * @return void
|
|
|
+ * @description 删除职位
|
|
|
+ * @author rayson
|
|
|
+ * @date 2023-09-26 15:58
|
|
|
+ **/
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ public void deleteJobAdvertised(String userCode, DeleteReq req) {
|
|
|
+
|
|
|
+ Map<String, Object> map = new HashMap<>(4);
|
|
|
+ map.put("userCode", userCode);
|
|
|
+ map.put("id", req.getId());
|
|
|
+ AdJobCvNumReq adJobCvNumReq = mdeJobAdvertisedDao.getJobCvNum(map);
|
|
|
+ if (null == adJobCvNumReq) {
|
|
|
+ throw new CustomException(InfoMsg.ERROR_NOPOSITION_ERROR);
|
|
|
+ }
|
|
|
+ if (1 != adJobCvNumReq.getStatus()) {
|
|
|
+ // 职位未关闭
|
|
|
+ throw new CustomException(InfoMsg.ERROR_POSITION_NOT_CLOSED);
|
|
|
+ }
|
|
|
+ map.put("versionNo", req.getVersionNo());
|
|
|
+ Integer result;
|
|
|
+ if (adJobCvNumReq.getCvNum() > 0) {
|
|
|
+ map.put("delFlag", 1);
|
|
|
+ // 逻辑删除
|
|
|
+ result = mdeJobAdvertisedDao.delete(map);
|
|
|
+ } else {
|
|
|
+ // 真删除
|
|
|
+ result = mdeJobAdvertisedDao.deleteByJobId(map);
|
|
|
+ }
|
|
|
+ if (result <= 0) {
|
|
|
+ throw new CustomException(InfoMsg.ERROR_DELETE_ERROR);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|