|
|
@@ -263,7 +263,17 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, Position> i
|
|
|
String userToken = requestMap.get("user_token");
|
|
|
//验证用户合法性
|
|
|
if (TokenUtil.validateToken(userId, userToken)) {
|
|
|
+ String positionId = requestMap.get("positionId");//所属公司id
|
|
|
Position position = new Position();
|
|
|
+ //positionId不为空则是编辑,为空新插入
|
|
|
+ if(StringUtils.isNotBlank(positionId)){
|
|
|
+ position=getById(positionId);
|
|
|
+ }else{
|
|
|
+ position.setAuthenticationStatus(1); //审核状态待审核
|
|
|
+ position.setIsOn(1); //结束状态为上架
|
|
|
+ position.setDelFlag("0"); //设置逻辑删除状态为未删除
|
|
|
+ position.setIsPause(0); //设置暂停状态为未暂停
|
|
|
+ }
|
|
|
String enterpriseName = requestMap.get("enterpriseName");//所属公司
|
|
|
String positionName = requestMap.get("positionName");//岗位标题
|
|
|
String positionDetail = requestMap.get("positionDetail");//职位描述
|
|
|
@@ -302,10 +312,6 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, Position> i
|
|
|
if (StringUtils.isNotBlank(isPublishNationwide)) {
|
|
|
position.setSettlementMethod(Integer.parseInt(isPublishNationwide));
|
|
|
}
|
|
|
- position.setAuthenticationStatus(1); //审核状态待审核
|
|
|
- position.setIsOn(1); //结束状态为上架
|
|
|
- position.setDelFlag("0"); //设置逻辑删除状态为未删除
|
|
|
- position.setIsPause(0); //设置暂停状态为未暂停
|
|
|
position.setUserId(Integer.parseInt(userId));
|
|
|
position.setWelfare(welfare);
|
|
|
position.setEnterpriseName(enterpriseName);
|
|
|
@@ -344,7 +350,13 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, Position> i
|
|
|
}
|
|
|
position.setCreateTime(new Date());
|
|
|
position.setUpdateTime(new Date());
|
|
|
- positionMapper.save(position);
|
|
|
+ //positionId不为空则是编辑,为空新插入
|
|
|
+ if(StringUtils.isNotBlank(positionId)){
|
|
|
+ updateById(position);
|
|
|
+ positionMapper.deleteBypositionId(positionId);//删除原有岗位地址
|
|
|
+ }else {
|
|
|
+ positionMapper.save(position);
|
|
|
+ }
|
|
|
String json = requestMap.get("json");//工作地址
|
|
|
if (StringUtils.isNotBlank(json)) {
|
|
|
JSONArray jsonArray = JSONArray.fromObject(json);
|
|
|
@@ -362,6 +374,7 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, Position> i
|
|
|
}
|
|
|
}
|
|
|
String companyName = companyAuthenticationMapper.findCompanyName(Integer.parseInt(userId));
|
|
|
+ //公司通过审核的发布岗位时同时保存公司名称
|
|
|
if (StringUtils.isNotBlank(companyName)) {
|
|
|
List<Position> list=positionMapper.findPosition(Integer.parseInt(userId));
|
|
|
if(list.size()>0){
|
|
|
@@ -390,7 +403,17 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, Position> i
|
|
|
String userToken = requestMap.get("user_token");
|
|
|
//验证用户合法性
|
|
|
if (TokenUtil.validateToken(userId, userToken)) {
|
|
|
+ String positionId = requestMap.get("positionId");//所属公司id
|
|
|
Position position = new Position();
|
|
|
+ //positionId不为空则是编辑,为空新插入
|
|
|
+ if(StringUtils.isNotBlank(positionId)){
|
|
|
+ position=getById(positionId);
|
|
|
+ }else{
|
|
|
+ position.setAuthenticationStatus(1); //审核状态待审核
|
|
|
+ position.setIsOn(1); //结束状态为上架
|
|
|
+ position.setDelFlag("0"); //设置逻辑删除状态为未删除
|
|
|
+ position.setIsPause(0); //设置暂停状态为未暂停
|
|
|
+ }
|
|
|
String enterpriseName = requestMap.get("enterpriseName");//所属公司
|
|
|
String positionName = requestMap.get("positionName");//岗位标题
|
|
|
String positionDetail = requestMap.get("positionDetail");//职位描述
|
|
|
@@ -420,10 +443,6 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, Position> i
|
|
|
if (StringUtils.isNotBlank(isPublishNationwide)) {
|
|
|
position.setSettlementMethod(Integer.parseInt(isPublishNationwide));
|
|
|
}
|
|
|
- position.setAuthenticationStatus(1); //审核状态待审核
|
|
|
- position.setIsOn(1); //结束状态为上架
|
|
|
- position.setDelFlag("0"); //设置逻辑删除状态为未删除
|
|
|
- position.setIsPause(0); //设置暂停状态为未暂停
|
|
|
position.setUserId(Integer.parseInt(userId));
|
|
|
position.setEnterpriseName(enterpriseName);
|
|
|
position.setPositionName(positionName);
|
|
|
@@ -459,7 +478,13 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, Position> i
|
|
|
}
|
|
|
position.setCreateTime(new Date());
|
|
|
position.setUpdateTime(new Date());
|
|
|
- positionMapper.save(position);
|
|
|
+ //positionId不为空则是编辑,为空新插入
|
|
|
+ if(StringUtils.isNotBlank(positionId)){
|
|
|
+ updateById(position);
|
|
|
+ positionMapper.deleteBypositionId(positionId);//删除原有岗位地址
|
|
|
+ }else {
|
|
|
+ positionMapper.save(position);
|
|
|
+ }
|
|
|
String json = requestMap.get("json");
|
|
|
if (StringUtils.isNotBlank(json)) {
|
|
|
JSONArray jsonArray = JSONArray.fromObject(json);
|