Skip to content

Add Db#56

Open
tiep2999 wants to merge 6 commits into
UETCodeCamp:masterfrom
tiep2999:master
Open

Add Db#56
tiep2999 wants to merge 6 commits into
UETCodeCamp:masterfrom
tiep2999:master

Conversation

@tiep2999

Copy link
Copy Markdown
Contributor

No description provided.

@tiep2999 tiep2999 closed this Jun 29, 2019
@tiep2999 tiep2999 changed the title Nộp bài tập(chưa hoàn thành Database) Add Db Jun 29, 2019
@tiep2999 tiep2999 reopened this Jun 29, 2019

@quytm quytm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bị lặp lại mywallet-version-1, tuy nhiên a vẫn review code trong đó

private CustomerService customerService;


@GetMapping(value = {"/", "Customer/list"})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

url sửa thành viết thường nhé: customer/list
những url bên dưới cũng sửa tương tự



/*
tìm name

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nếu muốn mô tả chi tiết function/method làm gì, cần đặt nó ở trước function/method
e đặt ở cuối file a k hiểu?


Customer getOne(Long id);

void addCustomer(Customer contact);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nên trả về dữ liệu Customer sau khi add nhé

}

@Override
public Customer updateCustomer(Customer customerOld, Customer customerNew){

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e tham khảo cách khác này nhé (cách cũ kia không sai, nhưng chả ai dùng):

  • chỉ đẩy lên Customer (đã update dữ liệu)
  • update trực tiếp Customer đó vào DB (vì id của customer không thay đổi)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants