Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Author/nakamura part #43

Merged
merged 2 commits into from
Aug 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docker/pg/1-createTable.sql
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ create table requestfriend (
create_at timestamp
);


/* BEGIN:nakamura */
insert into users(name, mail, filterlevel) values
('ichigo.chocomint', '[email protected]', 1),
('banana.chocomint', '[email protected]', 2),
Expand Down Expand Up @@ -97,3 +97,5 @@ insert into users(name, mail, filterlevel) values
('pinapple.chocomint', '[email protected]', 3)
;

/* END:nakamura */

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//BEGIN:nakamura
package com.example.demo.controller;

import java.io.FileNotFoundException;
Expand Down Expand Up @@ -54,4 +55,5 @@ public String test(
return c.getXClass();

}
}
}
//END:nakamura
2 changes: 2 additions & 0 deletions src/main/java/com/example/demo/controller/ViewController.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ private static String ImageProcessing(String url) throws FileNotFoundException {

}

//BEGIN:nakamura
//emoji-javaを使ってキーワードから絵文字に変換
@RequestMapping(path = "/convert/{keyword}", method = RequestMethod.GET)
public String convert(
Expand Down Expand Up @@ -196,6 +197,7 @@ public List<Emolog> insertEmolog(
// return emologService.insert(user, friend, emoji);
return emologService.insert(123, 456, "U+1F600");
}
//END:nakamura

//関数もおいちゃえ
public static List<String> get_NLU_keywords(String username, long tweet_id) throws TwitterException {
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/example/demo/service/EmologService.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public List<Emolog> selectAll(int user, int friend){
return emologRepository.selectAll(user, friend);
}

//BEGIN:nakamura
public List<Emolog> insert(int user, int friend, String contents) throws ParseException {
Emolog e = new Emolog();
e.setId((int)Calendar.getInstance().getTimeInMillis());
Expand All @@ -53,6 +54,7 @@ public List<Emolog> insert(int user, int friend, String contents) throws ParseEx
emologRepository.insert(e);
return emologRepository.selectAll(user, friend);
}
//END:nakamura

public void createEmolog() throws Exception {
List<Friend> friends = friendRepository.selectAllRecord();
Expand Down