提交 e34e40ef authored 作者: wangmenglong's avatar wangmenglong

直聘字段提交

上级 7490b1df
...@@ -21,6 +21,18 @@ public class Objective extends IdentityObj { ...@@ -21,6 +21,18 @@ public class Objective extends IdentityObj {
@TableField("city") @TableField("city")
private String city; private String city;
/**
* 省
**/
@TableField("province")
private String province;
/**
* 区
**/
@TableField("region")
private String region;
/** /**
* 薪资要求-开始 * 薪资要求-开始
**/ **/
......
...@@ -205,7 +205,7 @@ public class Recruit extends NameObj { ...@@ -205,7 +205,7 @@ public class Recruit extends NameObj {
private String experienceCode; private String experienceCode;
/** /**
* up上架 down下架 * up发布 down下架
**/ **/
@TableField("status") @TableField("status")
private String status; private String status;
......
...@@ -94,4 +94,16 @@ public class RecruitController extends BaseController { ...@@ -94,4 +94,16 @@ public class RecruitController extends BaseController {
return BaseResult.success(recruit); return BaseResult.success(recruit);
} }
/**
* @description: 编辑招聘
* @author: wangmenglong
* @date; 2023/12/7 11:05
* @param: [org]
* @return: base.result.BaseResult
**/
@PostMapping("/u/status")
public BaseResult updateStatus(@RequestBody Recruit recruit){
return recruitService.updateStatus(recruit)?BaseResult.success("normal_002"):BaseResult.error("error_002");
}
} }
...@@ -31,4 +31,6 @@ public interface RecruitService { ...@@ -31,4 +31,6 @@ public interface RecruitService {
void sendAli(Recruit recruit) throws Exception; void sendAli(Recruit recruit) throws Exception;
boolean updateStatus(Recruit recruit);
} }
...@@ -172,6 +172,7 @@ public class RecruitServiceImpl extends ServiceImpl<RecruitMapper, Recruit> impl ...@@ -172,6 +172,7 @@ public class RecruitServiceImpl extends ServiceImpl<RecruitMapper, Recruit> impl
recruit.setBaseCode(baseCode); recruit.setBaseCode(baseCode);
recruit.setDel(false); recruit.setDel(false);
recruit.setCreateTime(DateUtil.now()); recruit.setCreateTime(DateUtil.now());
recruit.setStatus("down");
try { try {
...@@ -182,8 +183,6 @@ public class RecruitServiceImpl extends ServiceImpl<RecruitMapper, Recruit> impl ...@@ -182,8 +183,6 @@ public class RecruitServiceImpl extends ServiceImpl<RecruitMapper, Recruit> impl
Org org = orgService.getDetails(recruit.getOrgId()); Org org = orgService.getDetails(recruit.getOrgId());
recruit.setOrg(org); recruit.setOrg(org);
//todo 发送阿里
//sendAli(recruit);
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); e.printStackTrace();
} }
...@@ -327,4 +326,38 @@ public class RecruitServiceImpl extends ServiceImpl<RecruitMapper, Recruit> impl ...@@ -327,4 +326,38 @@ public class RecruitServiceImpl extends ServiceImpl<RecruitMapper, Recruit> impl
} }
} }
/**
* @description: 编辑招聘
* @author: wangmenglong
* @date; 2023/12/11 16:55
* @param: [org]
* @return: boolean
**/
@Override
public boolean updateStatus(Recruit recruit) {
//判断是否传入id
if(StringUtils.isBlank(recruit.getId())){
return false;
}
recruit = super.getById(recruit.getId());
switch (recruit.getStatus()){
case "up":
//todo 发送阿里
//sendAli(recruit);
recruit.setStatus("down");
break;
case "down":
recruit.setStatus("up");
break;
default:
//todo 发送阿里
//sendAli(recruit);
recruit.setStatus("up");
return false;
}
return super.saveOrUpdate(recruit);
}
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论