| | |
| | | |
| | | /** |
| | | * 账户余额充值支付回调 |
| | | * @param request |
| | | * @param response |
| | | */ |
| | | @ResponseBody |
| | |
| | | |
| | | /** |
| | | * 注册商户回调 |
| | | * @param jsonObject |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/base/driver/microenterpriseCallback") |
| | | public void microenterpriseCallback(@RequestBody JSONObject jsonObject){ |
| | | System.err.println(jsonObject.toJSONString()); |
| | | public void microenterpriseCallback(@RequestBody InterfaceResponse interfaceResponse, HttpServletResponse response){ |
| | | try { |
| | | if("0000".equals(interfaceResponse.getCode())) { |
| | | JSONObject jsonObject = JSON.parseObject(interfaceResponse.getResult()); |
| | | String status = jsonObject.getString("status"); |
| | | String parameter1 = jsonObject.getString("parameter1"); |
| | | Driver driver = driverService.selectById(parameter1); |
| | | if ("2".equals(status)) { |
| | | System.err.println("注册代理商子商户失败"); |
| | | } |
| | | if ("0".equals(status)) { |
| | | System.err.println("注册代理商子商户处理中"); |
| | | } |
| | | if ("1".equals(status)) { |
| | | String userId = jsonObject.getString("userId"); |
| | | driver.setMerchantNumber(userId); |
| | | driverService.updateById(driver); |
| | | response.setStatus(200); |
| | | PrintWriter out = response.getWriter(); |
| | | out.print("OK"); |
| | | out.flush(); |
| | | out.close(); |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/base/driver/withdrawCashFZCallback") |
| | | public void withdrawCashFZCallback(@RequestBody InterfaceResponse interfaceResponse){ |
| | | cashWithdrawalService.withdrawCashFZCallback(interfaceResponse); |
| | | public void withdrawCashFZCallback(@RequestBody InterfaceResponse interfaceResponse, HttpServletResponse response){ |
| | | try { |
| | | cashWithdrawalService.withdrawCashFZCallback(interfaceResponse); |
| | | response.setStatus(200); |
| | | PrintWriter out = response.getWriter(); |
| | | out.print("OK"); |
| | | out.flush(); |
| | | out.close(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/base/driver/withdrawCashCallback") |
| | | public void withdrawCashCallback(@RequestBody InterfaceResponse interfaceResponse){ |
| | | cashWithdrawalService.withdrawCashCallback(interfaceResponse); |
| | | public void withdrawCashCallback(@RequestBody InterfaceResponse interfaceResponse, HttpServletResponse response){ |
| | | try { |
| | | cashWithdrawalService.withdrawCashCallback(interfaceResponse); |
| | | response.setStatus(200); |
| | | PrintWriter out = response.getWriter(); |
| | | out.print("OK"); |
| | | out.flush(); |
| | | out.close(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |