|
|
@@ -588,8 +588,9 @@ public class HlgAccountDetailServiceImpl extends ServiceImpl<HlgAccountDetailMap
|
|
|
@Override
|
|
|
public Result<HlgAccountDetail> refundA_B(HlgCpAccountDetail hlgCpAccountDetail) {
|
|
|
Result<HlgAccountDetail> result = new Result<>();
|
|
|
+ HlgCpAccountDetail hlgCpAccountDetailDto = hlgCpAccountDetailService.getById(hlgCpAccountDetail.getId());
|
|
|
//平台支付账户
|
|
|
- HlgCpAccount hlgCpAccount = hlgCpAccountService.getById(hlgCpAccountDetail.getCpAccountId());
|
|
|
+ HlgCpAccount hlgCpAccount = hlgCpAccountService.getById(hlgCpAccountDetailDto.getCpAccountId());
|
|
|
/**
|
|
|
* 1、拦截条件:该企业未绑定开心平台
|
|
|
*/
|
|
|
@@ -601,7 +602,7 @@ public class HlgAccountDetailServiceImpl extends ServiceImpl<HlgAccountDetailMap
|
|
|
/**
|
|
|
* account-detail(更新)
|
|
|
*/
|
|
|
- HlgAccountDetail hlgAccountDetail = this.getById(hlgCpAccountDetail.getAccountDetailId());
|
|
|
+ HlgAccountDetail hlgAccountDetail = this.getById(hlgCpAccountDetailDto.getAccountDetailId());
|
|
|
hlgAccountDetail.setIsDrawback(1);
|
|
|
this.updateById(hlgAccountDetail);
|
|
|
/**
|
|
|
@@ -616,16 +617,16 @@ public class HlgAccountDetailServiceImpl extends ServiceImpl<HlgAccountDetailMap
|
|
|
/**
|
|
|
* cp_account_detail(更新)
|
|
|
*/
|
|
|
- hlgCpAccountDetail.setIsDrawback(1);
|
|
|
- hlgCpAccountDetailService.updateById(hlgCpAccountDetail);
|
|
|
+ hlgCpAccountDetailDto.setIsDrawback(1);
|
|
|
+ hlgCpAccountDetailService.updateById(hlgCpAccountDetailDto);
|
|
|
/**
|
|
|
* cp-account(更新)
|
|
|
*/
|
|
|
- hlgCpAccount.setTotalDeposit(businessAccountUtils.sub(hlgCpAccount.getTotalDeposit(), hlgCpAccountDetail.getAmount()));
|
|
|
- hlgCpAccount.setTotalDepositServiceFee(businessAccountUtils.sub(hlgCpAccount.getTotalDepositServiceFee(), hlgCpAccountDetail.getServiceFee()));
|
|
|
+ hlgCpAccount.setTotalDeposit(businessAccountUtils.sub(hlgCpAccount.getTotalDeposit(), hlgCpAccountDetailDto.getAmount()));
|
|
|
+ hlgCpAccount.setTotalDepositServiceFee(businessAccountUtils.sub(hlgCpAccount.getTotalDepositServiceFee(), hlgCpAccountDetailDto.getServiceFee()));
|
|
|
hlgCpAccount.setTotalPaymentServiceFee(businessAccountUtils.sub(hlgCpAccount.getTotalPaymentServiceFee(), hlgAccountDetail.getServiceFee()));
|
|
|
- hlgCpAccount.setBalance(businessAccountUtils.sub(hlgCpAccount.getBalance(), hlgCpAccountDetail.getAmount()));
|
|
|
- hlgCpAccount.setServiceFeeBalance(businessAccountUtils.sub(hlgCpAccount.getServiceFeeBalance(), businessAccountUtils.sub(hlgCpAccountDetail.getServiceFee(), hlgAccountDetail.getServiceFee())));
|
|
|
+ hlgCpAccount.setBalance(businessAccountUtils.sub(hlgCpAccount.getBalance(), hlgCpAccountDetailDto.getAmount()));
|
|
|
+ hlgCpAccount.setServiceFeeBalance(businessAccountUtils.sub(hlgCpAccount.getServiceFeeBalance(), businessAccountUtils.sub(hlgCpAccountDetailDto.getServiceFee(), hlgAccountDetail.getServiceFee())));
|
|
|
hlgCpAccountService.updateById(hlgCpAccount);
|
|
|
result.success("退款成功");
|
|
|
return result;
|