| | |
| | | } |
| | | |
| | | |
| | | public ServerResponse createOrder(Integer userId, Integer state, Integer amt, String payChannel) { |
| | | public ServerResponse createOrder(Integer userId, Integer state, Integer amt, String payChannel, String accectType) { |
| | | if (userId == null || state == null || amt == null) { |
| | | return ServerResponse.createByErrorMsg("参数不能为空"); |
| | | } |
| | | |
| | | if (accectType == null || accectType.isEmpty()) { |
| | | accectType = EStockType.getDefault().getCode(); |
| | | } |
| | | try { |
| | | User user = this.userMapper.selectById(userId); |
| | | if (user == null) { |
| | |
| | | userRecharge.setPayTime(new Date()); |
| | | userRecharge.setOrderStatus(Integer.valueOf(1)); |
| | | userRecharge.setPayId(1); |
| | | userAssetsServices.availablebalanceChange(EStockType.getDefault().getCode(), |
| | | userAssetsServices.availablebalanceChange(accectType, |
| | | userId,EUserAssets.TOP_UP,new BigDecimal(amt),"",""); |
| | | int insertCount = this.userRechargeMapper.insert(userRecharge); |
| | | if (insertCount > 0) { |