-
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 #148 from UMC-WOWMARKET/feat/MyOrderManage-137
[feat, refactor] 등록폼, 수집폼, 주문폼 관리 수정
- Loading branch information
Showing
29 changed files
with
349 additions
and
230 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
12 changes: 0 additions & 12 deletions
12
...n/java/wowmarket/wow_server/mypage/myorder/demand/controller/MyDemandOrderController.java
This file was deleted.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
...n/java/wowmarket/wow_server/mypage/myorder/demand/controller/MyOrderDemandController.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,33 @@ | ||
package wowmarket.wow_server.mypage.myorder.demand.controller; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.data.domain.PageRequest; | ||
import org.springframework.data.domain.Pageable; | ||
import org.springframework.security.core.annotation.AuthenticationPrincipal; | ||
import org.springframework.web.bind.annotation.*; | ||
import wowmarket.wow_server.domain.User; | ||
import wowmarket.wow_server.mypage.myorder.demand.dto.MyOrderDemandDetailResponseDto; | ||
import wowmarket.wow_server.mypage.myorder.demand.dto.MyOrderDemandFormListResponseDto; | ||
import wowmarket.wow_server.mypage.myorder.demand.service.MyOrderDemandService; | ||
|
||
@RestController | ||
@RequestMapping("/myorder/demand") | ||
@RequiredArgsConstructor | ||
public class MyOrderDemandController { | ||
private final MyOrderDemandService myOrderDemandService; | ||
|
||
//나의 수요조사 주문폼 목록 불러오기 | ||
@GetMapping() | ||
public MyOrderDemandFormListResponseDto getMyOrderDemandList(@RequestParam(value = "page", defaultValue = "1", required = false)int page, @AuthenticationPrincipal User user){ | ||
Pageable pageable = PageRequest.of(page - 1, 10); | ||
return myOrderDemandService.findMyAllDemandOrderForm(pageable, user); | ||
} | ||
|
||
//나의 수요조사 주문폼 상세보기 | ||
@GetMapping("/detail/{demand_order_id}") | ||
public MyOrderDemandDetailResponseDto getMyOrderDemandDetail(@PathVariable Long demand_order_id){ | ||
return myOrderDemandService.findMyOrderDemandDetail(demand_order_id); | ||
} | ||
|
||
|
||
} |
21 changes: 0 additions & 21 deletions
21
...java/wowmarket/wow_server/mypage/myorder/demand/dto/MyDemandOrderFormListResponseDto.java
This file was deleted.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
...n/java/wowmarket/wow_server/mypage/myorder/demand/dto/MyOrderDemandDetailResponseDto.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,30 @@ | ||
package wowmarket.wow_server.mypage.myorder.demand.dto; | ||
|
||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import wowmarket.wow_server.domain.DemandOrder; | ||
|
||
import java.time.LocalDateTime; | ||
import java.util.List; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
public class MyOrderDemandDetailResponseDto { | ||
private Long demandOrderId; | ||
private LocalDateTime createdDate; | ||
private int status; | ||
private String projectName; | ||
private String description; | ||
private String thumbnail; | ||
private List<MyOrderDemandItemDto> itemList; | ||
|
||
public MyOrderDemandDetailResponseDto(List<MyOrderDemandItemDto> itemList, DemandOrder demandOrder){ | ||
this.demandOrderId = demandOrder.getId(); | ||
this.createdDate = demandOrder.getCreated_time(); | ||
this.status = demandOrder.getStatus(); | ||
this.projectName = demandOrder.getDemandProject().getProjectName(); | ||
this.description = demandOrder.getDemandProject().getDescription(); | ||
this.thumbnail = demandOrder.getDemandProject().getThumbnail(); | ||
this.itemList = itemList; | ||
} | ||
} |
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
21 changes: 21 additions & 0 deletions
21
...java/wowmarket/wow_server/mypage/myorder/demand/dto/MyOrderDemandFormListResponseDto.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,21 @@ | ||
package wowmarket.wow_server.mypage.myorder.demand.dto; | ||
|
||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.List; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
public class MyOrderDemandFormListResponseDto { | ||
//나의 수요조사 주문폼 전체보기 리스트 dto | ||
private List<MyOrderDemandFormDto> demandOrderList; | ||
private int totalPage; | ||
private int currentPage; | ||
|
||
public MyOrderDemandFormListResponseDto(List<MyOrderDemandFormDto> demand_order_list, int total_page, int current_page){ | ||
this.demandOrderList = demand_order_list; | ||
this.totalPage = total_page; | ||
this.currentPage = current_page; | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/wowmarket/wow_server/mypage/myorder/demand/dto/MyOrderDemandItemDto.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,21 @@ | ||
package wowmarket.wow_server.mypage.myorder.demand.dto; | ||
|
||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import wowmarket.wow_server.domain.DemandDetail; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
public class MyOrderDemandItemDto { | ||
private Long itemId; | ||
private String itemName; | ||
private Long price; | ||
private int count; | ||
|
||
public MyOrderDemandItemDto(DemandDetail demandDetail){ | ||
this.itemId = demandDetail.getDemandItem().getId(); | ||
this.itemName = demandDetail.getDemandItem().getName(); | ||
this.price = demandDetail.getDemandItem().getPrice(); | ||
this.count = demandDetail.getCount(); | ||
} | ||
} |
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
69 changes: 0 additions & 69 deletions
69
...main/java/wowmarket/wow_server/mypage/myorder/sales/dto/MyOrderFormDetailResponseDto.java
This file was deleted.
Oops, something went wrong.
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
13 changes: 6 additions & 7 deletions
13
...order/sales/dto/MyOrderFormDetailDto.java → .../sales/dto/MyOrderSalesDetailItemDto.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
Oops, something went wrong.