|
@@ -25,6 +25,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.text.ParseException;
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
@@ -133,19 +134,24 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
|
|
|
@Override
|
|
|
public AjaxResult agreeApplication(Long id) throws ParseException {
|
|
|
ResumeDeliver resumeDeliver = getById(id);
|
|
|
- if (resumeDeliver == null || !resumeDeliver.getEnterpriseId().equals(AppUtil.getUser().getId())) {
|
|
|
+ if (resumeDeliver == null || !resumeDeliver.getEnterpriseId().equals(AppUtil.getUser().getId()) || resumeDeliver.getType() == 0) {
|
|
|
return AjaxResult.error("简历不存在或非法操作");
|
|
|
}
|
|
|
+ List<ResumeDeliver> list = selectList(new ResumeDeliver().setPositionId(resumeDeliver.getPositionId()).setState(1));
|
|
|
+ if (!list.isEmpty() && list.size() > 0) {
|
|
|
+ return AjaxResult.error("你已发出兼职邀请,请等待对方答复后或者1小时无回应自动排除");
|
|
|
+ }
|
|
|
if (resumeDeliver.getIsAccept() == 2) {
|
|
|
return AjaxResult.error("兼职者已拒绝,无法重复发送");
|
|
|
}
|
|
|
if (resumeDeliver.getIsAccept() == 1) {
|
|
|
- return AjaxResult.error("兼职者已同意,请及时安排线下面试");
|
|
|
+ return AjaxResult.error("兼职者已同意,请留意工作进度");
|
|
|
}
|
|
|
if (resumeDeliver.getState() == 1) {
|
|
|
return AjaxResult.error("已发送邀请,等待兼职者同意");
|
|
|
}
|
|
|
resumeDeliver.setState(1);
|
|
|
+ resumeDeliver.setAuditTime(new Date());
|
|
|
if (!updateById(resumeDeliver)) {
|
|
|
throw new ServiceException("发送兼职邀请失败");
|
|
|
}
|
|
@@ -230,7 +236,7 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
|
|
|
User user = userService.getById(resumeDeliver.getUserId());
|
|
|
body.set("touser", user.getOpenId());
|
|
|
body.set("template_id", "bxOGj5FbyGHSevmWf9yzwpSZDjlFZPnGBeqGgIj9w_o");
|
|
|
- body.set("page", "pages/user/resume/application/invite");
|
|
|
+ body.set("page", "pages/user/resume/application/task_to_do?role=0");
|
|
|
content.set("thing4", new JSONObject().set("value", position.getTitle()));//兼职名称
|
|
|
content.set("thing6", new JSONObject().set("value", "对方已同意接单,请留意工作进度"));//备注
|
|
|
}
|
|
@@ -240,7 +246,7 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
|
|
|
User user = userService.getById(resumeDeliver.getEnterpriseId());
|
|
|
body.set("touser", user.getOpenId());
|
|
|
body.set("template_id", "pyUsW2HqOcXmFETHFUDjuH-ekf05QVc29k0tRaY9wP8");
|
|
|
- body.set("page", "pages/user/resume/application/invite");
|
|
|
+ body.set("page", "pages/user/resume/application/receive/index");
|
|
|
content.set("thing3", new JSONObject().set("value", position.getTitle()));//兼职名称
|
|
|
content.set("thing5", new JSONObject().set("value", "对方拒绝接单,请重新选择接单人员"));//备注
|
|
|
}
|
|
@@ -250,7 +256,7 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
|
|
|
User user = userService.getById(resumeDeliver.getUserId());
|
|
|
body.set("touser", user.getOpenId());
|
|
|
body.set("template_id", "yhFtY-hzXerPnIxXcYcRCAjQUf8CdLoYEQQi5nBgim0");
|
|
|
- body.set("page", "pages/user/resume/application/invite");
|
|
|
+ body.set("page", "pages/user/resume/application/invite?type=1");
|
|
|
content.set("thing1", new JSONObject().set("value", position.getTitle()));//兼职名称
|
|
|
content.set("amount4", new JSONObject().set("value", position.getSalary() + "元"));//工作报酬
|
|
|
content.set("phrase5", new JSONObject().set("value", "通过"));//状态
|