| | |
| | | if(null != driver && driver.getApprovalStatus() == 2){ |
| | | return ResultUtil.error("该手机账号已审核通过,请直接登录。"); |
| | | } |
| | | // String idcardFront = driverRegisterWarpper.getIdcardFront(); |
| | | // MultipartFile file = MultipartFileUtil.fileToMultipartFile(new File(idcardFront)); |
| | | // JSONObject certificate = OCRUtil.certificate(2, file); |
| | | // if(null == certificate){ |
| | | // return ResultUtil.error("身份证识别失败"); |
| | | // } |
| | | // String idcode = certificate.getString("公民身份号码"); |
| | | // driver.setIdcard(idcode); |
| | | // |
| | | // |
| | | // String driverLicense = driverRegisterWarpper.getDriverLicense(); |
| | | // file = MultipartFileUtil.fileToMultipartFile(new File(driverLicense)); |
| | | // certificate = OCRUtil.certificate(5, file); |
| | | // if(null == certificate){ |
| | | // return ResultUtil.error("驾驶证识别失败"); |
| | | // } |
| | | // System.err.println("驾驶证:" + certificate.toString()); |
| | | // String driverLicenseNumber = certificate.getString("驾驶证号码"); |
| | | // driver.setDriverLicenseNumber(driverLicenseNumber); |
| | | // driver.setFirstCertificateTime(null); |
| | | |
| | | |
| | | //账号审核拒绝后的处理 |
| | | if(null != driver && driver.getApprovalStatus() == 3){ |
| | |
| | | } |
| | | driver.setCreateTime(new Date()); |
| | | this.insert(driver); |
| | | |
| | | //司机邀请注册奖励 |
| | | if(null != driver.getInviterId()){ |
| | | Driver driver1 = this.selectById(driver.getInviterId()); |
| | | SystemConfig systemConfig = systemConfigService.selectOne(new EntityWrapper<SystemConfig>().eq("type", 4)); |
| | | if(null != systemConfig){ |
| | | Integer num7 = JSON.parseObject(systemConfig.getContent()).getInteger("num7"); |
| | | if(num7 > 0){ |
| | | AccountChangeDetail accountChangeDetail = new AccountChangeDetail(); |
| | | accountChangeDetail.setCode(System.currentTimeMillis() + UUIDUtil.getNumberRandom(3)); |
| | | accountChangeDetail.setUserType(2); |
| | | accountChangeDetail.setUserId(driver1.getId()); |
| | | accountChangeDetail.setType(2); |
| | | accountChangeDetail.setChangeType(5); |
| | | accountChangeDetail.setOldData(driver1.getIntegral().doubleValue()); |
| | | driver1.setIntegral(driver1.getIntegral() + num7); |
| | | accountChangeDetail.setNewData(driver1.getIntegral().doubleValue()); |
| | | accountChangeDetail.setExplain("邀请司机注册奖励"); |
| | | accountChangeDetailService.saveData(accountChangeDetail); |
| | | this.updateById(driver1); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return ResultUtil.success(); |
| | | } |
| | |
| | | |
| | | if(type == 1){ |
| | | ResultUtil weixinpay = payMoneyUtil.weixinpay("余额充值", "", out_trade_no, amount.toString(), "/base/driver/balanceRechargeCallback", "APP"); |
| | | if(weixinpay.getCode() != 200){ |
| | | if(weixinpay.getCode() != 10000){ |
| | | return weixinpay; |
| | | } |
| | | new Thread(new Runnable() { |
| | |
| | | } |
| | | if(type == 2){ |
| | | ResultUtil<String> alipay = payMoneyUtil.alipay("余额充值", "余额充值", out_trade_no, amount.toString(), "/base/driver/balanceRechargeCallbackAli"); |
| | | if(alipay.getCode() != 200){ |
| | | if(alipay.getCode() != 10000){ |
| | | return alipay; |
| | | } |
| | | new Thread(new Runnable() { |