eunyounging

  • 홈
  • 태그
  • 방명록

2025/01/13 3

2025.01.11.토 TIL

//Spring 기초 6주차 DB 실습CREATE TABLE student( id BIGINT AUTO_INCREMENT PRIMARY KEY COMMENT '학생 식별자', name VARCHAR(100) COMMENT '이름', age INT COMMENT '나이', grade VARCHAR(10) COMMENT '등급');CREATE TABLE major( id BIGINT AUTO_INCREMENT PRIMARY KEY COMMENT '전공 식별자', name VARCHAR(50) NOT NULL COMMENT '이름', tutor VARCHAR(50) NOT NULL COMMENT '튜터');CREATE TABLE enrollment( id BIGINT..

study/TIL 2025.01.13

20250110 TIL

@Transactional public void cancelReport(Long id, Long myId) { //신고 내역 조회 Report report = reportRepository.findByIdOrElseThrow(id); // if (!Objects.equals(report.getFromUser().getId(), myId)) { throw new ForbiddenException(ErrorCode.FORBIDDEN_PERMISSION); } //createdAt 으로부터 6개월 이내의 신고내역인가? if (report.getCreatedAt().isBefore(LocalDateT..

study/TIL 2025.01.13

20250109 TIL

@Transactionalpublic ReportResDto createReport(Long fromId, Long toId, Long matchingId, String content) { // fromId, toId가 같으면 에러코드 if (Objects.equals(fromId, toId)) { throw new BadRequestException(ErrorCode.BAD_REQUEST); } // fromUser, toUser 불러오기 User fromUser = userRepository.findByIdOrElseThrow(fromId); User toUser = userRepository.findByIdOrElseThrow(toId); // re..

study/TIL 2025.01.13
이전
1
다음
더보기
프로필사진

eunyounging

장은영님의 블로그 입니다.

  • 분류 전체보기 (60)
    • study (56)
      • Java (12)
      • 정보처리기사 (5)
      • Spring (0)
      • Algorithm (3)
      • CS (8)
      • TIL (23)
      • summary (5)
    • 취업 (1)
    • 프로젝트 (2)
      • 트러블 슈팅 (1)
    • Daily Log (0)

Tag

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/01   »
일 월 화 수 목 금 토
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

방문자수Total

  • Today :
  • Yesterday :

Copyright © AXZ Corp. All rights reserved.

티스토리툴바