|
@@ -241,6 +241,7 @@ public class AppUsersCashrecordController extends BaseController
|
|
if(null == appUsersCashrecord){
|
|
if(null == appUsersCashrecord){
|
|
return "failed";
|
|
return "failed";
|
|
}
|
|
}
|
|
|
|
+
|
|
AppUsersCashrecord update = new AppUsersCashrecord();
|
|
AppUsersCashrecord update = new AppUsersCashrecord();
|
|
update.setId(appUsersCashrecord.getId());
|
|
update.setId(appUsersCashrecord.getId());
|
|
update.setCashOutStatus(1L);
|
|
update.setCashOutStatus(1L);
|
|
@@ -252,14 +253,18 @@ public class AppUsersCashrecordController extends BaseController
|
|
if(null == appUser){
|
|
if(null == appUser){
|
|
return "failed";
|
|
return "failed";
|
|
}
|
|
}
|
|
- FinTranAddedInfo addedInfo = FinTranAddedInfo.createTranInfo(appUser.getUserid(), 0, 0, AppSceneType.Scene_None, "");
|
|
|
|
- FinTranRecord tran = FinTranRecord.initFinTranRecordSomeParams(addedInfo, FinTranType3.CASH_DIAMOND_INCOME_BACK, FinTranType1.U_Income_Coin_Balance, appUser);
|
|
|
|
- tran.setDiamondCoinChange(appUsersCashrecord.getVotes().doubleValue());
|
|
|
|
- tran.setAfterDiamondCoin(appUser.getDiamondCoin());
|
|
|
|
- tran.setCurrencyType(TranCurrencyType.Balance.getType());
|
|
|
|
- tran.setTranGroupId(IdUtil.getSnowflakeNextId());
|
|
|
|
- tran.setRemarks("转出失败:回退金额");
|
|
|
|
- appUserService.updateUserAmount(tran);
|
|
|
|
|
|
+ if(null != appUsersCashrecord.getCashOutStatus() && appUsersCashrecord.getCashOutStatus().intValue() == 3) {
|
|
|
|
+ FinTranAddedInfo addedInfo = FinTranAddedInfo.createTranInfo(appUser.getUserid(), 0, 0, AppSceneType.Scene_None, "");
|
|
|
|
+ FinTranRecord tran = FinTranRecord.initFinTranRecordSomeParams(addedInfo, FinTranType3.CASH_DIAMOND_INCOME_BACK, FinTranType1.U_Income_Coin_Balance, appUser);
|
|
|
|
+ tran.setDiamondCoinChange(appUsersCashrecord.getVotes().doubleValue());
|
|
|
|
+ tran.setAfterDiamondCoin(appUser.getDiamondCoin());
|
|
|
|
+ tran.setCurrencyType(TranCurrencyType.Balance.getType());
|
|
|
|
+ tran.setTranGroupId(IdUtil.getSnowflakeNextId());
|
|
|
|
+ tran.setRemarks("转出失败:回退金额");
|
|
|
|
+ appUserService.updateUserAmount(tran);
|
|
|
|
+ }else{
|
|
|
|
+ logger.info("订单{},当前状态非转出中,停止更新失败逻辑",orderNo);
|
|
|
|
+ }
|
|
//更新状态
|
|
//更新状态
|
|
update.setCashOutStatus(2L);
|
|
update.setCashOutStatus(2L);
|
|
}
|
|
}
|