system - 构建一个 Rest API 应用程序来管理我们需要提醒团队和某些开发人员的警报系统机制
问题描述
- 构建一个 Rest API 应用程序来管理我们需要提醒团队和某些开发人员的警报系统机制。以下是要拥有的端点:
POST /team - 创建具有 (team_id, team_name) 的团队和链接到具有 (developer_id,name,phone_number,team_id) 的团队的开发人员列表。创建后,应使用自动生成的 team_id 回复消费者。确保我们不能在没有任何开发人员的情况下创建团队。至少一名开发人员应该是强制性的。请求端点的有效负载:
{“开发者”:[{“名称”:“字符串”,“电话号码”:“字符串”}],“茶名称”:“字符串”}
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);}
上面的代码是我的代码,请查看并帮助.....在我无法向该开发人员发送消息后,我确实找到了随机开发人员.. 我该如何继续?
解决方案
推荐阅读
- javascript - Array.map 索引未定义?
- gitlab - (Gitlab) Wiki 的维护(断开的链接、页面重命名等)
- android - 在 android 应用程序中使用不同分辨率的图像
- arrays - 在 reactjs 上使用 map 渲染数组内容的问题
- javascript - 我怎么做才能让我的机器人在没有给出角色时不发送“角色给定”?
- php - Yii2 Php-调用数组上的成员函数getAttributeLabel()
- python - 尝试遍历列表并收到错误:TypeError:“int”类型的参数不可迭代
- django-rest-framework - Django REST IsAuthenticated Permission Class with django-rest-knox not working
- java - maven-publish插件中versionMapping的作用是什么
- typescript - TypeScript 中的类和泛型