Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client로직 추가 #20

Merged
merged 11 commits into from
Sep 21, 2022
Merged

Client로직 추가 #20

merged 11 commits into from
Sep 21, 2022

Conversation

dolong2
Copy link
Member

@dolong2 dolong2 commented Sep 21, 2022

한일

  • 클라이언트 컨트롤러 추가
  • 클라이언트 서비스 추가
  • 클라Id를 어떤식으로 해야될지 몰라서 보류함(코멘트 좀.....)

@dolong2 dolong2 added 2️⃣Priority: Medium 우선순위 중 ✨ Feature 기능 개발 labels Sep 21, 2022
@dolong2 dolong2 self-assigned this Sep 21, 2022
Comment on lines 6 to 7
class ClientNotFindException: BasicException(ErrorCode.CLIENT_NOT_FOUND) {
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

얘 { } 안붙여도됨

}

@GetMapping
fun getAllClients(): ResponseEntity<List<ClientAllResDto>>{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
fun getAllClients(): ResponseEntity<List<ClientAllResDto>>{
fun getMyAllClients(): ResponseEntity<List<ClientAllResDto>>{

어떰

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

컨트롤러도 그렇게 해야될까

private val currentUserUtil: CurrentUserUtil,
){
fun execute(clientRegisterDto: ClientRegisterReqDto): ClientRegisterResDto {
val clientSecret = UUID.randomUUID().toString().replace("-", "") + UUID.randomUUID().toString().replace("-", "")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
val clientSecret = UUID.randomUUID().toString().replace("-", "") + UUID.randomUUID().toString().replace("-", "")
val clientSecret = (UUID.randomUUID().toString()+ UUID.randomUUID().toString()).replace("-", "")

이런식 어떰

class GetOneClientService(
private val clientRepository: ClientRepository,
private val currentUserUtil: CurrentUserUtil,
){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Transactional(readOnly = true) 어떰

@PatchMapping("/{id}")
fun updateClient(@PathVariable id:String, @RequestBody clientUpdateDto: ClientUpdateReqDto): ResponseEntity<Void>{
updateClientService.updateClient(id, clientUpdateDto)
return ResponseEntity.ok().build()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no content어땨

val serviceName: String,
val serviceUri: String,
) {
constructor(client:Client): this(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
constructor(client:Client): this(
constructor(client: Client): this(

으악 린트 불편해용

}

fun getCurrentUser(): User =
userRepository.findByEmail(getCurrentEmail())!!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

언래핑보다 throw 처리하자

@dolong2 dolong2 merged commit 8e3fb2d into main Sep 21, 2022
@dolong2 dolong2 deleted the feature/Client branch September 21, 2022 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2️⃣Priority: Medium 우선순위 중 ✨ Feature 기능 개발
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants