Skip to content

Commit

Permalink
Merge pull request #43 from shortintern2020-A-labyrinth/author/nakamu…
Browse files Browse the repository at this point in the history
…ra_part

Author/nakamura part
  • Loading branch information
tsukasa2 authored Aug 28, 2020
2 parents a6b601e + 1437222 commit 777b246
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
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

0 comments on commit 777b246

Please sign in to comment.