-
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.
Merge pull request #157 from UMC-WOWMARKET/feat/newproject
[feat] 주문폼 - 추가질문 Read & 추가질문 답변 Create
- Loading branch information
Showing
8 changed files
with
75 additions
and
6 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
9 changes: 9 additions & 0 deletions
9
src/main/java/wowmarket/wow_server/detail/project/dto/OrderAnswerDto.java
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,9 @@ | ||
package wowmarket.wow_server.detail.project.dto; | ||
|
||
import lombok.Getter; | ||
|
||
@Getter | ||
public class OrderAnswerDto { | ||
private Long questionId; //추가질문 id | ||
private String answer; //답변 내용 | ||
} |
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
19 changes: 19 additions & 0 deletions
19
src/main/java/wowmarket/wow_server/detail/project/dto/OrderQuestionResponseDto.java
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,19 @@ | ||
package wowmarket.wow_server.detail.project.dto; | ||
|
||
import lombok.Getter; | ||
import wowmarket.wow_server.domain.OrderQuestion; | ||
|
||
//주문폼 추가질문 정보 불러오는 Dto | ||
|
||
@Getter | ||
public class OrderQuestionResponseDto { | ||
private Long id; | ||
private String question; //질문 내용 | ||
private boolean essential; //필수 여부 | ||
|
||
public OrderQuestionResponseDto(OrderQuestion orderQuestion) { | ||
this.id = orderQuestion.getId(); | ||
this.question = orderQuestion.getQuestion(); | ||
this.essential = orderQuestion.isEssential(); | ||
} | ||
} |
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
9 changes: 9 additions & 0 deletions
9
src/main/java/wowmarket/wow_server/repository/OrderQuestionRepository.java
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,7 +1,16 @@ | ||
package wowmarket.wow_server.repository; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Query; | ||
import wowmarket.wow_server.domain.Item; | ||
import wowmarket.wow_server.domain.OrderQuestion; | ||
import wowmarket.wow_server.domain.Question; | ||
|
||
import java.util.List; | ||
|
||
public interface OrderQuestionRepository extends JpaRepository<OrderQuestion, Long> { | ||
List<OrderQuestion> findByProject_Id(Long project_id); | ||
|
||
@Query(nativeQuery = true, value = "select * from order_question where order_question_id =?") | ||
OrderQuestion findByQuestion_Id(Long questionId); | ||
} |