| | |
| | | } |
| | | String content = staffName + " 您有新的维修任务,维修信息如下:\n"; |
| | | |
| | | content += ("> 标题:<front color=\"comment\">" + paramIn.getString("repairName") + "</font>"); |
| | | content += ("> 电话:<front color=\"comment\">" + paramIn.getString("tel") + "</font>"); |
| | | content += ("> 时间:<front color=\"comment\">" + paramIn.getString("time") + "</font>"); |
| | | content += ("> 内容:<front color=\"comment\">" + paramIn.getString("context") + "</font>"); |
| | | content += ("> 位置:<front color=\"comment\">" + address + "</font>"); |
| | | content += ("> 单号:<front color=\"comment\">" + paramIn.getString("repairId") + "</font>"); |
| | | content += ("> 标题:<font color=\"comment\">" + paramIn.getString("repairName") + "</font> \n"); |
| | | content += ("> 电话:<font color=\"comment\">" + paramIn.getString("tel") + "</font> \n"); |
| | | content += ("> 时间:<font color=\"comment\">" + paramIn.getString("time") + "</font> \n"); |
| | | content += ("> 内容:<font color=\"comment\">" + paramIn.getString("context") + "</font> \n"); |
| | | content += ("> 位置:<font color=\"comment\">" + address + "</font> \n"); |
| | | content += ("> 单号:<font color=\"comment\">" + paramIn.getString("repairId") + "</font> \n"); |
| | | |
| | | rebootMarkdown.put("content", content); |
| | | logger.info("发送消息内容:{}", content); |
| | | ResponseEntity<String> responseEntity = outRestTemplate.postForEntity(url, rebootMarkdown.toJSONString(), String.class); |
| | | ResponseEntity<String> responseEntity = outRestTemplate.postForEntity(url, rebootParam.toJSONString(), String.class); |
| | | logger.info("企业微信返回内容:{}", responseEntity); |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | String imgUrl = MappingCache.getValue("IMG_PATH"); |
| | | imgUrl += (!StringUtil.isEmpty(imgUrl) && imgUrl.endsWith("/") ? "" : "/"); |
| | | FileRelDto fileRelDto = new FileRelDto(); |
| | | fileRelDto.setObjId(paramIn.getString("repairId")); |
| | | List<FileRelDto> fileRelDtos = fileRelInnerServiceSMOImpl.queryFileRels(fileRelDto); |
| | |
| | | templateMessage.setData(data); |
| | | //获取业主公众号地址 |
| | | String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | if(!StringUtil.isEmpty(wechatUrl) && wechatUrl.contains("?")){ |
| | | wechatUrl += ("&wAppId=" + weChatDto.getAppId()); |
| | | }else{ |
| | | wechatUrl += ("?wAppId=" + weChatDto.getAppId()); |
| | | } |
| | | |
| | | templateMessage.setUrl(wechatUrl); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | | ResponseEntity<String> responseEntity = outRestTemplate.postForEntity(url, JSON.toJSONString(templateMessage), String.class); |