|
|
@ -88,16 +88,14 @@ public class MarriageInformationContactApplyApplicationService { |
|
|
} |
|
|
} |
|
|
int freeCount = Objects.nonNull(rewardConfig) ? Integer.parseInt(rewardConfig.getValue()) : 0; |
|
|
int freeCount = Objects.nonNull(rewardConfig) ? Integer.parseInt(rewardConfig.getValue()) : 0; |
|
|
if (freeCount > usageFreeCount) { |
|
|
if (freeCount > usageFreeCount) { |
|
|
MatchCardUsageRecord record = MatchCardUsageRecord.build(existApply.getApplicantUserId(), existApply.getId(), CardUsageTypeEnum.FREE); |
|
|
|
|
|
matchCardUsageRecordDao.insert(record); |
|
|
|
|
|
|
|
|
handleUnlock(existApply); |
|
|
vo.setSuccess(true); |
|
|
vo.setSuccess(true); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if (!vo.getSuccess()) { |
|
|
if (!vo.getSuccess()) { |
|
|
//花费权益 |
|
|
//花费权益 |
|
|
if (rightApplicationService.consumeRight(existApply.getApplicantUserId(), existApply.getApplicantMiId(), RightTypeEnum.MATCH_CARD, null)) { |
|
|
if (rightApplicationService.consumeRight(existApply.getApplicantUserId(), existApply.getApplicantMiId(), RightTypeEnum.MATCH_CARD, null)) { |
|
|
MatchCardUsageRecord record = MatchCardUsageRecord.build(existApply.getApplicantUserId(), existApply.getId(), CardUsageTypeEnum.FREE); |
|
|
|
|
|
matchCardUsageRecordDao.insert(record); |
|
|
|
|
|
|
|
|
handleUnlock(existApply); |
|
|
vo.setSuccess(true); |
|
|
vo.setSuccess(true); |
|
|
} else { |
|
|
} else { |
|
|
vo.setSuccess(false); |
|
|
vo.setSuccess(false); |
|
|
@ -107,4 +105,10 @@ public class MarriageInformationContactApplyApplicationService { |
|
|
} |
|
|
} |
|
|
return vo; |
|
|
return vo; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void handleUnlock(MarriageInformationContactApply apply) { |
|
|
|
|
|
MatchCardUsageRecord record = MatchCardUsageRecord.build(apply.getApplicantUserId(), apply.getId(), CardUsageTypeEnum.FREE); |
|
|
|
|
|
matchCardUsageRecordDao.insert(record); |
|
|
|
|
|
marriageInformationContactApplyAggregate.unlock(apply); |
|
|
|
|
|
} |
|
|
} |
|
|
} |