게시판 수정

This commit is contained in:
dyhj625 2025-02-24 16:10:05 +09:00
parent 51142afa61
commit 3192db220d
2 changed files with 5 additions and 4 deletions

View File

@ -203,8 +203,6 @@ public class BoardController {
@ParameterCheck
@PostMapping("/{LOCBRDSEQ}/comment")
public ApiResponse<String> addCommentOrReply(@ReqMap MapDto map) {
Long userId = AuthUtil.getUser().getId();
map.put("MEMBERSEQ", userId);
if (map.containsKey("LOCCMTPWD") && !map.getString("LOCCMTPWD").trim().isEmpty()) { // 체크
String rawPassword = map.getString("LOCCMTPWD");

View File

@ -134,8 +134,11 @@ public class localbordService {
}
public void insertCommentOrReply(MapDto map) {
if (map.get("LOCCMTPNT") == null) {
map.put("LOCCMTPNT", null);
if ("300102".equals(String.valueOf(map.get("LOCBRDTYP")))) {
map.put("MEMBERSEQ", null);
}else {
Long userId = AuthUtil.getUser().getId();
map.put("MEMBERSEQ", userId);
}
boardMapper.insertCommentOrReply(map);
}