| | |
| | | return ERROR; |
| | | } |
| | | } |
| | | public static void main(String[] args) { |
| | | // 调用支付宝接口 通过银行卡号获取银行信息 |
| | | String url = "https://ccdcapi.alipay.com/validateAndCacheCardInfo.json?_input_charset=utf-8&" + |
| | | "cardNo=6217003800041315031&cardBinCheck=true"; |
| | | HashMap<String, String> hashMap = new HashMap<>(); |
| | | String result = HttpRequestUtil.postRequest(url,hashMap); |
| | | System.err.println(result); |
| | | JSONObject json = JSONObject.parseObject(result); |
| | | String bank = json.getString("bank"); |
| | | String cardType = json.getString("cardType"); |
| | | System.err.println(bank); |
| | | System.err.println(cardType); |
| | | |
| | | } |
| | | // public static void main(String[] args) { |
| | | // // 调用支付宝接口 通过银行卡号获取银行信息 |
| | | // String url = "https://ccdcapi.alipay.com/validateAndCacheCardInfo.json?_input_charset=utf-8&" + |
| | | // "cardNo=6217003800041315031&cardBinCheck=true"; |
| | | // HashMap<String, String> hashMap = new HashMap<>(); |
| | | // String result = HttpRequestUtil.postRequest(url,hashMap); |
| | | // System.err.println(result); |
| | | // JSONObject json = JSONObject.parseObject(result); |
| | | // String bank = json.getString("bank"); |
| | | // String cardType = json.getString("cardType"); |
| | | // System.err.println(bank); |
| | | // System.err.println(cardType); |
| | | // |
| | | // } |
| | | |
| | | |
| | | /** |
| | |
| | | System.err.println("订单号"+order_no); |
| | | operatorAuth.setOrderNo(order_no); |
| | | operatorAuth.setRefuseReason(""); |
| | | |
| | | operatorAuthService.saveOrUpdate(operatorAuth); |
| | | Integer userId = operatorService.getById(operatorId).getUserId(); |
| | | OperatorUser user = operatorUserService.getOne(new QueryWrapper<OperatorUser>().eq("userId", userId)); |
| | |
| | | } |
| | | operatorUserService.saveOrUpdate(user); |
| | | } else { |
| | | Integer userId = operatorService.getById(operatorId).getUserId(); |
| | | OperatorUser user = operatorUserService.getOne(new QueryWrapper<OperatorUser>().eq("userId", userId)); |
| | | user.setAlipayAudit(3); |
| | | operatorUserService.saveOrUpdate(user); |
| | | operatorAuth.setRefuseReason(response.getSubMsg()); |
| | | if (response.getCode().equals("40004")){ |
| | | String subMsg = response.getSubMsg(); |
| | | return ResultUtil.error(subMsg); |
| | |
| | | } |
| | | return ResultUtil.success("添加成功"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取所有运营商 |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/getOperatorListAll") |
| | | public Object getOperatorListAll(){ |
| | | return operatorService.list(new QueryWrapper<TOperator>().eq("state", 1)); |
| | | } |
| | | } |