- 提交审批申请节点审批方式没有依次审批?
应用里面可以配置,为啥接口里面没有。 [图片] [图片]
2020-10-26 - 上传临时素材中文文件名乱码?
这是代码 @Test public void testUploadMedia() { FileSystemResource resource = new FileSystemResource("/Users/lanyanhua/Desktop/中文名.jpg"); String mediaId = uploadMedia(resource); System.out.println("mediaId:" + mediaId); //3xyN1by2qk0dVfEwKJ2ZvC4LA38qGprE3xMRbr5U6h2g //3XmJgRO7QE9mH_WCaYNgE4ETur61Few3MKTL79lzCYiWTa_Re2Q2CLX5OsCeYmAg- } /** * 上传临时素材 * * @param resource 文件 * @return media_id,该media_id仅三天内有效 */ public String uploadMedia(FileSystemResource resource) { String url = "https://qyapi.weixin.qq.com/cgi-bin/media/upload?access_token=ACCESS_TOKEN&type=TYPE" .replace("ACCESS_TOKEN", token).replace("TYPE", "image"); RestTemplate restTemplate = new RestTemplate(); MultiValueMap<String, Object> param = new LinkedMultiValueMap<>(); param.add("file", resource); HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.MULTIPART_FORM_DATA); HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(param, headers); ResponseEntity<JSONObject> responseEntity = restTemplate.postForEntity(url, requestEntity, JSONObject.class); if (responseEntity.getStatusCode() == HttpStatus.OK) { JSONObject body = responseEntity.getBody(); if (body.getInteger("errcode") == 0) { return body.getString("media_id"); } } throw new BusinessException("上传临时素材失败"); } 获取时名字就是乱码的 [图片]
2020-10-26 - 提交审批申请日期控件赋值报错
文本的调用成功了但是日期的就不行 [图片] body { "apply_data": { "contents": [{ "control": "Date", "id": "Date-1603076472536", "value": { "date": { "type": "day", "s_timestamp": "1603104097180" } } }, { "control": "Text", "id": "Text-1586447955368", "value": { "text": "文本1\r文本1\n文本1" } }, { "control": "Text", "id": "Text-1586447964627", "value": { "text": "文本2" } }, { "control": "Text", "id": "Text-1586447975810", "value": { "text": "文本3" } }] }, "approver": [{ "attr": 2, "userid": ["ErTui@ZhangSanFeng"] }], "creator_userid": "cab", "notify_type": 2, "notifyer": ["DaWangGavin"], "summary_list": [{ "summary_info": [{ "text": "摘要信息1", "lang": "zh_CN" }] }, { "summary_info": [{ "text": "摘要信息2", "lang": "zh_CN" }] }, { "summary_info": [{ "text": "摘要信息3", "lang": "zh_CN" }] }], "template_id": "3TmBHTiwzq6UXaSD1NiZSnkjnZ41xpDkTmjLU9Qw", "use_template_approver": 0 }
2020-10-19