-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
56 changed files
with
708 additions
and
361 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
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
14 changes: 10 additions & 4 deletions
14
...-Api/src/main/kotlin/com/depromeet/whatnow/api/image/usecase/ImageUploadSuccessUseCase.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,21 +1,27 @@ | ||
package com.depromeet.whatnow.api.image.usecase | ||
|
||
import com.depromeet.whatnow.annotation.UseCase | ||
import com.depromeet.whatnow.common.vo.CoordinateVo | ||
import com.depromeet.whatnow.config.security.SecurityUtils | ||
import com.depromeet.whatnow.domains.image.domain.ImageCommentType | ||
import com.depromeet.whatnow.domains.image.domain.PromiseImageCommentType | ||
import com.depromeet.whatnow.domains.image.service.ImageDomainService | ||
|
||
@UseCase | ||
class ImageUploadSuccessUseCase( | ||
val imageDomainService: ImageDomainService, | ||
) { | ||
fun promiseUploadImageSuccess(promiseId: Long, imageKey: String, imageCommentType: ImageCommentType) { | ||
fun promiseUploadImageSuccess( | ||
promiseId: Long, | ||
imageKey: String, | ||
promiseImageCommentType: PromiseImageCommentType, | ||
userLocation: CoordinateVo, | ||
) { | ||
val currentUserId: Long = SecurityUtils.currentUserId | ||
imageDomainService.promiseUploadImageSuccess(currentUserId, promiseId, imageKey, imageCommentType) | ||
imageDomainService.promiseImageUploadSuccess(currentUserId, promiseId, imageKey, promiseImageCommentType, userLocation) | ||
} | ||
|
||
fun userUploadImageSuccess(imageKey: String) { | ||
val currentUserId: Long = SecurityUtils.currentUserId | ||
imageDomainService.userUploadImageSuccess(currentUserId, imageKey) | ||
imageDomainService.userImageUploadSuccess(currentUserId, imageKey) | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/api/interaction/dto/InteractionResponse.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,5 +1,8 @@ | ||
package com.depromeet.whatnow.api.interaction.dto | ||
|
||
import com.depromeet.whatnow.api.promiseprogress.dto.response.UserProgressResponse | ||
|
||
data class InteractionResponse( | ||
val userProgressResponse: UserProgressResponse, | ||
val interactionDtoList: List<InteractionDto>, | ||
) |
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
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
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
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
17 changes: 17 additions & 0 deletions
17
Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/api/promise/usecase/GetDistrictUseCase.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,17 @@ | ||
package com.depromeet.whatnow.api.promise.usecase | ||
|
||
import com.depromeet.whatnow.annotation.UseCase | ||
import com.depromeet.whatnow.domains.district.repository.DistrictRepository | ||
import com.mongodb.client.model.geojson.Point | ||
import com.mongodb.client.model.geojson.Position | ||
|
||
@UseCase | ||
class GetDistrictUseCase( | ||
val districtRepository: DistrictRepository, | ||
) { | ||
fun execute(coordinateX: Double, coordinateY: Double): String { | ||
val intersects = | ||
districtRepository.findByLocationIntersects(Point(Position(coordinateX, coordinateY))) | ||
return intersects.properties.adm_nm | ||
} | ||
} |
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
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
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
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
Oops, something went wrong.