{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/ecommerce/pulls/comments/172740823","pull_request_review_id":101807934,"id":172740823,"diff_hunk":"@@ -231,6 +251,125 @@ public ProductInfo saveOrUpdate(ProductInfo entity) {\n \t\t}\n \t}\n \n+\t@SuppressWarnings(\"unchecked\")\n+\t@Override\n+\tpublic boolean createProduct(ProductInfo productInfo) {\n+\t\tList<String> imageURLs = new ArrayList<>();\n+\t\ttry {\n+\t\t\tif (!productInfo.getAvatarFile().isEmpty()) {\n+\t\t\t\tMap<String, String> map = uploadFile.upload(productInfo.getAvatarFile());\n+\t\t\t\tproductInfo.setAvatar(map.get(\"url\"));\n+\t\t\t}\n+\n+\t\t\tList<Integer> statuses = productInfo.getImagesStatus();\n+\t\t\tList<MultipartFile> images = productInfo.getImageFiles();\n+\t\t\tfor (int i = 0; i < statuses.size(); i++) {\n+\t\t\t\tif (statuses.get(i) == 0 && !images.get(i).isEmpty()) {\n+\t\t\t\t\tMap<String, String> map = uploadFile.upload(images.get(i));\n+\t\t\t\t\timageURLs.add((String) map.get(\"url\"));\n+\t\t\t\t}\n+\t\t\t}\n+\t\t} catch (IOException e) {\n+\t\t\treturn false;\n+\t\t}\n+\n+\t\ttry {","path":"src/main/java/com/framgia/service/impl/ProductServiceImpl.java","position":96,"original_position":96,"commit_id":"a51bfb569ab33c3ea342d92d6ad901a7079293b1","original_commit_id":"a51bfb569ab33c3ea342d92d6ad901a7079293b1","user":{"login":"tiennh1995","id":19922459,"avatar_url":"https://avatars2.githubusercontent.com/u/19922459?v=4","gravatar_id":"","url":"https://api.github.com/users/tiennh1995","html_url":"https://github.com/tiennh1995","followers_url":"https://api.github.com/users/tiennh1995/followers","following_url":"https://api.github.com/users/tiennh1995/following{/other_user}","gists_url":"https://api.github.com/users/tiennh1995/gists{/gist_id}","starred_url":"https://api.github.com/users/tiennh1995/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiennh1995/subscriptions","organizations_url":"https://api.github.com/users/tiennh1995/orgs","repos_url":"https://api.github.com/users/tiennh1995/repos","events_url":"https://api.github.com/users/tiennh1995/events{/privacy}","received_events_url":"https://api.github.com/users/tiennh1995/received_events","type":"User","site_admin":false},"body":"Tại em muốn throw exception, nhưng nếu gộp thì bên interface của service sẽ phải thêm throw exception ở hàm ạ","created_at":"2018-03-07T04:50:53Z","updated_at":"2018-03-07T04:50:53Z","html_url":"https://github.com/framgia/ecommerce/pull/41#discussion_r172740823","pull_request_url":"https://api.github.com/repos/framgia/ecommerce/pulls/41","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/framgia/ecommerce/pulls/comments/172740823"},"html":{"href":"https://github.com/framgia/ecommerce/pull/41#discussion_r172740823"},"pull_request":{"href":"https://api.github.com/repos/framgia/ecommerce/pulls/41"}},"in_reply_to_id":172734631},"pull_request":{"url":"https://api.github.com/repos/framgia/ecommerce/pulls/41","id":172463814,"html_url":"https://github.com/framgia/ecommerce/pull/41","diff_url":"https://github.com/framgia/ecommerce/pull/41.diff","patch_url":"https://github.com/framgia/ecommerce/pull/41.patch","issue_url":"https://api.github.com/repos/framgia/ecommerce/issues/41","number":41,"state":"open","locked":false,"title":"admin manage product","user":{"login":"tiennh1995","id":19922459,"avatar_url":"https://avatars2.githubusercontent.com/u/19922459?v=4","gravatar_id":"","url":"https://api.github.com/users/tiennh1995","html_url":"https://github.com/tiennh1995","followers_url":"https://api.github.com/users/tiennh1995/followers","following_url":"https://api.github.com/users/tiennh1995/following{/other_user}","gists_url":"https://api.github.com/users/tiennh1995/gists{/gist_id}","starred_url":"https://api.github.com/users/tiennh1995/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiennh1995/subscriptions","organizations_url":"https://api.github.com/users/tiennh1995/orgs","repos_url":"https://api.github.com/users/tiennh1995/repos","events_url":"https://api.github.com/users/tiennh1995/events{/privacy}","received_events_url":"https://api.github.com/users/tiennh1995/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-02T10:02:25Z","updated_at":"2018-03-07T04:50:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3ad65e3d1b055f463ef63177d7e9b803124ca3fc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/ecommerce/pulls/41/commits","review_comments_url":"https://api.github.com/repos/framgia/ecommerce/pulls/41/comments","review_comment_url":"https://api.github.com/repos/framgia/ecommerce/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/ecommerce/issues/41/comments","statuses_url":"https://api.github.com/repos/framgia/ecommerce/statuses/a51bfb569ab33c3ea342d92d6ad901a7079293b1","head":{"label":"tiennh1995:admin-manage-product","ref":"admin-manage-product","sha":"a51bfb569ab33c3ea342d92d6ad901a7079293b1","user":{"login":"tiennh1995","id":19922459,"avatar_url":"https://avatars2.githubusercontent.com/u/19922459?v=4","gravatar_id":"","url":"https://api.github.com/users/tiennh1995","html_url":"https://github.com/tiennh1995","followers_url":"https://api.github.com/users/tiennh1995/followers","following_url":"https://api.github.com/users/tiennh1995/following{/other_user}","gists_url":"https://api.github.com/users/tiennh1995/gists{/gist_id}","starred_url":"https://api.github.com/users/tiennh1995/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiennh1995/subscriptions","organizations_url":"https://api.github.com/users/tiennh1995/orgs","repos_url":"https://api.github.com/users/tiennh1995/repos","events_url":"https://api.github.com/users/tiennh1995/events{/privacy}","received_events_url":"https://api.github.com/users/tiennh1995/received_events","type":"User","site_admin":false},"repo":{"id":117189457,"name":"ecommerce","full_name":"tiennh1995/ecommerce","owner":{"login":"tiennh1995","id":19922459,"avatar_url":"https://avatars2.githubusercontent.com/u/19922459?v=4","gravatar_id":"","url":"https://api.github.com/users/tiennh1995","html_url":"https://github.com/tiennh1995","followers_url":"https://api.github.com/users/tiennh1995/followers","following_url":"https://api.github.com/users/tiennh1995/following{/other_user}","gists_url":"https://api.github.com/users/tiennh1995/gists{/gist_id}","starred_url":"https://api.github.com/users/tiennh1995/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiennh1995/subscriptions","organizations_url":"https://api.github.com/users/tiennh1995/orgs","repos_url":"https://api.github.com/users/tiennh1995/repos","events_url":"https://api.github.com/users/tiennh1995/events{/privacy}","received_events_url":"https://api.github.com/users/tiennh1995/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tiennh1995/ecommerce","description":"Ecommerce (Training)","fork":true,"url":"https://api.github.com/repos/tiennh1995/ecommerce","forks_url":"https://api.github.com/repos/tiennh1995/ecommerce/forks","keys_url":"https://api.github.com/repos/tiennh1995/ecommerce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tiennh1995/ecommerce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tiennh1995/ecommerce/teams","hooks_url":"https://api.github.com/repos/tiennh1995/ecommerce/hooks","issue_events_url":"https://api.github.com/repos/tiennh1995/ecommerce/issues/events{/number}","events_url":"https://api.github.com/repos/tiennh1995/ecommerce/events","assignees_url":"https://api.github.com/repos/tiennh1995/ecommerce/assignees{/user}","branches_url":"https://api.github.com/repos/tiennh1995/ecommerce/branches{/branch}","tags_url":"https://api.github.com/repos/tiennh1995/ecommerce/tags","blobs_url":"https://api.github.com/repos/tiennh1995/ecommerce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tiennh1995/ecommerce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tiennh1995/ecommerce/git/refs{/sha}","trees_url":"https://api.github.com/repos/tiennh1995/ecommerce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tiennh1995/ecommerce/statuses/{sha}","languages_url":"https://api.github.com/repos/tiennh1995/ecommerce/languages","stargazers_url":"https://api.github.com/repos/tiennh1995/ecommerce/stargazers","contributors_url":"https://api.github.com/repos/tiennh1995/ecommerce/contributors","subscribers_url":"https://api.github.com/repos/tiennh1995/ecommerce/subscribers","subscription_url":"https://api.github.com/repos/tiennh1995/ecommerce/subscription","commits_url":"https://api.github.com/repos/tiennh1995/ecommerce/commits{/sha}","git_commits_url":"https://api.github.com/repos/tiennh1995/ecommerce/git/commits{/sha}","comments_url":"https://api.github.com/repos/tiennh1995/ecommerce/comments{/number}","issue_comment_url":"https://api.github.com/repos/tiennh1995/ecommerce/issues/comments{/number}","contents_url":"https://api.github.com/repos/tiennh1995/ecommerce/contents/{+path}","compare_url":"https://api.github.com/repos/tiennh1995/ecommerce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tiennh1995/ecommerce/merges","archive_url":"https://api.github.com/repos/tiennh1995/ecommerce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tiennh1995/ecommerce/downloads","issues_url":"https://api.github.com/repos/tiennh1995/ecommerce/issues{/number}","pulls_url":"https://api.github.com/repos/tiennh1995/ecommerce/pulls{/number}","milestones_url":"https://api.github.com/repos/tiennh1995/ecommerce/milestones{/number}","notifications_url":"https://api.github.com/repos/tiennh1995/ecommerce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tiennh1995/ecommerce/labels{/name}","releases_url":"https://api.github.com/repos/tiennh1995/ecommerce/releases{/id}","deployments_url":"https://api.github.com/repos/tiennh1995/ecommerce/deployments","created_at":"2018-01-12T03:51:17Z","updated_at":"2018-01-11T04:14:16Z","pushed_at":"2018-03-05T04:00:58Z","git_url":"git://github.com/tiennh1995/ecommerce.git","ssh_url":"git@github.com:tiennh1995/ecommerce.git","clone_url":"https://github.com/tiennh1995/ecommerce.git","svn_url":"https://github.com/tiennh1995/ecommerce","homepage":null,"size":2465,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"framgia:develop","ref":"develop","sha":"ec156d3b3fb3e9c689f38fd5aff44fd2e6ee3163","user":{"login":"framgia","id":2322183,"avatar_url":"https://avatars3.githubusercontent.com/u/2322183?v=4","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"repo":{"id":117048987,"name":"ecommerce","full_name":"framgia/ecommerce","owner":{"login":"framgia","id":2322183,"avatar_url":"https://avatars3.githubusercontent.com/u/2322183?v=4","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/framgia/ecommerce","description":"Ecommerce (Training)","fork":false,"url":"https://api.github.com/repos/framgia/ecommerce","forks_url":"https://api.github.com/repos/framgia/ecommerce/forks","keys_url":"https://api.github.com/repos/framgia/ecommerce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/ecommerce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/ecommerce/teams","hooks_url":"https://api.github.com/repos/framgia/ecommerce/hooks","issue_events_url":"https://api.github.com/repos/framgia/ecommerce/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/ecommerce/events","assignees_url":"https://api.github.com/repos/framgia/ecommerce/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/ecommerce/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/ecommerce/tags","blobs_url":"https://api.github.com/repos/framgia/ecommerce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/ecommerce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/ecommerce/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/ecommerce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/ecommerce/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/ecommerce/languages","stargazers_url":"https://api.github.com/repos/framgia/ecommerce/stargazers","contributors_url":"https://api.github.com/repos/framgia/ecommerce/contributors","subscribers_url":"https://api.github.com/repos/framgia/ecommerce/subscribers","subscription_url":"https://api.github.com/repos/framgia/ecommerce/subscription","commits_url":"https://api.github.com/repos/framgia/ecommerce/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/ecommerce/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/ecommerce/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/ecommerce/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/ecommerce/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/ecommerce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/ecommerce/merges","archive_url":"https://api.github.com/repos/framgia/ecommerce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/ecommerce/downloads","issues_url":"https://api.github.com/repos/framgia/ecommerce/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/ecommerce/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/ecommerce/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/ecommerce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/ecommerce/labels{/name}","releases_url":"https://api.github.com/repos/framgia/ecommerce/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/ecommerce/deployments","created_at":"2018-01-11T04:14:16Z","updated_at":"2018-01-12T15:33:54Z","pushed_at":"2018-03-05T04:00:59Z","git_url":"git://github.com/framgia/ecommerce.git","ssh_url":"git@github.com:framgia/ecommerce.git","clone_url":"https://github.com/framgia/ecommerce.git","svn_url":"https://github.com/framgia/ecommerce","homepage":null,"size":2462,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/ecommerce/pulls/41"},"html":{"href":"https://github.com/framgia/ecommerce/pull/41"},"issue":{"href":"https://api.github.com/repos/framgia/ecommerce/issues/41"},"comments":{"href":"https://api.github.com/repos/framgia/ecommerce/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/ecommerce/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/ecommerce/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/ecommerce/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/ecommerce/statuses/a51bfb569ab33c3ea342d92d6ad901a7079293b1"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"tiennh1995"}}