| | |
| | | import com.nq.pojo.UserRecharge; |
| | | import com.nq.utils.DateTimeUtil; |
| | | import com.nq.utils.KeyUtils; |
| | | import com.nq.utils.RechargeAmtValidator; |
| | | import com.nq.utils.UserFundUtil; |
| | | import com.nq.utils.redis.RedisShardedPoolUtils; |
| | | |
| | |
| | | return ServerResponse.createByErrorMsg("参数不能为空"); |
| | | } |
| | | SiteSetting siteSetting = this.iSiteSettingService.getSiteSetting(); |
| | | if (siteSetting == null) { |
| | | return ServerResponse.createByErrorMsg("设置set未初始化"); |
| | | } |
| | | if ((new BigDecimal(siteSetting.getChargeMinAmt() + "")).compareTo(new BigDecimal(amt)) == 1) { |
| | | return ServerResponse.createByErrorMsg("充值金额不得低于" + siteSetting.getChargeMinAmt() + "元"); |
| | | ServerResponse amtCheck = RechargeAmtValidator.validate(siteSetting, new BigDecimal(amt)); |
| | | if (!amtCheck.isSuccess()) { |
| | | return amtCheck; |
| | | } |
| | | |
| | | |
| | |
| | | if (StringUtils.isBlank(amt) || StringUtils.isBlank(payType)) { |
| | | return ServerResponse.createByErrorMsg("参数不能为空"); |
| | | } |
| | | User user= (User) iUserService.findByUserId(uid).getData(); |
| | | User user = iUserService.getUserEntityById(uid); |
| | | if (user == null) { |
| | | return ServerResponse.createByErrorMsg("用户不存在"); |
| | | } |
| | | |
| | | UserRecharge userRecharge = new UserRecharge(); |
| | | |