|
|
@ -47,11 +47,13 @@ public class ProfileCardUsageRecordApplicationService { |
|
|
if (usageFreeCount < 20) { |
|
|
if (usageFreeCount < 20) { |
|
|
ProfileCardUsageRecord record = ProfileCardUsageRecord.build(usageRecord.getUserId(), usageRecord.getTargetMiId(), CardUsageTyepEnum.FREE); |
|
|
ProfileCardUsageRecord record = ProfileCardUsageRecord.build(usageRecord.getUserId(), usageRecord.getTargetMiId(), CardUsageTyepEnum.FREE); |
|
|
profileCardUsageRecordDao.insert(record); |
|
|
profileCardUsageRecordDao.insert(record); |
|
|
|
|
|
vo.setSuccess(true); |
|
|
} else { |
|
|
} else { |
|
|
//免费使用完后,看看有没有资料卡使用 |
|
|
//免费使用完后,看看有没有资料卡使用 |
|
|
if (rightApplicationService.consumeRight(usageRecord.getUserId(), marriageInformation.getId(), RightTypeEnum.PROFILE_CARD, null)) { |
|
|
if (rightApplicationService.consumeRight(usageRecord.getUserId(), marriageInformation.getId(), RightTypeEnum.PROFILE_CARD, null)) { |
|
|
ProfileCardUsageRecord record = ProfileCardUsageRecord.build(usageRecord.getUserId(), usageRecord.getTargetMiId(), CardUsageTyepEnum.CARD); |
|
|
ProfileCardUsageRecord record = ProfileCardUsageRecord.build(usageRecord.getUserId(), usageRecord.getTargetMiId(), CardUsageTyepEnum.CARD); |
|
|
profileCardUsageRecordDao.insert(record); |
|
|
profileCardUsageRecordDao.insert(record); |
|
|
|
|
|
vo.setSuccess(true); |
|
|
} else { |
|
|
} else { |
|
|
vo.setSuccess(false); |
|
|
vo.setSuccess(false); |
|
|
} |
|
|
} |
|
|
|