From bc83bca5a9d478d4b9a60b2672441305868e4816 Mon Sep 17 00:00:00 2001 From: yunji118 Date: Fri, 29 Dec 2023 00:02:21 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[feat]=EC=88=98=EC=A7=91=ED=8F=BC=20?= =?UTF-8?q?=EC=83=81=EC=84=B8=EB=B3=B4=EA=B8=B0=20=EC=88=98=EC=A0=95=20#13?= =?UTF-8?q?7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/MySalesOrderController.java | 2 + .../dto/MySalesOrderDetailDto.java | 4 +- .../dto/MySalesOrderDetailResponseDto.java | 48 ++++++++++++++----- .../MySalesOrder/dto/MySalesOrderDto.java | 3 +- 4 files changed, 43 insertions(+), 14 deletions(-) diff --git a/src/main/java/wowmarket/wow_server/mypage/myproject/MySalesOrder/controller/MySalesOrderController.java b/src/main/java/wowmarket/wow_server/mypage/myproject/MySalesOrder/controller/MySalesOrderController.java index 9a4b3eb..7bf82b7 100644 --- a/src/main/java/wowmarket/wow_server/mypage/myproject/MySalesOrder/controller/MySalesOrderController.java +++ b/src/main/java/wowmarket/wow_server/mypage/myproject/MySalesOrder/controller/MySalesOrderController.java @@ -19,12 +19,14 @@ public class MySalesOrderController { private final MySalesOrderService mySalesOrderService; + //수집폼 리스트 @GetMapping public MySalesOrderListResponseDto getMySalesOrderForms(@RequestParam(value = "page", defaultValue = "1", required = false)int page, @AuthenticationPrincipal User user){ Pageable pageable = PageRequest.of(page - 1, 10); return mySalesOrderService.findMySalesOrderForms(pageable, user); } + //수집폼 상태 변경 @PutMapping("/{order_id}") public ResponseEntity updateMySalesOrderFormStatus(@PathVariable Long order_id, @RequestBody MySalesOrderStatusRequestDto requestDto){ mySalesOrderService.updateMySalesOrderStatus(order_id, requestDto); diff --git a/src/main/java/wowmarket/wow_server/mypage/myproject/MySalesOrder/dto/MySalesOrderDetailDto.java b/src/main/java/wowmarket/wow_server/mypage/myproject/MySalesOrder/dto/MySalesOrderDetailDto.java index d51f2a9..79ad433 100644 --- a/src/main/java/wowmarket/wow_server/mypage/myproject/MySalesOrder/dto/MySalesOrderDetailDto.java +++ b/src/main/java/wowmarket/wow_server/mypage/myproject/MySalesOrder/dto/MySalesOrderDetailDto.java @@ -7,13 +7,13 @@ @Getter @NoArgsConstructor public class MySalesOrderDetailDto { - private Long itemId; + private Long item_id; private String name; private Long price; private int count; public MySalesOrderDetailDto(OrderDetail orderDetail){ - this.itemId = orderDetail.getItem().getId(); + this.item_id = orderDetail.getItem().getId(); this.name = orderDetail.getItem().getName(); this.price = orderDetail.getItem().getPrice(); this.count = orderDetail.getCount(); diff --git a/src/main/java/wowmarket/wow_server/mypage/myproject/MySalesOrder/dto/MySalesOrderDetailResponseDto.java b/src/main/java/wowmarket/wow_server/mypage/myproject/MySalesOrder/dto/MySalesOrderDetailResponseDto.java index 525b07b..d3d7a0c 100644 --- a/src/main/java/wowmarket/wow_server/mypage/myproject/MySalesOrder/dto/MySalesOrderDetailResponseDto.java +++ b/src/main/java/wowmarket/wow_server/mypage/myproject/MySalesOrder/dto/MySalesOrderDetailResponseDto.java @@ -10,35 +10,61 @@ @Getter @NoArgsConstructor public class MySalesOrderDetailResponseDto { + private Long order_id; + private String project_name; + private int total_price; + private String thumbnail; + private String description; + + private String receive_type; + private Long delivery_fee; + private List itemList; + private String receiver; private String address; - private Long delivery_fee; + private String address_detail; private String zipcode; - private String message; private String phone; + private String message; + private String seller_bank; private String seller_account; private String seller_account_name; - private String buyer_bank; - private String buyer_account; - private String buyer_account_name; - private String deposittime; + + private String deposit_name; + private String deposit_time; + + private String refund_bank; + private String refund_account; public MySalesOrderDetailResponseDto(List newDtos, Orders orders, String address){ + this.order_id = orders.getId(); + this.project_name = orders.getProject().getProjectName(); + this.total_price = orders.getTotal_price(); + this.thumbnail = orders.getProject().getThumbnail(); + this.description = orders.getProject().getDescription(); + + this.receive_type = orders.getProject().getReceive_type().toString(); + this.delivery_fee = orders.getProject().getDelivery_fee(); + this.itemList = newDtos; + this.receiver = orders.getReceiver(); this.address = address; - this.delivery_fee = orders.getProject().getDelivery_fee(); + this.address_detail = orders.getAddress_detail(); this.zipcode = orders.getZipcode(); this.message = orders.getDelivery_msg(); this.phone = orders.getPhone(); + this.seller_bank = orders.getProject().getBank(); this.seller_account = orders.getProject().getAccount(); this.seller_account_name = orders.getProject().getAccount_holder_name(); - this.buyer_bank = orders.getBank(); - this.buyer_account = orders.getAccount(); - this.buyer_account_name = orders.getDepositor(); - this.deposittime = orders.getDepositTime(); + + this.deposit_name = orders.getDepositor(); + this.deposit_time = orders.getDepositTime(); + + this.refund_account = orders.getAccount(); + this.refund_bank = orders.getBank(); } } diff --git a/src/main/java/wowmarket/wow_server/mypage/myproject/MySalesOrder/dto/MySalesOrderDto.java b/src/main/java/wowmarket/wow_server/mypage/myproject/MySalesOrder/dto/MySalesOrderDto.java index 4d63bf6..49d0679 100644 --- a/src/main/java/wowmarket/wow_server/mypage/myproject/MySalesOrder/dto/MySalesOrderDto.java +++ b/src/main/java/wowmarket/wow_server/mypage/myproject/MySalesOrder/dto/MySalesOrderDto.java @@ -13,12 +13,13 @@ public class MySalesOrderDto { private String name; private LocalDateTime createdtime; private int status; + private String buyer_name; public MySalesOrderDto(Orders orders){ - this.id = orders.getId(); this.id = orders.getId(); this.name = orders.getProject().getProjectName(); this.createdtime = orders.getCreated_time(); this.status = orders.getOrder_status(); + this.buyer_name = orders.getUser().getName(); } } From 268816d38f08700ea2242c5ea42b9a5f70cbb0b8 Mon Sep 17 00:00:00 2001 From: yunji118 Date: Fri, 29 Dec 2023 01:16:39 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[feat]=EB=82=98=EC=9D=98=20=EC=A3=BC?= =?UTF-8?q?=EB=AC=B8=ED=8F=BC=20dto=20=EC=88=98=EC=A0=95=20#137?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../myorder/dto/MyOrderFormDetailDto.java | 4 +- .../dto/MyOrderFormDetailResponseDto.java | 54 +++++++++++-------- 2 files changed, 34 insertions(+), 24 deletions(-) diff --git a/src/main/java/wowmarket/wow_server/mypage/myorder/dto/MyOrderFormDetailDto.java b/src/main/java/wowmarket/wow_server/mypage/myorder/dto/MyOrderFormDetailDto.java index 596ffc3..12cbe60 100644 --- a/src/main/java/wowmarket/wow_server/mypage/myorder/dto/MyOrderFormDetailDto.java +++ b/src/main/java/wowmarket/wow_server/mypage/myorder/dto/MyOrderFormDetailDto.java @@ -8,13 +8,13 @@ @Getter @NoArgsConstructor public class MyOrderFormDetailDto { - private Long itemId; + private Long item_id; private String name; private Long price; private int count; public MyOrderFormDetailDto(OrderDetail orderDetail){ - this.itemId = orderDetail.getItem().getId(); + this.item_id = orderDetail.getItem().getId(); this.name = orderDetail.getItem().getName(); this.price = orderDetail.getItem().getPrice(); this.count = orderDetail.getCount(); diff --git a/src/main/java/wowmarket/wow_server/mypage/myorder/dto/MyOrderFormDetailResponseDto.java b/src/main/java/wowmarket/wow_server/mypage/myorder/dto/MyOrderFormDetailResponseDto.java index a58cb28..3450733 100644 --- a/src/main/java/wowmarket/wow_server/mypage/myorder/dto/MyOrderFormDetailResponseDto.java +++ b/src/main/java/wowmarket/wow_server/mypage/myorder/dto/MyOrderFormDetailResponseDto.java @@ -13,6 +13,14 @@ @NoArgsConstructor public class MyOrderFormDetailResponseDto { + private Long order_id; + private String project_name; + private String description; + private int total_price; + private String thumbnail; + private int status; + private int is_del; + private List itemList; private String receiver; private String address; @@ -20,43 +28,45 @@ public class MyOrderFormDetailResponseDto { private String zipcode; private String message; private String phone; + private String seller_bank; private String seller_account; private String seller_account_name; - private String buyer_bank; - private String buyer_account; - private String buyer_account_name; - private String deposittime; - private String project_name; - private String description; - private int total_price; - private String thumbnail; - private int status; - private int is_del; - private Long order_id; + + private String deposit_name; + private String deposit_time; + + private String refund_bank; + private String refund_account; + public MyOrderFormDetailResponseDto(List itemList, Orders orders, String address){ + this.order_id = orders.getId(); + this.project_name = orders.getProject().getProjectName(); + this.description = orders.getProject().getDescription(); + this.total_price = orders.getTotal_price(); + this.thumbnail = orders.getProject().getThumbnail(); + this.status = orders.getOrder_status(); + this.is_del = orders.getIsDel(); + this.itemList = itemList; + this.receiver = orders.getReceiver(); this.address = address; this.delivery_fee = orders.getProject().getDelivery_fee(); this.zipcode = orders.getZipcode(); this.message = orders.getDelivery_msg(); this.phone = orders.getPhone(); + this.seller_bank = orders.getProject().getBank(); this.seller_account = orders.getProject().getAccount(); this.seller_account_name = orders.getProject().getAccount_holder_name(); - this.buyer_bank = orders.getBank(); - this.buyer_account = orders.getAccount(); - this.buyer_account_name = orders.getDepositor(); - this.deposittime = orders.getDepositTime(); - this.project_name = orders.getProject().getProjectName(); - this.description = orders.getProject().getDescription(); - this.total_price = orders.getTotal_price(); - this.thumbnail = orders.getProject().getThumbnail(); - this.status = orders.getOrder_status(); - this.is_del = orders.getIsDel(); - this.order_id = orders.getId(); + + this.deposit_name = orders.getDepositor(); + this.deposit_time = orders.getDepositTime(); + + this.refund_bank = orders.getBank(); + this.refund_account = orders.getAccount(); } }