-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
DESKTOP-I633S8U\user
committed
Mar 28, 2023
1 parent
68749a7
commit 4f01669
Showing
15 changed files
with
198 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 8 additions & 2 deletions
10
src/main/java/com/hsp/hoicegram/post/comment/bo/CommentBO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,24 @@ | ||
package com.hsp.hoicegram.post.comment.bo; | ||
|
||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Service; | ||
|
||
import com.hsp.hoicegram.post.comment.dao.CommentDAO; | ||
import com.hsp.hoicegram.post.comment.model.Comment; | ||
|
||
@Service | ||
public class CommentBO { | ||
|
||
@Autowired | ||
private CommentDAO commentDAO; | ||
|
||
public int addComment(int userId, int postId, String text) { | ||
return commentDAO.insertComment(userId, postId, text); | ||
public int addComment(int userId, int postId, String content) { | ||
return commentDAO.insertComment(userId, postId, content); | ||
} | ||
|
||
public Comment getComment(int userId, int postId) { | ||
return commentDAO.selectComment(userId, postId); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
src/main/java/com/hsp/hoicegram/post/comment/model/Comment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package com.hsp.hoicegram.post.comment.model; | ||
|
||
import java.util.Date; | ||
|
||
public class Comment { | ||
private int id; | ||
private int postId; | ||
private int userId; | ||
private String content; | ||
private Date createdAt; | ||
private Date updatedAt; | ||
|
||
|
||
public int getId() { | ||
return id; | ||
} | ||
public void setId(int id) { | ||
this.id = id; | ||
} | ||
public int getPostId() { | ||
return postId; | ||
} | ||
public void setPostId(int postId) { | ||
this.postId = postId; | ||
} | ||
public int getUserId() { | ||
return userId; | ||
} | ||
public void setUserId(int userId) { | ||
this.userId = userId; | ||
} | ||
public String getContent() { | ||
return content; | ||
} | ||
public void setContent(String content) { | ||
this.content = content; | ||
} | ||
public Date getCreatedAt() { | ||
return createdAt; | ||
} | ||
public void setCreatedAt(Date createdAt) { | ||
this.createdAt = createdAt; | ||
} | ||
public Date getUpdatedAt() { | ||
return updatedAt; | ||
} | ||
public void setUpdatedAt(Date updatedAt) { | ||
this.updatedAt = updatedAt; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,6 @@ public class PostDetail { | |
private String imagePath; | ||
|
||
|
||
|
||
|
||
|
||
public String getComment() { | ||
return comment; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,9 +13,7 @@ header { | |
font-size:40px; | ||
} | ||
|
||
.unlike-icon { | ||
color:red; | ||
} | ||
|
||
|
||
footer { | ||
height:70px; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters