This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7535812
commit 3171147
Showing
82 changed files
with
110 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
build/kotlin/kaptGenerateStubsKotlin/cacheable/caches-jvm/inputs/source-to-output.tab
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...kotlin/kaptGenerateStubsKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...kotlin/kaptGenerateStubsKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
build/kotlin/kaptGenerateStubsKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
build/kotlin/kaptGenerateStubsKotlin/cacheable/last-build.bin
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
build/kotlin/kaptGenerateStubsKotlin/local-state/build-history.bin
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
-14 Bytes
(96%)
build/tmp/kapt3/stubs/main/com/byebye/chapterTwo/ChapterTwoApplication.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-14 Bytes
(97%)
build/tmp/kapt3/stubs/main/com/byebye/chapterTwo/ChapterTwoApplicationKt.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-98 Bytes
(98%)
build/tmp/kapt3/stubs/main/com/byebye/chapterTwo/domain/gooin/dto/Gooin.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-42 Bytes
(98%)
...kapt3/stubs/main/com/byebye/chapterTwo/domain/gooin/dto/req/AddGooinRequest.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-91 Bytes
(97%)
.../tmp/kapt3/stubs/main/com/byebye/chapterTwo/domain/gooin/entity/GooinEntity.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-7 Bytes
(97%)
...t3/stubs/main/com/byebye/chapterTwo/domain/gooin/repository/GooinRepository.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-35 Bytes
(98%)
...mp/kapt3/stubs/main/com/byebye/chapterTwo/domain/gooin/service/GooinService.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-28 Bytes
(98%)
.../byebye/chapterTwo/domain/member/adapter/in/controller/EditMemberController.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-28 Bytes
(98%)
...byebye/chapterTwo/domain/member/adapter/in/controller/LoginMemberController.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-28 Bytes
(98%)
...yebye/chapterTwo/domain/member/adapter/in/controller/RefreshTokenController.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-28 Bytes
(98%)
...bye/chapterTwo/domain/member/adapter/in/controller/RegisterMemberController.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-28 Bytes
(98%)
...yebye/chapterTwo/domain/member/adapter/in/controller/RemoveMemberController.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-28 Bytes
(98%)
...bye/chapterTwo/domain/member/adapter/in/controller/RetrieveMemberController.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-28 Bytes
(97%)
...in/com/byebye/chapterTwo/domain/member/adapter/in/dto/req/EditMemberRequest.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-42 Bytes
(98%)
...n/com/byebye/chapterTwo/domain/member/adapter/in/dto/req/LoginMemberRequest.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-56 Bytes
(98%)
...om/byebye/chapterTwo/domain/member/adapter/in/dto/req/RegisterMemberRequest.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-65 Bytes
(98%)
...m/byebye/chapterTwo/domain/member/adapter/in/dto/res/RetrieveMemberResponse.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-79 Bytes
(98%)
...t3/stubs/main/com/byebye/chapterTwo/domain/member/adapter/out/MemberAdapter.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-122 Bytes
(98%)
...bs/main/com/byebye/chapterTwo/domain/member/adapter/out/entity/MemberEntity.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-28 Bytes
(98%)
...bs/main/com/byebye/chapterTwo/domain/member/adapter/out/mapper/MemberMapper.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-23 Bytes
(98%)
...com/byebye/chapterTwo/domain/member/adapter/out/repository/MemberRepository.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-21 Bytes
(98%)
...ebye/chapterTwo/domain/member/adapter/out/repository/MemberRepositoryCustom.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-35 Bytes
(98%)
.../chapterTwo/domain/member/adapter/out/repository/MemberRepositoryCustomImpl.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-70 Bytes
(98%)
...n/com/byebye/chapterTwo/domain/member/application/exception/MemberErrorCode.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-112 Bytes
(98%)
...pt3/stubs/main/com/byebye/chapterTwo/domain/member/application/model/Member.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-31 Bytes
(98%)
...stubs/main/com/byebye/chapterTwo/domain/member/application/model/MemberRole.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-14 Bytes
(98%)
...n/com/byebye/chapterTwo/domain/member/application/port/in/EditMemberUseCase.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-14 Bytes
(98%)
.../com/byebye/chapterTwo/domain/member/application/port/in/LoginMemberUseCase.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-14 Bytes
(98%)
...com/byebye/chapterTwo/domain/member/application/port/in/RefreshTokenUseCase.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-14 Bytes
(98%)
...m/byebye/chapterTwo/domain/member/application/port/in/RegisterMemberUseCase.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-14 Bytes
(98%)
...com/byebye/chapterTwo/domain/member/application/port/in/RemoveMemberUseCase.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-14 Bytes
(98%)
...m/byebye/chapterTwo/domain/member/application/port/in/RetrieveMemberUseCase.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-14 Bytes
(98%)
...n/com/byebye/chapterTwo/domain/member/application/port/out/DeleteMemberPort.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-14 Bytes
(98%)
...in/com/byebye/chapterTwo/domain/member/application/port/out/ExistMemberPort.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-21 Bytes
(98%)
...ain/com/byebye/chapterTwo/domain/member/application/port/out/LoadMemberPort.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-14 Bytes
(98%)
...ain/com/byebye/chapterTwo/domain/member/application/port/out/SaveMemberPort.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-28 Bytes
(98%)
...n/com/byebye/chapterTwo/domain/member/application/service/EditMemberService.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-42 Bytes
(98%)
.../com/byebye/chapterTwo/domain/member/application/service/LoginMemberService.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-35 Bytes
(98%)
...com/byebye/chapterTwo/domain/member/application/service/RefreshTokenService.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-49 Bytes
(98%)
...m/byebye/chapterTwo/domain/member/application/service/RegisterMemberService.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-35 Bytes
(98%)
...com/byebye/chapterTwo/domain/member/application/service/RemoveMemberService.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-35 Bytes
(98%)
...m/byebye/chapterTwo/domain/member/application/service/RetrieveMemberService.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-21 Bytes
(97%)
...apt3/stubs/main/com/byebye/chapterTwo/global/auth/exception/CustomErrorCode.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-28 Bytes
(98%)
...apt3/stubs/main/com/byebye/chapterTwo/global/auth/exception/CustomException.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-21 Bytes
(98%)
...ubs/main/com/byebye/chapterTwo/global/auth/exception/CustomExceptionHandler.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-45 Bytes
(98%)
...t3/stubs/main/com/byebye/chapterTwo/global/auth/jwt/JwtAuthenticationFilter.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-42 Bytes
(98%)
build/tmp/kapt3/stubs/main/com/byebye/chapterTwo/global/auth/jwt/JwtInfo.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-56 Bytes
(97%)
build/tmp/kapt3/stubs/main/com/byebye/chapterTwo/global/auth/jwt/JwtProperties.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-94 Bytes
(97%)
...d/tmp/kapt3/stubs/main/com/byebye/chapterTwo/global/auth/jwt/JwtUserDetails.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-94 Bytes
(98%)
build/tmp/kapt3/stubs/main/com/byebye/chapterTwo/global/auth/jwt/JwtUtils.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-98 Bytes
(97%)
...pt3/stubs/main/com/byebye/chapterTwo/global/auth/jwt/exception/JwtErrorCode.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-63 Bytes
(97%)
...tubs/main/com/byebye/chapterTwo/global/auth/jwt/exception/type/JwtErrorType.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-86 Bytes
(97%)
build/tmp/kapt3/stubs/main/com/byebye/chapterTwo/global/common/BaseResponse.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-42 Bytes
(97%)
build/tmp/kapt3/stubs/main/com/byebye/chapterTwo/global/config/QuerydslConfig.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-42 Bytes
(98%)
build/tmp/kapt3/stubs/main/com/byebye/chapterTwo/global/config/SecurityConfig.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-35 Bytes
(98%)
build/tmp/kapt3/stubs/main/com/byebye/chapterTwo/global/config/SpringConfig.kapt_metadata
Binary file not shown.
Binary file modified
BIN
-28 Bytes
(97%)
build/tmp/kapt3/stubs/main/com/byebye/chapterTwo/global/config/SwaggerConfig.kapt_metadata
Binary file not shown.
14 changes: 14 additions & 0 deletions
14
src/main/kotlin/com/byebye/chapterTwo/domain/exception/GooinErrorCode.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.byebye.chapterTwo.domain.exception | ||
|
||
import com.byebye.chapterTwo.global.auth.exception.CustomErrorCode | ||
import org.springframework.http.HttpStatus | ||
|
||
enum class GooinErrorCode ( | ||
override val status: HttpStatus, | ||
override val message: String, | ||
) : CustomErrorCode { | ||
|
||
GOOIN_NOT_FOUND(HttpStatus.NOT_FOUND, "해당 구인 신청을 찾을 수 없습니다"), | ||
GOOIN_ALREADY_EXIST(HttpStatus.CONFLICT, "해당 구인 신청이 이미 존재합니다") | ||
|
||
} |
34 changes: 34 additions & 0 deletions
34
src/main/kotlin/com/byebye/chapterTwo/domain/gooin/controller/GooinController.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.byebye.chapterTwo.domain.gooin.controller | ||
|
||
import com.byebye.chapterTwo.domain.gooin.dto.req.AddGooinRequest | ||
import com.byebye.chapterTwo.domain.gooin.entity.GooinEntity | ||
import com.byebye.chapterTwo.domain.gooin.service.GooinService | ||
import com.byebye.chapterTwo.global.common.BaseResponse | ||
import org.springframework.web.bind.annotation.GetMapping | ||
import org.springframework.web.bind.annotation.PatchMapping | ||
import org.springframework.web.bind.annotation.PostMapping | ||
import org.springframework.web.bind.annotation.RequestBody | ||
import org.springframework.web.bind.annotation.RequestMapping | ||
import org.springframework.web.bind.annotation.RestController | ||
|
||
@RestController | ||
@RequestMapping("/gooin") | ||
class GooinController( | ||
private val gooinService: GooinService | ||
) { | ||
@PostMapping | ||
fun addGooin(@RequestBody request: AddGooinRequest): BaseResponse<String> { | ||
return gooinService.saveGooin(request) | ||
} | ||
|
||
@GetMapping | ||
fun getGooin():BaseResponse<List<GooinEntity>>{ | ||
return gooinService.getGooin() | ||
} | ||
|
||
@PatchMapping("/{id}") | ||
fun editGooin(id:Long, dto:AddGooinRequest): BaseResponse<String> { | ||
return gooinService.editGooin(id,dto) | ||
} | ||
|
||
} |
26 changes: 26 additions & 0 deletions
26
src/main/kotlin/com/byebye/chapterTwo/domain/gooin/mapper/GooinMapper.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.byebye.chapterTwo.domain.gooin.mapper | ||
|
||
import com.byebye.chapterTwo.domain.gooin.dto.Gooin | ||
import com.byebye.chapterTwo.domain.gooin.entity.GooinEntity | ||
import org.springframework.stereotype.Component | ||
|
||
@Component | ||
class GooinMapper { | ||
fun toDomain(entity: GooinEntity): Gooin { | ||
return Gooin ( | ||
id = entity.id!!, | ||
title = entity.title, | ||
description = entity.description, | ||
userId = entity.userId | ||
) | ||
} | ||
|
||
fun toEntity(domain: Gooin): GooinEntity { | ||
return GooinEntity ( | ||
id = domain.id?: 0, | ||
title = domain.title, | ||
description = domain.description, | ||
userId = domain.userId | ||
) | ||
} | ||
} |
42 changes: 36 additions & 6 deletions
42
src/main/kotlin/com/byebye/chapterTwo/domain/gooin/service/GooinService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,55 @@ | ||
package com.byebye.chapterTwo.domain.gooin.service | ||
|
||
import com.byebye.chapterTwo.domain.exception.GooinErrorCode | ||
import com.byebye.chapterTwo.domain.gooin.dto.Gooin | ||
import com.byebye.chapterTwo.domain.gooin.dto.req.AddGooinRequest | ||
import com.byebye.chapterTwo.domain.gooin.entity.GooinEntity | ||
import com.byebye.chapterTwo.domain.gooin.mapper.GooinMapper | ||
import com.byebye.chapterTwo.domain.gooin.repository.GooinRepository | ||
import com.byebye.chapterTwo.global.auth.exception.CustomErrorCode | ||
import com.byebye.chapterTwo.global.auth.exception.CustomException | ||
import com.byebye.chapterTwo.global.auth.jwt.JwtUtils | ||
import com.byebye.chapterTwo.global.common.BaseResponse | ||
import org.springframework.stereotype.Service | ||
|
||
@Service | ||
class GooinService( | ||
private val gooinRepository: GooinRepository, | ||
private val jwtUtils: JwtUtils | ||
private val jwtUtils: JwtUtils, | ||
private val gooinMapper: GooinMapper | ||
) { | ||
|
||
fun saveGooin(dto: AddGooinRequest){ | ||
fun saveGooin(dto: AddGooinRequest) : BaseResponse<String>{ | ||
gooinRepository.save( | ||
GooinEntity( | ||
title = dto.title, | ||
description = dto.description, | ||
userId = jwtUtils.getMember().id!! | ||
gooinMapper.toEntity(Gooin( | ||
dto, | ||
jwtUtils.getMember().id!! | ||
) | ||
) | ||
) | ||
return BaseResponse( | ||
status = 201, | ||
message = "구인 신청 성공!!" | ||
) | ||
} | ||
|
||
fun getGooin() : BaseResponse<List<GooinEntity>> { | ||
return BaseResponse( | ||
message = "조회 성공", | ||
data = gooinRepository.findAll() | ||
) | ||
} | ||
|
||
fun editGooin(id:Long,dto: AddGooinRequest) : BaseResponse<String>{ | ||
val gooin = gooinRepository.findById(id).orElseThrow { CustomException(GooinErrorCode.GOOIN_NOT_FOUND) } | ||
.let { | ||
gooinMapper.toDomain(it) | ||
} | ||
gooin.editGooin(dto) | ||
gooinRepository.save(gooinMapper.toEntity(gooin)) | ||
return BaseResponse( | ||
message = "수정 성공" | ||
) | ||
} | ||
|
||
} |