From 72868f61d0d1b0808d1dd88c8ed19b6c496408dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=B8=85?= <3115919733@qq.com> Date: Fri, 20 Jun 2025 10:56:00 +0800 Subject: [PATCH] =?UTF-8?q?=E9=92=89=E9=92=89=E9=80=9A=E7=9F=A5=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DeliveryDemandController.java | 2 +- .../modules/tms/utils/DingTalkUtils.java | 89 ++++++++++++++----- 2 files changed, 68 insertions(+), 23 deletions(-) diff --git a/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/outbound/deliverydemand/controller/DeliveryDemandController.java b/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/outbound/deliverydemand/controller/DeliveryDemandController.java index 424fa54..9b15c99 100644 --- a/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/outbound/deliverydemand/controller/DeliveryDemandController.java +++ b/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/outbound/deliverydemand/controller/DeliveryDemandController.java @@ -258,7 +258,7 @@ public class DeliveryDemandController extends JeecgController mobiles) throws IOException { + List userIds = new ArrayList<>(); + for (String mobile : mobiles) { + String userByMobile = getUserByMobile(mobile); + if (StringUtils.isNotEmpty(userByMobile)) { + userIds.add(userByMobile); + } + } + return String.join(",", userIds); + } + + public static void main(String[] args) { try { - String accessToken = DingTalkUtils.getAccessToken(); String agentId = "3206304704"; // 如果API调用不需要,则忽略此参数 // String chatId = "095452471826097763,02000826241189265"; // 账号 String chatId = "620665223329579"; // 账号 - String message = "Hello, this is a test message from Java!"; //发送内容 - sendTextMessage(accessToken, agentId, chatId, chatId,message); - } catch (IOException e) { + String message = "你好啊"; //发送内容 + sendTextMessage(chatId, "",message); + /*List phoneList = Arrays.asList("18726282704","18726282704"); + String a = getUserByMobiles(phoneList); + System.out.println(a);*/ + } catch (Exception e) { e.printStackTrace(); } }