Skip to content

Commit

Permalink
Merge pull request #119 from Hoang-Nguyen-Huy/feat/socket
Browse files Browse the repository at this point in the history
[PBS-85][NguyenHCP] feat: update cancelReason to request
  • Loading branch information
nguyenhcp2004 authored Oct 29, 2024
2 parents c33297a + 5ff732f commit 220c285
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
<lombok-mapstruct-binding.version>0.2.0</lombok-mapstruct-binding.version>
<sonar.organization>swp-pod-booking-system-server</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.coverage.jacoco.xmlReportPaths>${project.build.directory}/site/jacoco/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
<sonar.coverage.jacoco.xmlReportPaths>${project.build.directory}/site/jacoco/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
</properties>
<dependencies>
<dependency>
Expand Down Expand Up @@ -137,8 +138,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>22</source>
<target>22</target>
<source>${java.version}</source>
<target>${java.version}</target>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
public class OrderUpdateRequest {
String id;
OrderStatus status;
String cancelReason;
Account orderHandler;
List<OrderDetailUpdateRoomRequest> orderDetails;
}
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,9 @@ public void updateOrderDetail(OrderUpdateRequest request) {
Account orderHandler = accountService.getAccountById(request.getOrderHandler().getId());
od.setOrderHandler(orderHandler);
}
if (request.getCancelReason() != null) {
od.setCancelReason(request.getCancelReason());
}
if (request.getOrderDetails() != null && !request.getOrderDetails().isEmpty()) {
for (OrderDetailUpdateRoomRequest odr : request.getOrderDetails()) {
if (odr.getId().equals(od.getId())) {
Expand Down

0 comments on commit 220c285

Please sign in to comment.