| | |
| | | package com.nq.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.nq.common.ServerResponse; |
| | | import com.nq.dao.MoneyLogMapper; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public ServerResponse updateUserAssets(Integer id, String amt,String type) { |
| | | UserAssets userAssets = userAssetsMapper.selectById(id); |
| | | public ServerResponse updateUserAssets(Integer id, String amt,String type,String accectType) { |
| | | UserAssets userAssets = userAssetsMapper.selectOne(new LambdaQueryWrapper<>(UserAssets.class).eq(UserAssets::getUserId,id).eq(UserAssets::getAccectType,accectType)); |
| | | // 0 入款 1是扣钱 2 是充值 3 是提币 |
| | | BigDecimal bigAmt = new BigDecimal(amt); |
| | | if(type.equals("0") || type.equals("1")){ |
| | |
| | | } |
| | | }else{ |
| | | if(type.equals("2")){ |
| | | return userRechargeService.createOrder(userAssets.getUserId(),1,bigAmt.intValue(),"1"); |
| | | return userRechargeService.createOrder(id,1,bigAmt.intValue(),"1",accectType); |
| | | }else{ |
| | | |
| | | |