Fixed compilation error
This commit is contained in:
parent
fbefae05ec
commit
cd51e118df
|
@ -17,6 +17,10 @@ public class CustomerDto {
|
||||||
this.phone = c.phone;
|
this.phone = c.phone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public long getId() {
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
|
||||||
public Customer convertToEntity() {
|
public Customer convertToEntity() {
|
||||||
Customer c = new Customer();
|
Customer c = new Customer();
|
||||||
c.id = id;
|
c.id = id;
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class CustomerService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Customer updateCustomer(CustomerDto dto) {
|
public Customer updateCustomer(CustomerDto dto) {
|
||||||
Customer myCustomer = repo.findById(dto.id);
|
Customer myCustomer = repo.findById(dto.getId());
|
||||||
mapper.updateCustomerFromDto(dto, myCustomer);
|
mapper.updateCustomerFromDto(dto, myCustomer);
|
||||||
repo.save(myCustomer);
|
repo.save(myCustomer);
|
||||||
return myCustomer;
|
return myCustomer;
|
||||||
|
|
Loading…
Reference in New Issue