|
|
|
@ -2,13 +2,10 @@ package com.example.demo.serviceImpl.cash; |
|
|
|
|
|
|
|
import com.example.demo.Util.LanguageTranslationUtil; |
|
|
|
import com.example.demo.Util.SimpleIdGenerator; |
|
|
|
import com.example.demo.domain.entity.Admin; |
|
|
|
import com.example.demo.domain.entity.*; |
|
|
|
import com.example.demo.Util.BusinessException; |
|
|
|
import com.example.demo.Util.GoldTistV2; |
|
|
|
import com.example.demo.config.RabbitMQConfig; |
|
|
|
import com.example.demo.domain.entity.Market; |
|
|
|
import com.example.demo.domain.entity.User; |
|
|
|
import com.example.demo.domain.entity.UserGoldRecord; |
|
|
|
import com.example.demo.domain.vo.bean.Region; |
|
|
|
import com.example.demo.domain.vo.cash.*; |
|
|
|
import com.example.demo.domain.vo.coin.Messages; |
|
|
|
@ -20,6 +17,7 @@ import com.example.demo.mapper.coin.AuditMapper; |
|
|
|
import com.example.demo.mapper.coin.MarketMapper; |
|
|
|
import com.example.demo.mapper.coin.OperationLogMapper; |
|
|
|
import com.example.demo.mapper.coin.RefundMapper; |
|
|
|
import com.example.demo.service.Wallet.WalletService; |
|
|
|
import com.example.demo.service.cash.RefundService; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
@ -67,6 +65,8 @@ public class CashRefundServiceImpl implements RefundService { |
|
|
|
private CashCollectionMapper cashCollectionMapper; |
|
|
|
@Autowired |
|
|
|
private LanguageTranslationUtil languageTranslationUtil; |
|
|
|
@Autowired |
|
|
|
private WalletService walletService; |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageInfo<CashRecordDTO> select(Integer pageNum, Integer pageSize, CashRecordDTO cashRecordDTO) { |
|
|
|
@ -426,6 +426,18 @@ public class CashRefundServiceImpl implements RefundService { |
|
|
|
user.setCurrentFreeJune(BigDecimal.valueOf(-userGoldRecord.getFreeJune())); //当前六月免费金币 |
|
|
|
user.setCurrentFreeDecember(BigDecimal.valueOf(-userGoldRecord.getFreeDecember())); //当前十二月免费金币 |
|
|
|
auditMapper.updateUserGold(user); |
|
|
|
|
|
|
|
//钱包更新 |
|
|
|
List<UserWalletRecord> userWalletList = walletService.selectUserWalletRecord(userGoldRecord.getJwcode(), orderCode); |
|
|
|
UserRegionWallet userRegionWallet = new UserRegionWallet(); |
|
|
|
for (UserWalletRecord userWalletRecord : userWalletList){ |
|
|
|
userRegionWallet.setJwcode(userWalletRecord.getJwcode()); |
|
|
|
userRegionWallet.setWalletId(userWalletRecord.getWalletId()); |
|
|
|
userRegionWallet.setCurrentPermanentGold(BigDecimal.valueOf(userWalletRecord.getAmount())); |
|
|
|
walletService.updateUserGoldRecord(userRegionWallet); |
|
|
|
walletService.updateUserWalletRecord(userWalletRecord.getId()); |
|
|
|
} |
|
|
|
|
|
|
|
GoldTistV2.addCoinNew(userGoldRecord.getJwcode().toString(), 58, //退款免费+永久金币-充值 |
|
|
|
(double) (userGoldRecord.getFreeDecember() + userGoldRecord.getFreeJune() + userGoldRecord.getPermanentGold()) / 100, SimpleIdGenerator.generateId(), |
|
|
|
userGoldRecord.getRemark(), (double) userGoldRecord.getPermanentGold() / 100, auditName, "退款金币充值"); |
|
|
|
|