|
@@ -173,7 +173,8 @@ public class AppUsersCashrecordController extends BaseController
|
|
throw new Exception("审核失败,用户提现账号不存在");
|
|
throw new Exception("审核失败,用户提现账号不存在");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- Double amount = (appUsersCashrecord.getMoney().doubleValue() - appUsersCashrecord.getService().doubleValue()) * 100;
|
|
|
|
|
|
+// Double amount = (appUsersCashrecord.getMoney().doubleValue() - appUsersCashrecord.getService().doubleValue()) * 100;
|
|
|
|
+ Double amount = (appUsersCashrecord.getMoney().doubleValue()) * 100;
|
|
Map<String, Object> map = PayOrderUtils.getPayUrl(String.valueOf(appUsersCashrecord.getOrderno()),appChargeChannel.getChannelKey(),amount.intValue(),extra);
|
|
Map<String, Object> map = PayOrderUtils.getPayUrl(String.valueOf(appUsersCashrecord.getOrderno()),appChargeChannel.getChannelKey(),amount.intValue(),extra);
|
|
String url = "";
|
|
String url = "";
|
|
if("1".equals(String.valueOf(map.get("code")))){
|
|
if("1".equals(String.valueOf(map.get("code")))){
|
|
@@ -231,9 +232,6 @@ public class AppUsersCashrecordController extends BaseController
|
|
String tradeNo = map.get("tradeNo").toString();
|
|
String tradeNo = map.get("tradeNo").toString();
|
|
//验证回调订单
|
|
//验证回调订单
|
|
Map<String, Object> checkMap = PayOrderUtils.checkOrder(orderNo,tradeNo);
|
|
Map<String, Object> checkMap = PayOrderUtils.checkOrder(orderNo,tradeNo);
|
|
- if(!"1".equals(String.valueOf(checkMap.get("code")))){
|
|
|
|
- return "failed";
|
|
|
|
- }
|
|
|
|
LambdaQueryWrapper<AppUsersCashrecord> queryWrapper = new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<AppUsersCashrecord> queryWrapper = new LambdaQueryWrapper<>();
|
|
queryWrapper.eq(AppUsersCashrecord::getOrderno,orderNo);
|
|
queryWrapper.eq(AppUsersCashrecord::getOrderno,orderNo);
|
|
AppUsersCashrecord appUsersCashrecord = appUsersCashrecordService.getOne(queryWrapper);
|
|
AppUsersCashrecord appUsersCashrecord = appUsersCashrecordService.getOne(queryWrapper);
|
|
@@ -244,7 +242,27 @@ public class AppUsersCashrecordController extends BaseController
|
|
update.setId(appUsersCashrecord.getId());
|
|
update.setId(appUsersCashrecord.getId());
|
|
update.setCashOutStatus(1L);
|
|
update.setCashOutStatus(1L);
|
|
update.setCashOutOrderId(tradeNo);
|
|
update.setCashOutOrderId(tradeNo);
|
|
|
|
+ if(!"1".equals(String.valueOf(checkMap.get("code")))){
|
|
|
|
+ //转出失败
|
|
|
|
+ //流水 余额
|
|
|
|
+ AppUser appUser = appUserService.selectAppUserByUserid(appUsersCashrecord.getUid());
|
|
|
|
+ if(null == appUser){
|
|
|
|
+ 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);
|
|
|
|
+ appUserCountTask.updateWithdrawAble(appUser.getUserid());
|
|
|
|
+ //更新状态
|
|
|
|
+ update.setCashOutStatus(2L);
|
|
|
|
+ }
|
|
appUsersCashrecordService.updateAppUsersCashrecord(update);
|
|
appUsersCashrecordService.updateAppUsersCashrecord(update);
|
|
|
|
+
|
|
return "success";
|
|
return "success";
|
|
}else{
|
|
}else{
|
|
return "failed";
|
|
return "failed";
|