WEB

Controller method API Description Request Response
Kafka GET /location /getLocation 드라이버의 현재 위치를 받아옴 (Param)
{
”driver”:”221343”

} | { ”_id”:”id”, ”driver”:”221343”, ”longitude”:”38.12312”, “latitude”:”23.123123”, “timestamp”:”2022.11…” } | | | GET | | /getLog | 드라이버의 하루 내의 위치 로그를 전부 받아옴 | Param { “driver”:”221343”, “date”:”2022-11-17” } | { “_id”:”6368e19642793d3615fff444”, ”driver”:"1", "longitude”:”126.82328833267093”, ”latitude”:”35.1902425987646”, ”timestamp”:"2022.11.07.19:00", ”_class”:"com.GeekHub.KafkaServer.model.Message" } | | | GET | | /getLog50 | 드라이버의 하루 내의 위치 로그를 50개만 받아옴 | Param { “driver”:”221343”, “date”:”2022-11-17” } | { “_id”:”6368e19642793d3615fff444”, ”driver”:"1", "longitude”:”126.82328833267093”, ”latitude”:”35.1902425987646”, ”timestamp”:"2022.11.07.19:00", ”_class”:"com.GeekHub.KafkaServer.model.Message" } | | Admin | POST | /admin | /createdriver | 관리자가 드라이버 아이디 생성 | RequestBody { "userName": "드라이버 이름", "userId" : "driver05", "password" : "pass01", "phone" : "010-1234-5678", "local" : "광주" } | 생성완료 : created(201) 잘못된 요청 : bad request(400) 회원 비인증 : unauthorized(401) | | | POST | /admin | /updateuser | 관리자가 드라이버 아이디 수정 | RequestBody { "userName": "드라이버 이름", "userId" : "driver05", "password" : "pass01", "phone" : "010-1234-5678", "local" : "광주" } | 수정완료 : ok(200) 잘못된 요청 : badRequest(400) | | | GET | /admin | /validUserId | 아이디 생성 시 중복확인 | RequestParam ”driver11” | 중복일 시 ( false , CONFLICT) 중복이 아닐 시 ( true, OK ) | | S3 | POST | /s3 | /upload | 사진 업로드 | RequestBody MultipartFile multipartfile | (url , OK) | | Auth | POST | /auth | /login | 로그인 | RequestBody { ”userId”:”ssafy”, ”password”:”1234” } | 로그인 | | task | GET | /spot | | 모든 업무 검색 | | | | | GET | /spot | /{spotIdx} | 업무 상세 검색 | | | | | POST | /spot | | 업무 생성 | { "spotCategory":"STORE", "spotName":"스타벅스", "lat":"36.1234", "lon":"127.1234", "expectedTime":"2022-11-16 13:21:00", "arrivedTime":"2022-11-16 13:20:00", "imageUrl":"https://geekhub.s3.ap-northeast-2.amazonaws.com/2022-11-09/1/afd77a45-c216-434d-8e10-dfc8ce9ee9a9.png", "status":"1", "count":"5", "userIdx":"2" } | | | | POST | /spot | /log | 이전 업무 조회 | { "localCity":"광주", "localSchool":"전남대학교", "date":"2022-11-09” } | | | | POST | /spot | /current | 당일 업무 조회 | { "localCity":"광주", "localSchool":"전남대학교", "date":"2022-11-09” } | | | | GET | /spot | /success | 전날 배달 성공률 조회 | | | | | GET | /spot | /work/{driverIdx| | 해당드라이버의 배정된 업무 조회 | | | | | PUT | /spot | /update | 업무완료 처리 | | | | | GET | /spot | /nextInfo/{driverIdx} | 다음 도착지 조회 | { "s3PictureUrl":"$2a$10$KO85d9OZTHqc/ocNnT.Y/.f2Bm25ot/2O4QkAkB9ejx6TmSa/.vWa", "userId":"2", "spotId":"1", "deliveryTime":"2022-11-16 13:20:00” } | | | | GET | /workingDriver | /workingDriver | 근무중인 모든 드라이버 위치 조회 | | |

MOBILE

Controller method API Description Request Response
location POST /sendLog (BODY)
{
"driver": “221343”,
"longitude":"38.123123",
"latitude":"23,123123",
"timestamp":"2023.11.19.12:00"

} | 성공 (HttpStatus.OK) |