- Timestamp:
- 03/03/24 20:38:23 (15 months ago)
- Branches:
- main
- Children:
- 748b7f6
- Parents:
- a7d40aa
- Location:
- src/main/java/com/example/rezevirajmasa/demo
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/example/rezevirajmasa/demo/dto/CustomerDTO.java
ra7d40aa r3ba01da 2 2 3 3 import com.example.rezevirajmasa.demo.model.MembershipLevel; 4 import com.example.rezevirajmasa.demo.model.Role; 5 6 import java.sql.Date; 4 7 5 8 public class CustomerDTO { 9 private Long customerId; 6 10 private String firstName; 7 11 private String lastName; 8 12 private String email; 9 private String password;10 13 private String phone; 11 14 private String address; 12 15 private MembershipLevel membershipLevel; 16 private Date registrationDate; 17 private Role role; 18 19 public Long getCustomerId() { 20 return customerId; 21 } 22 23 public void setCustomerId(Long customerId) { 24 this.customerId = customerId; 25 } 26 27 public String getFirstName() { 28 return firstName; 29 } 30 31 public void setFirstName(String firstName) { 32 this.firstName = firstName; 33 } 34 35 public String getLastName() { 36 return lastName; 37 } 38 39 public void setLastName(String lastName) { 40 this.lastName = lastName; 41 } 42 43 public String getEmail() { 44 return email; 45 } 46 47 public void setEmail(String email) { 48 this.email = email; 49 } 50 51 public String getPhone() { 52 return phone; 53 } 54 55 public void setPhone(String phone) { 56 this.phone = phone; 57 } 58 59 public String getAddress() { 60 return address; 61 } 62 63 public void setAddress(String address) { 64 this.address = address; 65 } 66 67 public MembershipLevel getMembershipLevel() { 68 return membershipLevel; 69 } 70 71 public void setMembershipLevel(MembershipLevel membershipLevel) { 72 this.membershipLevel = membershipLevel; 73 } 74 75 public Date getRegistrationDate() { 76 return registrationDate; 77 } 78 79 public void setRegistrationDate(Date registrationDate) { 80 this.registrationDate = registrationDate; 81 } 82 83 public Role getRole() { 84 return role; 85 } 86 87 public void setRole(Role role) { 88 this.role = role; 89 } 13 90 } -
src/main/java/com/example/rezevirajmasa/demo/web/rest/testController.java
ra7d40aa r3ba01da 1 1 package com.example.rezevirajmasa.demo.web.rest; 2 2 3 import com.example.rezevirajmasa.demo.dto.CustomerDTO; 3 4 import com.example.rezevirajmasa.demo.model.*; 4 5 import com.example.rezevirajmasa.demo.service.CustomerService; … … 100 101 } 101 102 103 // @RequestMapping("/api/customers/{id}") 104 // public ResponseEntity<CustomerDTO> getCustomerById(@PathVariable Long id) { 105 // Customer customer = customerService.findById(id); 106 // CustomerDTO customerDTO = new CustomerDTO(); 107 // customerDTO.setCustomerId(customerDTO.getCustomerId()); 108 // customerDTO.setAddress(customerDTO.getAddress()); 109 // customerDTO.setEmail(customerDTO.getEmail()); 110 // customerDTO.setPhone(customerDTO.getPhone()); 111 // customerDTO.setRole(customerDTO.getRole()); 112 // customerDTO.setFirstName(customerDTO.getFirstName()); 113 // customerDTO.setLastName(customerDTO.getLastName()); 114 // customerDTO.setMembershipLevel(customerDTO.getMembershipLevel()); 115 // customerDTO.setRegistrationDate(customerDTO.getRegistrationDate()); 116 // 117 // return ResponseEntity.ok(customerDTO); 118 // } 119 102 120 @PutMapping("/api/customers/edit/{id}") 103 121 public ResponseEntity<Customer> editCustomerById(@PathVariable Long id, @RequestBody Customer customer) {
Note:
See TracChangeset
for help on using the changeset viewer.