首页 > 解决方案 > 构建一个 Rest API 应用程序来管理我们需要提醒团队和某些开发人员的警报系统机制

问题描述

  1. POST /team - 创建具有 (team_id, team_name) 的团队和链接到具有 (developer_id,name,phone_number,team_id) 的团队的开发人员列表。创建后,应使用自动生成的 team_id 回复消费者。确保我们不能在没有任何开发人员的情况下创建团队。至少一名开发人员应该是强制性的。请求端点的有效负载:

    {“开发者”:[{“名称”:“字符串”,“电话号码”:“字符串”}],“茶名称”:“字符串”}

  2. POST /{team_id}/alert - 在请求中获取 team_id 并提醒团队中的任何团队开发人员,并且每个警报都必须是随机的。使用开发人员 phone_number 使用以下详细信息进行提醒。使用消息警报 URL:https ://run.mocky.io/v3/fd99c100-f88a-4d70-aaf7-393dbbd5d99f 请求负载:{“phone_number”:“phone number”} *

     @GetMapping("/{id}/alert")
    public ResponseEntity<Developer> alertDeveloper(@PathVariable Long id) {
    Developer developer = tService.findOneDeveloper(id);
    return new ResponseEntity<Developer>(developer, HttpStatus.OK);} 
    

上面的代码是我的代码,请查看并帮助.....在我无法向该开发人员发送消息后,我确实找到了随机开发人员.. 我该如何继续?

标签: systemalert

解决方案


推荐阅读