|
@@ -224,7 +224,9 @@ public class InterviewInviteServiceImpl implements InterviewInviteService {
|
|
|
mapper.updateById(interviewInvite);
|
|
|
}
|
|
|
|
|
|
- /** 状态检查 */
|
|
|
+ /**
|
|
|
+ * 状态检查
|
|
|
+ */
|
|
|
public void checkStatusIsCompleted(InterviewInviteDO interviewInvite) {
|
|
|
if (Integer.parseInt(interviewInvite.getStatus())
|
|
|
< Integer.parseInt(InterviewInviteStatusEnum.COMPLETED.getStatus())) {
|
|
@@ -241,7 +243,7 @@ public class InterviewInviteServiceImpl implements InterviewInviteService {
|
|
|
|
|
|
checkStatusIsCompleted(interviewInvite);
|
|
|
// 标记为入职
|
|
|
- interviewInvite.setStatus(ConversationStatusEnum.ENTRY.getStatus());
|
|
|
+ interviewInvite.setConversationStatus(ConversationStatusEnum.ENTRY.getStatus());
|
|
|
mapper.updateById(interviewInvite);
|
|
|
|
|
|
//TODO 发送推送消息
|
|
@@ -255,13 +257,13 @@ public class InterviewInviteServiceImpl implements InterviewInviteService {
|
|
|
|
|
|
checkStatusIsCompleted(interviewInvite);
|
|
|
|
|
|
- if(!interviewInvite.getConversationStatus()
|
|
|
+ if (!interviewInvite.getConversationStatus()
|
|
|
.equals(ConversationStatusEnum.ENTRY.getStatus())) {
|
|
|
// 不是已入职状态
|
|
|
throw exception(INTERVIEW_INVITE_STATUS_NOT_ENTRY);
|
|
|
}
|
|
|
// 标记为结算
|
|
|
- interviewInvite.setStatus(ConversationStatusEnum.SETTLEMENT.getStatus());
|
|
|
+ interviewInvite.setConversationStatus(ConversationStatusEnum.SETTLEMENT.getStatus());
|
|
|
mapper.updateById(interviewInvite);
|
|
|
|
|
|
// 获取 面试的求职者投递的简历信息
|
|
@@ -320,8 +322,22 @@ public class InterviewInviteServiceImpl implements InterviewInviteService {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+ // 如果推荐人ID为空,则将推荐人的佣金也给到猎头
|
|
|
+ if (null == cv.getRecommendUserId()) {
|
|
|
+ enterpriseAccountRecordService.createBalanceRecord(
|
|
|
+ 1L,
|
|
|
+ 1L,
|
|
|
+ BalanceBizTypeEnum.NOT_RECOMMENDED.getName(),
|
|
|
+ MathOperationEnum.ADD,
|
|
|
+ recommendPrice,
|
|
|
+ BalanceBizTypeEnum.NOT_RECOMMENDED,
|
|
|
+ String.valueOf(job.getId())
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
// 推荐人
|
|
|
- if (headhuntPrice.compareTo(BigDecimal.ZERO) > 0) {
|
|
|
+ if (headhuntPrice.compareTo(BigDecimal.ZERO) > 0
|
|
|
+ && null != cv.getRecommendUserId()) {
|
|
|
userAccountRecordService.createBalanceRecord(
|
|
|
cv.getRecommendUserId(),
|
|
|
BalanceBizTypeEnum.RECOMMENDED_POSITIONS.getName(),
|
|
@@ -385,8 +401,21 @@ public class InterviewInviteServiceImpl implements InterviewInviteService {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+ // 如果推荐人ID为空,则将推荐人的佣金也给到猎头
|
|
|
+ if (null == cv.getRecommendUserId()) {
|
|
|
+ enterpriseAccountRecordService.createPointRecord(
|
|
|
+ 1L,
|
|
|
+ 1L,
|
|
|
+ PointBizTypeEnum.NOT_RECOMMENDED.getName(),
|
|
|
+ MathOperationEnum.ADD,
|
|
|
+ recommendPoint,
|
|
|
+ PointBizTypeEnum.NOT_RECOMMENDED,
|
|
|
+ String.valueOf(job.getId())
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
// 推荐人
|
|
|
- if (headhuntPoint > 0) {
|
|
|
+ if (headhuntPoint > 0 && null!= cv.getRecommendUserId()) {
|
|
|
userAccountRecordService.createPointRecord(
|
|
|
cv.getRecommendUserId(),
|
|
|
"",
|