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(); } }