!332 fix: 修复分销提现异常

Merge pull request !332 from Lele/dev
This commit is contained in:
Lele 2024-01-25 10:42:13 +00:00 committed by Gitee
commit fc869a34e0
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 22 additions and 7 deletions

View File

@ -138,17 +138,18 @@ public class DistributionCashServiceImpl extends ServiceImpl<DistributionCashMap
distribution.setCanRebate(CurrencyUtil.add(distribution.getCanRebate(), distributorCash.getPrice()));
distributorCash.setDistributionCashStatus(WithdrawStatusEnum.FAIL_AUDITING.name());
}
distribution.setCommissionFrozen(CurrencyUtil.sub(distribution.getCommissionFrozen(), distributorCash.getPrice()));
//分销员金额相关处理
distributionService.updateById(distribution);
//修改分销提现申请
boolean bool = this.updateById(distributorCash);
if (bool) {
//组织会员提现审核消息
memberWithdrawalMessage.setMemberId(distribution.getMemberId());
memberWithdrawalMessage.setPrice(distributorCash.getPrice());
String destination = rocketmqCustomProperties.getMemberTopic() + ":" + MemberTagsEnum.MEMBER_WITHDRAWAL.name();
rocketMQTemplate.asyncSend(destination, memberWithdrawalMessage, RocketmqSendCallbackBuilder.commonCallback());
}
//if (bool) {
// //组织会员提现审核消息
// memberWithdrawalMessage.setMemberId(distribution.getMemberId());
// memberWithdrawalMessage.setPrice(distributorCash.getPrice());
// String destination = rocketmqCustomProperties.getMemberTopic() + ":" + MemberTagsEnum.MEMBER_WITHDRAWAL.name();
// rocketMQTemplate.asyncSend(destination, memberWithdrawalMessage, RocketmqSendCallbackBuilder.commonCallback());
//}
return distributorCash;
}
throw new ServiceException(ResultCode.DISTRIBUTION_NOT_EXIST);

View File

@ -15,10 +15,20 @@ public enum WithdrawStatusEnum {
* 审核成功即提现成功
*/
VIA_AUDITING("审核通过"),
/**
* 分销提现
* 审核成功即提现成功
*/
D_VIA_AUDITING("分销提现审核通过"),
/**
* 审核未通过
*/
FAIL_AUDITING("审核未通过"),
/**
* 分销提现
* 审核未通过
*/
D_FAIL_AUDITING("分销提现审核未通过"),
/**
* 提现成功
*/

View File

@ -23,6 +23,10 @@ public enum MemberTagsEnum {
* 会员提现
*/
MEMBER_WITHDRAWAL("会员提现"),
/**
* 会员提现
*/
DISTRIBUTION_WITHDRAWAL("分销提现"),
/**
* 会员信息更改
*/