- Java 11
- Spring boot 2.6.7
- MySQL 8
- SpringFox Swagger UI 3.0.0
- AWS ec2
- AWS RDS
re-prife / back-end Goto Github PK
View Code? Open in Web Editor NEW2022 New Media IT Show 출품작, Freemily BE
2022 New Media IT Show 출품작, Freemily BE
[DELETE] groups/{groupId}/chores/{choreId}
200 - ok
404 - not found
[POST]/users/{userId}/check
{
"userPassword" : "User Password"
}
200 - Ok
- 수정이 정상적으로 처리된 경우
403 - Forbidden
- 회원 아이디와 PW가 일치하지 않는 경우
404 - Not Found
- 존재하지 않는 아이디인 경우
[POST] /groups/join
{
"groupInviteCode" : "",
"userId" : 1
}
200 - Ok
- 그룹 가입이 정상적으로 처리된 경우
404 - Not Found
- 존재하지 않는 그룹 초대코드일 경우
- 존재하지 않는 회원아이디일 경우
400 - Bad Request
- DTO 객체 유효성 검사
[POST] groups/{groupId}/quests/{questId}/complete
{
"requestId" : 0
}
groupId
가 존재하지 않을 시questId
가 존재하지 않거나 group
에 속하지 않는 경우requestId
가 존재하지 않거나 group
에 속하지 않는 경우quest
의 requestId
가 request body의 requestId
와 일치하지 않는 경우quest
의 acceptUserId
가 -1
인 경우completeCheck
가 true
인 경우[PUT]/users/{userId}
{
"userName" : "User Name",
"userPassword" : "User Password"
"userImageName" : "User Image"
}
200 - Ok
- 수정이 정상적으로 처리된 경우
404 - Not Found
- 존재하지 않는 ID일 경우
409 - Conflict
- 값이 모두 안 들어온 경우
[Delete] groups/{groupId}/quests/{questId}/{request_user_id}
심부름 삭제 요청
200 - Ok
심부름 삭제가 정상적으로 처리된 경우
404 - Not Found
값이 존재하지 않는 경우
[DELETE] /group/{groupId}/iningredients
{
"data" : [
{
"ingredientId" : 0
},
{
"ingredientId" : 0
},
{
"ingredientId" : 0
}
]
}
200 - ok
404 - not found
FAIL
은 당번 날짜의 하루가 지나도 인증 요청을 하지 않았거나, 요청에 대한 응답을 받지 못했을 경우, 해당 집안일을 하지 않았다 생각하고, FAIL
할당SUCCESS
로만 응답 가능(만약, 당번 활동 인증을 원하지 않을 시, 아무 값도 들어오지 않도록)Conflict
)성공
된 집안일실패
한 집안일SUCCESS
또는 FAIL
뿐이어야 한다.[Delete]/users/{userId}
{
"userPassword" : "User Password"
}
200 - Ok
- 회원 탈퇴가 정상적으로 처리된 경우
400 - Bad Request
- 비밀번호가 맞지 않는 경우
404 - Not Found
- 존재하지 않는 ID인 경우
[Post]/users/login
{
"userEmail" : "User Email",
"userPassword" : "User Password"
}
{
"userId" : "User Id",
"userName" : "User Name",
"userNickname" : "User Nickname",
"userEmail" : "User Email"
}
200 - Ok
- 로그인이 정상적으로 처리된 경우
400 - Bad Request
- Email의 Password가 아닌 경우
- 값이 모두 안 들어온 경우
404 - Not Found
- 존재하지 않는 Email일 경우
[POST] /groups
{
"userId" : 1,
"groupName" : "group name"
}
200 - Ok
- 그룹 생성이 정상적으로 처리된 경우
[DELETE] /group/{groupId}/iningredients
{
"data" : [
{
"ingredientId" : 1,
"ingredientCount" : "1g"
},
{
"ingredientId" : 2,
"ingredientCount" : "100개"
},
{
"ingredientId" : 3,
"ingredientCount" : "3봉지"
}
]
}
200 - ok
404 - not found
[GET] /groups/{groupId}/kings/chores?date=
{
"data" : [
{
"category" : "설거지",
"userId" : 1,
"choresCount" : 3
},
{
"category" : "요리",
"userId" : 1,
"choresCount" : 3
}
]
}
[GET] groups/{groupId}/ingredients?saveType=
[
{
"ingredientName":"salad",
"ingredientSaveType" : "냉동",
"intredientCategory" : "육류",
"ingredientExpirationDate" : "2023-02-02",
"ingredientCount" : "1개"
},
{
"ingredientName":"salad",
"ingredientSaveType" : "냉동",
"intredientCategory" : "육류",
"ingredientExpirationDate" : "2023-02-02",
"ingredientCount" : "1개"
},
]
[GET] groups/{groupId}/chores
{
"data" : [
{
"choreId" : 0,
"choreUserId" : 0,
"choreTitle" : "설거지",
"choreCategory" : "설거지",
"choreDate" : "yyyy-mm-dd"
}
]
}
[POST] groups/{groupId}/iningredients
{
"ingredientName" : "salad source",
"ingredientSaveType" : "ROOM_TEMP",
"ingredientPurchaseDate" : "2022-02-02",
"ingredientExpirationDate" : "2023-02-02",
"ingredientCategory" : "SEASONING",
"ingredientCount " : "1개",
"ingredientMemo" : "메모메모"
}
200 - Ok
식재료 추가가 정상적으로 처리된 경우
409 - Conflict
모든 정보가 제대로 들어오지 않았을 경우
404 - Not Found
해당하는 그룹이 존재하지 않는 경우
[Post] groups/{groupId}/quests/{quest_id}
{
"acceptUserId" : "Accept User ID"
}
{
"completeCheck" : "true/false"
}
200 - Ok
심부름 승인/거절이 정상적으로 처리된 경우
409 - Conflict
값이 모두 들어오지 못한 경우
404 - Not Found
acceptUserId 혹은 qeustId가 존재하지 않는 경우
Exception
acceptUserId가 이미 작성되어 있고, completeCheck가 true인 경우(이미 누군가 수락한 경우)
심부름의 상세 정보를 조회하는 기능
[GET] groups/{groupId}/quests/{questId}
{
"questId" : 1
"requestUserId" : "Request User ID"
"questTitle" : "Quest Title",
"questContent" : "Quest Content",
"questCreatedDate" : "Quest Created Date",
"completeCheck" : "Complete Check",
"acceptUserId" : "Accept User ID"
}
BEFORE
일때만 REQUEST
로 처리, 다른 값이 들어올 경우 예외 반환[Post]/users
{
"userName" : "User Name",
"userEmail" : "User Email",
"userPassword" : "User Password"
}
200 - Ok
- 회원가입이 정상적으로 처리된 경우
409 - Conflict
- 이미 존재하는 이메일일 경우
- 이미 존재하는 닉네임일 경우
- 값이 모두 안 들어온 경우
[GET] groups/{groupId}/quests
심부름 전체 조회 요청
[
{
"questTitle" : "Quest Title",
"questContent" : "Quest Content",
"questCreatedDate" : "Quest Create Date",
"questModifiedDate" : "Quest Modified Date",
"completeCheck" : "Complete Check",
"acceptUserId" : "Accept User ID",
"RequestUserId" : "Request User ID"
},
{
...
},
...
]
[
{
"requestUserId": 1,
"questTitle": "치킨 사주라",
"questContent": "제발",
"questCreateDate": "2022-05-19T09:48:18.060383",
"questModifiedDate": "2022-05-19T09:48:18.060383",
"completeCheck": false,
"acceptUserId": -1
},
{
"requestUserId": 1,
"questTitle": "치킨 사주라",
"questContent": "제발",
"questCreateDate": "2022-05-19T09:49:04.097976",
"questModifiedDate": "2022-05-19T09:49:04.097976",
"completeCheck": false,
"acceptUserId": -1
},
{
"requestUserId": 1,
"questTitle": "치킨 사주라",
"questContent": "제발",
"questCreateDate": "2022-05-19T09:49:04.668693",
"questModifiedDate": "2022-05-19T09:49:04.668693",
"completeCheck": false,
"acceptUserId": -1
}
]
[PUT] groups/{groupId}/iningredients/{iningredientId}
{
"ingredientName" : "salad source",
"ingredientSaveType" : "FREEZER",
"ingredientPurchaseDate" : "2022-02-02",
"ingredientExpirationDate" : "2023-02-02",
"ingredientCategory" : "MEAT",
"ingredientCount" : 1,
"ingredientMemo" : "aaaaa"
}
200 - Ok
- 식재료 수정이 정상적으로 처리된 경우
409 - Conflict
- 모든 정보가 제대로 들어오지 않았을 경우
404 - Not Found
chore_check
컬럼을 REQUEST
로 변경하기 위한 기능chore_check
는 집안일 인증 요청 / 구성원이 수락 / 구성원이 거절의 상태를 표시하는 컬럼이다.[POST] groups/{groupId}/chores/{choreId}/certify
@Query
를 사용하여 DB 내용 수정하기.yml
코드에 보이지 않도록 처리[POST] groups/{groupId}/chores/{choreId}/reaction
{
"reaction" : ""
}
200 - ok
chore_check
가 SUCCESS
또는 FAIL
로 변경되었을 때404 - not found
409 - conflict
@Query
를 이용하여 DB 내용 수정[POST] groups/{groupId}/chores
{
"choreTitle" : "설거지",
"choreCategory" : "설거지",
"choreDate" : "yyyy-mm-dd",
"choreUserId" : 0
}
@Valid
로 @RequestBody
검증하기[GET] /group/{groupId} /find-users
[
{
"userId": 2,
"userName": "min j",
"userNickname": "kiki",
"userImageName": ""
},
{
"userId": 3,
"userName": "min j",
"userNickname": "kiki",
"userImageName": ""
}
]
[GET] groups/{groupId}/chores/one-day
{
"date" : "yyyy-mm-dd"
}
{
"data" : [
{
"choreId" : 0,
"choreUserId" : 0,
"choreTitle" : "설거지",
"choreCategory" : "설거지",
"choreDate" : "yyyy-mm-dd"
}
]
}
[GET] /groups/{groupId}/kings/quests?date=
{
"userId" : 1,
"questCount" : 3
}
배포 기준 : 백그라운드 상에서도 서버가 정상적으로 구동되기 까지
[GET] /users/{userId}
{
"userName" : "user name",
"userEmail" : "user email",
"userImageName" : "image name",
{
"king" : [
{
"title" : "",
"count" : "",
"date" : ""
}
]
}
}
questModifiedDate
에 현재 변경 일시가 저장된다.[Update] groups/{groupId}/quests/{questId}/{requestUserId}
{
"questTitle" : "Quest Title",
"questContent" : "Quest Content"
}
200 - Ok
심부름 수정이 정상적으로 처리된 경우
409 - Conflict
값이 모두 들어오지 못한 경우
404 - Not Found
request_user_id나 quest_id가 존재하지 않는 경우
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.