Browse Source

用户使用联系卡

release
张彭杰 2 months ago
parent
commit
47de46c88b
1 changed files with 2 additions and 0 deletions
  1. 2
      dating-agency-mall-server/src/main/java/com/qniao/dam/application/service/pcur/ProfileCardUsageRecordApplicationService.java

2
dating-agency-mall-server/src/main/java/com/qniao/dam/application/service/pcur/ProfileCardUsageRecordApplicationService.java

@ -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);
} }

Loading…
Cancel
Save