Browse Source

红娘直播任务

master
张彭杰 3 weeks ago
parent
commit
78e8dc44de
1 changed files with 5 additions and 1 deletions
  1. 6
      dating-agency-mall-server/src/main/java/com/qniao/dam/application/handler/siteactivity/SiteActivityEventHandler.java

6
dating-agency-mall-server/src/main/java/com/qniao/dam/application/handler/siteactivity/SiteActivityEventHandler.java

@ -33,6 +33,7 @@ import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
@ -60,6 +61,9 @@ public class SiteActivityEventHandler extends BaseApplicationService {
@Resource
private AcquireRevenueRewardDomainService acquireRevenueRewardDomainService;
@Value("${quzhaoqin_app_id}")
private Long quzhaoqinAppId;
@RabbitListener(bindings = @QueueBinding(value = @Queue(MqQueue.SITE_ACTIVITY_PARTICIPANT_SETTLED),
exchange = @Exchange(value = MqExchange.SITE_ACTIVITY_PARTICIPANT_SETTLED,
type = ExchangeTypes.FANOUT)))
@ -90,7 +94,7 @@ public class SiteActivityEventHandler extends BaseApplicationService {
revenueReward.setRecordList(Collections.singletonList(revenueRewardRecord));
//钱包
WalletAccount walletAccount = walletAccountQueryService.queryByType(dto.getAppId(), matchmaker.getUserId(), IdentityTypeEnum.INDIVIDUAL);
WalletAccount walletAccount = walletAccountQueryService.queryByType(quzhaoqinAppId, matchmaker.getUserId(), IdentityTypeEnum.INDIVIDUAL);
BigDecimal originalBalance = walletAccount.getTotalBalance();
walletAccount.setAvailableBalance(walletAccount.getAvailableBalance().add(earnings));
walletAccount.setTotalBalance(walletAccount.getAvailableBalance().add(walletAccount.getFrozenBalance()));

Loading…
Cancel
Save