| | |
| | | TOperator data = operatorService.getById(id); |
| | | User byId = userService.getById(data.getUserId()); |
| | | model.addAttribute("user",byId); |
| | | OperatorUser operatorId = operatorUserService.getOne(new QueryWrapper<OperatorUser>() |
| | | .eq("operatorId", data.getId())); |
| | | |
| | | model.addAttribute("data",data); |
| | | String state=""; |
| | | switch (operatorId.getAlipayAudit()){ |
| | | case 0: |
| | | state="未认证"; |
| | | break; |
| | | case 1: |
| | | state="待审核"; |
| | | break; |
| | | case 2: |
| | | state="已通过"; |
| | | break; |
| | | case 3: |
| | | state="已拒绝"; |
| | | break; |
| | | } |
| | | model.addAttribute("state",state); |
| | | OperatorAuthAlipay info = operatorAuthService.getOne(new QueryWrapper<OperatorAuthAlipay>() |
| | | .eq("operatorId", id)); |
| | | model.addAttribute("item",info); |
| | |
| | | List<TCity> list5 = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 1)); |
| | | model.addAttribute("list5",list5); |
| | | } |
| | | |
| | | |
| | | |
| | | model.addAttribute("bodyType",info.getBodyType()); |
| | | model.addAttribute("accountType",info.getAccountType()); |
| | | model.addAttribute("useType",info.getUseType()); |
| | |
| | | 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); |
| | | // |
| | | // } |
| | | |
| | | |
| | | /** |
| | |
| | | Integer userId1 = byId.getUserId(); |
| | | OperatorUser userId2 = operatorUserService.getOne(new QueryWrapper<OperatorUser>() |
| | | .eq("userId", userId1)); |
| | | |
| | | userId2.setAlipayAudit(1); |
| | | // 01是企业 |
| | | if (bodyType.equals("01")){ |
| | | userId2.setAlipayType(2); |
| | | }else{ |
| | | userId2.setAlipayType(1); |
| | | } |
| | | operatorUserService.saveOrUpdate(userId2); |
| | | OperatorAuthAlipay data = operatorAuthService.getOne(new QueryWrapper<OperatorAuthAlipay>().eq("operatorId", operatorId)); |
| | | // 调用支付宝接口 通过银行卡号获取银行信息 |
| | | // 调用支付宝接口 通过银行卡号获取银行信息 |
| | | String url = "https://ccdcapi.alipay.com/validateAndCacheCardInfo.json?_input_charset=utf-8&" + |
| | | "cardNo="+bankCard+"&cardBinCheck=true"; |
| | | |
| | | HashMap<String, String> hashMap = new HashMap<>(); |
| | | String result = HttpRequestUtil.postRequest(url,hashMap); |
| | | System.err.println(result); |
| | |
| | | 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)); |
| | | } |
| | | } |