|
@@ -104,15 +104,16 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
|
|
|
if (resumeDeliver == null || !resumeDeliver.getUserId().equals(AppUtil.getUser().getId())) {
|
|
|
return AjaxResult.error("面试不存在或非法操作");
|
|
|
}
|
|
|
- resumeDeliver.setIsAccept(dto.getIsAccept());
|
|
|
//兼职接单成功,把兼职设置成进行中...
|
|
|
- if (dto.getIsAccept() == 1 && resumeDeliver.getType() == 1) {
|
|
|
+ if (resumeDeliver.getType() == 1 && resumeDeliver.getIsAccept() == 0 && dto.getIsAccept() == 1) {
|
|
|
+ System.out.println("zzzzz");
|
|
|
String key = CacheConstants.APP_DELIVER + resumeDeliver.getId() + "-" + AppUtil.getUser().getId();
|
|
|
- /* if (redisCache.getCacheObject(key) == null) {
|
|
|
+ if (redisCache.getCacheObject(key) == null) {
|
|
|
resumeDeliver.setIsExpire(1);
|
|
|
updateById(resumeDeliver);
|
|
|
return AjaxResult.error("抱歉你的兼职邀请已经超时无效了");
|
|
|
- }*/
|
|
|
+ }
|
|
|
+ redisCache.deleteObject(key);
|
|
|
Position position = new Position();
|
|
|
position.setId(resumeDeliver.getPositionId());
|
|
|
position.setComplete(1);
|
|
@@ -120,6 +121,7 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
|
|
|
throw new ServiceException("更新兼职信息失败");
|
|
|
}
|
|
|
}
|
|
|
+ resumeDeliver.setIsAccept(dto.getIsAccept());
|
|
|
if (!updateById(resumeDeliver)) {
|
|
|
throw new ServiceException("接受或拒绝面试邀请失败");
|
|
|
}
|
|
@@ -159,7 +161,7 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
|
|
|
if (resumeDeliver == null || !resumeDeliver.getEnterpriseId().equals(AppUtil.getUser().getId()) || resumeDeliver.getType() == 0) {
|
|
|
return AjaxResult.error("简历不存在或非法操作");
|
|
|
}
|
|
|
- if(resumeDeliver.getIsExpire()==1){
|
|
|
+ if (resumeDeliver.getIsExpire() == 1) {
|
|
|
return AjaxResult.error("对方超时未操作(已过期)");
|
|
|
}
|
|
|
List<ResumeDeliver> list = selectList(new ResumeDeliver().setPositionId(resumeDeliver.getPositionId()).setState(1).setIsExpire(0));
|
|
@@ -182,7 +184,7 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
|
|
|
}
|
|
|
//用户的接单信息缓存起来60分钟,超时无效。
|
|
|
String key = CacheConstants.APP_DELIVER + resumeDeliver.getId() + "-" + resumeDeliver.getUserId();
|
|
|
- redisCache.setCacheObject(key, resumeDeliver, 1, TimeUnit.MINUTES);
|
|
|
+ redisCache.setCacheObject(key, resumeDeliver, 60, TimeUnit.MINUTES);
|
|
|
sendMessage(resumeDeliver);
|
|
|
return AjaxResult.success();
|
|
|
}
|