Commit 3041b217 authored by 周健威's avatar 周健威

Merge remote-tracking branch 'origin/base-modify' into base-modify

parents e4e01e01 b51f39c3
......@@ -270,16 +270,17 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> {
if (restResponse.getStatus()!=ResultCode.SUCCESS_CODE){
return restResponse;
}
WalletCathSumDto sumDto=JSONUtil.toBean( restResponse.getData().toString(),WalletCathSumDto.class);
String data=JSONObject.toJSONString(restResponse.getData());
WalletCathSumDto sumDto=JSONUtil.toBean( data,WalletCathSumDto.class);
if (sumDto==null){
return ObjectRestResponse.createFailedResult(ResultCode.NULL_CODE, "参数不能为空");
}
BigDecimal commission=amount.divide(sumDto.getProceduReates()).multiply(new BigDecimal("100")).setScale(2, RoundingMode.HALF_UP);
BigDecimal commission=amount.multiply(sumDto.getProceduReates()).divide(new BigDecimal("100")).setScale(2, RoundingMode.HALF_UP);
BigDecimal balnece=sumDto.getBalance();
//到账金额
BigDecimal realAmount=balnece.subtract(commission);
BigDecimal realAmount=amount;
if (amount.compareTo(realAmount)>0){
realAmount=amount;
realAmount=balnece.subtract(commission);
}
log.info("-----提现申请-----proceduReates==="+sumDto.getProceduReates()+"----commission===="+commission+"---realAmount==="+realAmount);
//添加账号
......
......@@ -105,6 +105,7 @@ public class MyWalletController {
public ObjectRestResponse applyCath(@RequestBody ApplyCathVo applyCathVo, HttpServletRequest request){
try {
Integer userId=Integer.parseInt(userAuthUtil.getInfoFromToken(userAuthConfig.getToken(request)).getId());
applyCathVo.setUserId(userId);
return myWalletBiz.applyCath(applyCathVo);
}catch (Exception e) {
throw new BaseException(e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment