| | |
| | | map.put("audioUrl", audioUrl); |
| | | map.put("from", from); |
| | | jsonObject.put("data", map); |
| | | redisUtil.setStrValue( (type == 1 ? "USER_ORDER_MESSAGE:" : "DRIVER_ORDER_MESSAGE") + ":" + uid, jsonObject.toJSONString(), 30); |
| | | |
| | | //调用推送 |
| | | HttpHeaders headers = new HttpHeaders(); |
| | |
| | | map.put("orderId", orderId); |
| | | map.put("orderType", orderType); |
| | | jsonObject.put("data", map); |
| | | redisUtil.setStrValue( (type == 1 ? "USER_ORDER_MESSAGE:" : "DRIVER_ORDER_MESSAGE") + ":" + uid, jsonObject.toJSONString(), 30); |
| | | |
| | | //调用推送 |
| | | HttpHeaders headers = new HttpHeaders(); |
| | |
| | | map.put("orderId", orderId); |
| | | map.put("orderType", orderType); |
| | | jsonObject.put("data", map); |
| | | redisUtil.setStrValue( (type == 1 ? "USER_ORDER_MESSAGE:" : "DRIVER_ORDER_MESSAGE") + ":" + uid, jsonObject.toJSONString(), 30); |
| | | |
| | | //调用推送 |
| | | HttpHeaders headers = new HttpHeaders(); |
| | |
| | | map.put("status", status); |
| | | map.put("audioUrl", audioUrl); |
| | | jsonObject.put("data", map); |
| | | redisUtil.setStrValue( (type == 1 ? "USER_ORDER_MESSAGE:" : "DRIVER_ORDER_MESSAGE") + ":" + uid, jsonObject.toJSONString(), 30); |
| | | |
| | | //调用推送 |
| | | HttpHeaders headers = new HttpHeaders(); |
| | |
| | | } |
| | | |
| | | msg.put("data", map); |
| | | JSONObject jsonObject = pushMap.get(orderId + "_" + orderType); |
| | | Integer uid = jsonObject.getInteger("id"); |
| | | Integer type = jsonObject.getInteger("type"); |
| | | redisUtil.setStrValue( (type == 1 ? "USER_ORDER_MESSAGE:" : "DRIVER_ORDER_MESSAGE") + ":" + uid, jsonObject.toJSONString(), 30); |
| | | |
| | | //调用推送 |
| | | HttpHeaders headers = new HttpHeaders(); |
| | | // 以表单的方式提交 |
| | | headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); |
| | | //将请求头部和参数合成一个请求 |
| | | JSONObject jsonObject = pushMap.get(orderId + "_" + orderType); |
| | | MultiValueMap<String, Object> params = new LinkedMultiValueMap<>(); |
| | | params.add("msg", msg.toJSONString()); |
| | | params.add("id", jsonObject.getString("id")); |
| | | params.add("type", jsonObject.getString("type")); |
| | | params.add("id", uid.toString()); |
| | | params.add("type", type.toString()); |
| | | HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers); |
| | | String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class); |
| | | JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class); |
| | |
| | | msg.put("msg", "SUCCESS"); |
| | | msg.put("method", "OFFLINE"); |
| | | msg.put("data", new Object()); |
| | | redisUtil.setStrValue( (type == 1 ? "USER_ORDER_MESSAGE:" : "DRIVER_ORDER_MESSAGE") + ":" + id, msg.toJSONString(), 30); |
| | | |
| | | //调用推送 |
| | | HttpHeaders headers = new HttpHeaders(); |
| | |
| | | map.put("orderType", orderType); |
| | | map.put("state", state); |
| | | jsonObject.put("data", map); |
| | | redisUtil.setStrValue( (type == 1 ? "USER_ORDER_MESSAGE:" : "DRIVER_ORDER_MESSAGE") + ":" + uid, jsonObject.toJSONString(), 30); |
| | | |
| | | //调用推送 |
| | | HttpHeaders headers = new HttpHeaders(); |
| | |
| | | map.put("money", money); |
| | | map.put("audioUrl", audioUrl); |
| | | jsonObject.put("data", map); |
| | | redisUtil.setStrValue( (type == 1 ? "USER_ORDER_MESSAGE:" : "DRIVER_ORDER_MESSAGE") + ":" + uid, jsonObject.toJSONString(), 30); |
| | | |
| | | //调用推送 |
| | | HttpHeaders headers = new HttpHeaders(); |
| | |
| | | map.put("status", status); |
| | | map.put("audioUrl", audioUrl); |
| | | jsonObject.put("data", map); |
| | | redisUtil.setStrValue( (type == 1 ? "USER_ORDER_MESSAGE:" : "DRIVER_ORDER_MESSAGE") + ":" + uid, jsonObject.toJSONString(), 30); |
| | | |
| | | //调用推送 |
| | | HttpHeaders headers = new HttpHeaders(); |