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