Skip to content

Commit

Permalink
Merge pull request #144 from UMC-WOWMARKET/feat/v2fix
Browse files Browse the repository at this point in the history
[feat] 판매 주문폼, 등록폼, 수집폼 수정
  • Loading branch information
yunji118 authored Dec 28, 2023
2 parents db89836 + 268816d commit 9158e4a
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,50 +13,60 @@
@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<MyOrderFormDetailDto> itemList;
private String receiver;
private String address;
private Long delivery_fee;
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<MyOrderFormDetailDto> 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();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<MySalesOrderDetailDto> 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<MySalesOrderDetailDto> 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();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

0 comments on commit 9158e4a

Please sign in to comment.