| | |
| | | return ERROR; |
| | | } |
| | | } |
| | | public static void main(String[] args) { |
| | | String bankName = "中国工商银行"; // 要转换为简写的银行名称 |
| | | |
| | | Pattern pattern = Pattern.compile("([\\u4e00-\\u9fa5]+)(?=\\s+[A-Za-z]+$)"); |
| | | Matcher matcher = pattern.matcher(bankName); |
| | | if (matcher.find()) { |
| | | System.out.println(matcher.group()); // 输出结果:"工商银行" -> "ICBC" |
| | | } else { |
| | | System.out.println("无法识别该银行名称!"); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 支付宝商户认证提交 |
| | | */ |
| | |
| | | String order_no = json1.getString("order_id"); |
| | | 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)); |
| | |
| | | }else{ |
| | | user.setAlipayType(1); |
| | | } |
| | | operatorUserService.saveOrUpdate(user); |
| | | } else { |
| | | if (response.getCode().equals("40004")){ |
| | | String subMsg = response.getSubMsg(); |
| | |
| | | */ |
| | | @RequestMapping(value = "/proportion") |
| | | @ResponseBody |
| | | public Object auth(Integer operatorIdOne ,String alipayProportion,String alipayNum,String wechatProportion, |
| | | String wechatNum) { |
| | | Integer id1 = operatorService.getOne(new QueryWrapper<TOperator>().eq("id", operatorIdOne)) |
| | | .getUserId(); |
| | | OperatorUser id = operatorUserService.getOne(new QueryWrapper<OperatorUser>().eq("userId", id1)); |
| | | public Object auth(Integer operatorIdOne ,String alipayProportion,String wechatProportion) { |
| | | OperatorUser id = operatorUserService.getOne(new QueryWrapper<OperatorUser>().eq("operatorId", operatorIdOne)); |
| | | id.setAlipayProportion(alipayProportion); |
| | | id.setWechatProportion(wechatProportion); |
| | | id.setAlipayNum(alipayNum); |
| | | id.setWechatNum(wechatNum); |
| | | operatorUserService.updateById(id); |
| | | return SUCCESS_TIP; |
| | | } |