| | |
| | | } |
| | | |
| | | |
| | | @Transactional |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public ServerResponse chargeSuccess(UserRecharge userRecharge) throws Exception { |
| | | log.info("充值订单 确认成功操作 id = {}", userRecharge.getId()); |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | @Transactional |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public ServerResponse updateState(Integer chargeId, Integer state) throws Exception { |
| | | UserRecharge userRecharge = this.userRechargeMapper.selectById(chargeId); |
| | | |
| | |
| | | return ServerResponse.createByErrorMsg("参数不能为空"); |
| | | } |
| | | |
| | | try { |
| | | User user = this.userMapper.selectById(userId); |
| | | if (user == null) { |
| | | return ServerResponse.createByErrorMsg("找不到用户"); |
| | |
| | | return ServerResponse.createBySuccessMsg("生成订单成功!"); |
| | | } |
| | | return ServerResponse.createByErrorMsg("生成订单失败,请重试"); |
| | | } catch (Exception e) { |
| | | return ServerResponse.createByErrorMsg(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | |