Commit afbd254f by Hayreal

sop触达中心-执行sop企微任务

1 parent 1fde448f
...@@ -258,7 +258,9 @@ public class RopRequestConveter { ...@@ -258,7 +258,9 @@ public class RopRequestConveter {
} }
} }
}else if (field.getName().equals("text")){ }else if (field.getName().equals("text")){
paramsMap.add(field.getName() + ".content",sendWorkDTO.getText().getContent()); WorkWechatExternalContactMsgTextDTO text = sendWorkDTO.getText();
if (text == null) continue;
paramsMap.add(field.getName() + ".content", text.getContent());
} else if (field.getName().equals("externalUserIdList")) { } else if (field.getName().equals("externalUserIdList")) {
List<String> externalUserIdList = sendWorkDTO.getExternalUserIdList(); List<String> externalUserIdList = sendWorkDTO.getExternalUserIdList();
if (CollectionUtils.isEmpty(externalUserIdList)) continue; if (CollectionUtils.isEmpty(externalUserIdList)) continue;
...@@ -271,7 +273,7 @@ public class RopRequestConveter { ...@@ -271,7 +273,7 @@ public class RopRequestConveter {
if (field.getType() == Date.class) { if (field.getType() == Date.class) {
paramsMap.add(field.getName(), new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(o)); paramsMap.add(field.getName(), new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(o));
} else { } else {
paramsMap.add(field.getName(), JSON.toJSONString(o)); paramsMap.add(field.getName(), o.toString());
} }
} }
} }
......
...@@ -77,6 +77,7 @@ public class ExecuteTaskService { ...@@ -77,6 +77,7 @@ public class ExecuteTaskService {
} }
resultList.add(result); resultList.add(result);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace();
log.error("群发失败:{}", e.getMessage()); log.error("群发失败:{}", e.getMessage());
} }
} }
......
...@@ -66,7 +66,6 @@ public class ExecuteTaskServiceTest extends BaseTest { ...@@ -66,7 +66,6 @@ public class ExecuteTaskServiceTest extends BaseTest {
System.out.println(executeTaskService.execute(request)); System.out.println(executeTaskService.execute(request));
} }
@Test @Test
public void sendNoticeTest(){ public void sendNoticeTest(){
SopTaskToStaffExecuteRequest request = new SopTaskToStaffExecuteRequest(); SopTaskToStaffExecuteRequest request = new SopTaskToStaffExecuteRequest();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!