Skip to content
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
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ clean {
test {
outputs.dir snippetsDir
useJUnitPlatform()
jvmArgs '-Duser.timezone=Asia/Seoul'
jvmArgs '-Duser.timezone=UTC'
testLogging {
events "failed"
exceptionFormat "full"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class QComment extends EntityPathBase<Comment> {
public final StringPath content = createString("content");

//inherited
public final DateTimePath<java.time.LocalDateTime> createdAt = _super.createdAt;
public final DateTimePath<java.time.Instant> createdAt = _super.createdAt;

//inherited
public final NumberPath<Long> id = _super.id;
Expand All @@ -45,7 +45,7 @@ public class QComment extends EntityPathBase<Comment> {
public final com.daramg.server.post.domain.QPost post;

//inherited
public final DateTimePath<java.time.LocalDateTime> updatedAt = _super.updatedAt;
public final DateTimePath<java.time.Instant> updatedAt = _super.updatedAt;

public final com.daramg.server.user.domain.QUser user;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ public class QCommentLike extends EntityPathBase<CommentLike> {
public final QComment comment;

//inherited
public final DateTimePath<java.time.LocalDateTime> createdAt = _super.createdAt;
public final DateTimePath<java.time.Instant> createdAt = _super.createdAt;

//inherited
public final NumberPath<Long> id = _super.id;

//inherited
public final DateTimePath<java.time.LocalDateTime> updatedAt = _super.updatedAt;
public final DateTimePath<java.time.Instant> updatedAt = _super.updatedAt;

public final com.daramg.server.user.domain.QUser user;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ public class QBaseEntity extends EntityPathBase<BaseEntity<? extends org.springf

public static final QBaseEntity baseEntity = new QBaseEntity("baseEntity");

public final DateTimePath<java.time.LocalDateTime> createdAt = createDateTime("createdAt", java.time.LocalDateTime.class);
public final DateTimePath<java.time.Instant> createdAt = createDateTime("createdAt", java.time.Instant.class);

public final NumberPath<Long> id = createNumber("id", Long.class);

public final DateTimePath<java.time.LocalDateTime> updatedAt = createDateTime("updatedAt", java.time.LocalDateTime.class);
public final DateTimePath<java.time.Instant> updatedAt = createDateTime("updatedAt", java.time.Instant.class);

@SuppressWarnings({"all", "rawtypes", "unchecked"})
public QBaseEntity(String variable) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class QComposer extends EntityPathBase<Composer> {
public final EnumPath<Continent> continent = createEnum("continent", Continent.class);

//inherited
public final DateTimePath<java.time.LocalDateTime> createdAt = _super.createdAt;
public final DateTimePath<java.time.Instant> createdAt = _super.createdAt;

public final NumberPath<Short> deathYear = createNumber("deathYear", Short.class);

Expand All @@ -48,7 +48,7 @@ public class QComposer extends EntityPathBase<Composer> {
public final StringPath nativeName = createString("nativeName");

//inherited
public final DateTimePath<java.time.LocalDateTime> updatedAt = _super.updatedAt;
public final DateTimePath<java.time.Instant> updatedAt = _super.updatedAt;

public QComposer(String variable) {
super(Composer.class, forVariable(variable));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ public class QComposerLike extends EntityPathBase<ComposerLike> {
public final QComposer composer;

//inherited
public final DateTimePath<java.time.LocalDateTime> createdAt = _super.createdAt;
public final DateTimePath<java.time.Instant> createdAt = _super.createdAt;

//inherited
public final NumberPath<Long> id = _super.id;

//inherited
public final DateTimePath<java.time.LocalDateTime> updatedAt = _super.updatedAt;
public final DateTimePath<java.time.Instant> updatedAt = _super.updatedAt;

public final com.daramg.server.user.domain.QUser user;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ public class QComposerPost extends EntityPathBase<ComposerPost> {
public final QComposer composer;

//inherited
public final DateTimePath<java.time.LocalDateTime> createdAt = _super.createdAt;
public final DateTimePath<java.time.Instant> createdAt = _super.createdAt;

//inherited
public final NumberPath<Long> id = _super.id;

public final com.daramg.server.post.domain.QPost post;

//inherited
public final DateTimePath<java.time.LocalDateTime> updatedAt = _super.updatedAt;
public final DateTimePath<java.time.Instant> updatedAt = _super.updatedAt;

public QComposerPost(String variable) {
this(ComposerPost.class, forVariable(variable), INITS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ public class QCurationPost extends EntityPathBase<CurationPost> {
public final StringPath content;

//inherited
public final DateTimePath<java.time.LocalDateTime> createdAt;
public final DateTimePath<java.time.Instant> createdAt;

//inherited
public final DateTimePath<java.time.LocalDateTime> deletedAt;
public final DateTimePath<java.time.Instant> deletedAt;

//inherited
public final ListPath<String, StringPath> hashtags;
Expand Down Expand Up @@ -65,14 +65,17 @@ public class QCurationPost extends EntityPathBase<CurationPost> {
public final StringPath title;

//inherited
public final DateTimePath<java.time.LocalDateTime> updatedAt;
public final DateTimePath<java.time.Instant> updatedAt;

// inherited
public final com.daramg.server.user.domain.QUser user;

//inherited
public final StringPath videoUrl;

//inherited
public final NumberPath<Integer> viewCount;

public QCurationPost(String variable) {
this(CurationPost.class, forVariable(variable), INITS);
}
Expand Down Expand Up @@ -108,6 +111,7 @@ public QCurationPost(Class<? extends CurationPost> type, PathMetadata metadata,
this.updatedAt = _super.updatedAt;
this.user = _super.user;
this.videoUrl = _super.videoUrl;
this.viewCount = _super.viewCount;
}

}
Expand Down
10 changes: 7 additions & 3 deletions src/main/generated/com/daramg/server/post/domain/QFreePost.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ public class QFreePost extends EntityPathBase<FreePost> {
public final StringPath content;

//inherited
public final DateTimePath<java.time.LocalDateTime> createdAt;
public final DateTimePath<java.time.Instant> createdAt;

//inherited
public final DateTimePath<java.time.LocalDateTime> deletedAt;
public final DateTimePath<java.time.Instant> deletedAt;

//inherited
public final ListPath<String, StringPath> hashtags;
Expand All @@ -61,14 +61,17 @@ public class QFreePost extends EntityPathBase<FreePost> {
public final StringPath title;

//inherited
public final DateTimePath<java.time.LocalDateTime> updatedAt;
public final DateTimePath<java.time.Instant> updatedAt;

// inherited
public final com.daramg.server.user.domain.QUser user;

//inherited
public final StringPath videoUrl;

//inherited
public final NumberPath<Integer> viewCount;

public QFreePost(String variable) {
this(FreePost.class, forVariable(variable), INITS);
}
Expand Down Expand Up @@ -103,6 +106,7 @@ public QFreePost(Class<? extends FreePost> type, PathMetadata metadata, PathInit
this.updatedAt = _super.updatedAt;
this.user = _super.user;
this.videoUrl = _super.videoUrl;
this.viewCount = _super.viewCount;
}

}
Expand Down
8 changes: 5 additions & 3 deletions src/main/generated/com/daramg/server/post/domain/QPost.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ public class QPost extends EntityPathBase<Post> {
public final StringPath content = createString("content");

//inherited
public final DateTimePath<java.time.LocalDateTime> createdAt = _super.createdAt;
public final DateTimePath<java.time.Instant> createdAt = _super.createdAt;

public final DateTimePath<java.time.LocalDateTime> deletedAt = createDateTime("deletedAt", java.time.LocalDateTime.class);
public final DateTimePath<java.time.Instant> deletedAt = createDateTime("deletedAt", java.time.Instant.class);

public final ListPath<String, StringPath> hashtags = this.<String, StringPath>createList("hashtags", String.class, StringPath.class, PathInits.DIRECT2);

Expand All @@ -51,12 +51,14 @@ public class QPost extends EntityPathBase<Post> {
public final StringPath title = createString("title");

//inherited
public final DateTimePath<java.time.LocalDateTime> updatedAt = _super.updatedAt;
public final DateTimePath<java.time.Instant> updatedAt = _super.updatedAt;

public final com.daramg.server.user.domain.QUser user;

public final StringPath videoUrl = createString("videoUrl");

public final NumberPath<Integer> viewCount = createNumber("viewCount", Integer.class);

public QPost(String variable) {
this(Post.class, forVariable(variable), INITS);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ public class QPostLike extends EntityPathBase<PostLike> {
public final com.daramg.server.common.domain.QBaseEntity _super = new com.daramg.server.common.domain.QBaseEntity(this);

//inherited
public final DateTimePath<java.time.LocalDateTime> createdAt = _super.createdAt;
public final DateTimePath<java.time.Instant> createdAt = _super.createdAt;

//inherited
public final NumberPath<Long> id = _super.id;

public final QPost post;

//inherited
public final DateTimePath<java.time.LocalDateTime> updatedAt = _super.updatedAt;
public final DateTimePath<java.time.Instant> updatedAt = _super.updatedAt;

public final com.daramg.server.user.domain.QUser user;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ public class QPostScrap extends EntityPathBase<PostScrap> {
public final com.daramg.server.common.domain.QBaseEntity _super = new com.daramg.server.common.domain.QBaseEntity(this);

//inherited
public final DateTimePath<java.time.LocalDateTime> createdAt = _super.createdAt;
public final DateTimePath<java.time.Instant> createdAt = _super.createdAt;

//inherited
public final NumberPath<Long> id = _super.id;

public final QPost post;

//inherited
public final DateTimePath<java.time.LocalDateTime> updatedAt = _super.updatedAt;
public final DateTimePath<java.time.Instant> updatedAt = _super.updatedAt;

public final com.daramg.server.user.domain.QUser user;

Expand Down
4 changes: 2 additions & 2 deletions src/main/generated/com/daramg/server/post/domain/QReport.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class QReport extends EntityPathBase<Report> {
public final com.daramg.server.comment.domain.QComment comment;

//inherited
public final DateTimePath<java.time.LocalDateTime> createdAt = _super.createdAt;
public final DateTimePath<java.time.Instant> createdAt = _super.createdAt;

//inherited
public final NumberPath<Long> id = _super.id;
Expand All @@ -45,7 +45,7 @@ public class QReport extends EntityPathBase<Report> {
public final EnumPath<Report.ReportType> type = createEnum("type", Report.ReportType.class);

//inherited
public final DateTimePath<java.time.LocalDateTime> updatedAt = _super.updatedAt;
public final DateTimePath<java.time.Instant> updatedAt = _super.updatedAt;

public QReport(String variable) {
this(Report.class, forVariable(variable), INITS);
Expand Down
10 changes: 7 additions & 3 deletions src/main/generated/com/daramg/server/post/domain/QStoryPost.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ public class QStoryPost extends EntityPathBase<StoryPost> {
public final StringPath content;

//inherited
public final DateTimePath<java.time.LocalDateTime> createdAt;
public final DateTimePath<java.time.Instant> createdAt;

//inherited
public final DateTimePath<java.time.LocalDateTime> deletedAt;
public final DateTimePath<java.time.Instant> deletedAt;

//inherited
public final ListPath<String, StringPath> hashtags;
Expand Down Expand Up @@ -63,14 +63,17 @@ public class QStoryPost extends EntityPathBase<StoryPost> {
public final StringPath title;

//inherited
public final DateTimePath<java.time.LocalDateTime> updatedAt;
public final DateTimePath<java.time.Instant> updatedAt;

// inherited
public final com.daramg.server.user.domain.QUser user;

//inherited
public final StringPath videoUrl;

//inherited
public final NumberPath<Integer> viewCount;

public QStoryPost(String variable) {
this(StoryPost.class, forVariable(variable), INITS);
}
Expand Down Expand Up @@ -106,6 +109,7 @@ public QStoryPost(Class<? extends StoryPost> type, PathMetadata metadata, PathIn
this.updatedAt = _super.updatedAt;
this.user = _super.user;
this.videoUrl = _super.videoUrl;
this.viewCount = _super.viewCount;
}

}
Expand Down
6 changes: 3 additions & 3 deletions src/main/generated/com/daramg/server/user/domain/QUser.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ public class QUser extends EntityPathBase<User> {
public final DatePath<java.time.LocalDate> birthDate = createDate("birthDate", java.time.LocalDate.class);

//inherited
public final DateTimePath<java.time.LocalDateTime> createdAt = _super.createdAt;
public final DateTimePath<java.time.Instant> createdAt = _super.createdAt;

public final DateTimePath<java.time.LocalDateTime> deletedAt = createDateTime("deletedAt", java.time.LocalDateTime.class);
public final DateTimePath<java.time.Instant> deletedAt = createDateTime("deletedAt", java.time.Instant.class);

public final StringPath email = createString("email");

Expand All @@ -51,7 +51,7 @@ public class QUser extends EntityPathBase<User> {
public final StringPath profileImage = createString("profileImage");

//inherited
public final DateTimePath<java.time.LocalDateTime> updatedAt = _super.updatedAt;
public final DateTimePath<java.time.Instant> updatedAt = _super.updatedAt;

public final EnumPath<UserStatus> userStatus = createEnum("userStatus", UserStatus.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class QUserFollow extends EntityPathBase<UserFollow> {
public final com.daramg.server.common.domain.QBaseEntity _super = new com.daramg.server.common.domain.QBaseEntity(this);

//inherited
public final DateTimePath<java.time.LocalDateTime> createdAt = _super.createdAt;
public final DateTimePath<java.time.Instant> createdAt = _super.createdAt;

public final QUser followed;

Expand All @@ -35,7 +35,7 @@ public class QUserFollow extends EntityPathBase<UserFollow> {
public final NumberPath<Long> id = _super.id;

//inherited
public final DateTimePath<java.time.LocalDateTime> updatedAt = _super.updatedAt;
public final DateTimePath<java.time.Instant> updatedAt = _super.updatedAt;

public QUserFollow(String variable) {
this(UserFollow.class, forVariable(variable), INITS);
Expand Down
9 changes: 0 additions & 9 deletions src/main/java/com/daramg/server/ServerApplication.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
package com.daramg.server;

import jakarta.annotation.PostConstruct;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.util.TimeZone;

@SpringBootApplication
public class ServerApplication {

@PostConstruct
void setTimeZone() {
TimeZone.setDefault(TimeZone.getTimeZone("Asia/Seoul"));
}

public static void main(String[] args) {
TimeZone.setDefault(TimeZone.getTimeZone("Asia/Seoul"));
SpringApplication.run(ServerApplication.class, args);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;

import java.time.LocalDateTime;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
import java.util.concurrent.TimeUnit;

@Service
Expand All @@ -45,7 +46,7 @@ public void signup(SignupRequestDto dto, MultipartFile image){
userRepository.findByEmailAndUserStatus(dto.getEmail(), UserStatus.DELETED)
.ifPresent(deletedUser -> {
if (deletedUser.getDeletedAt() != null
&& deletedUser.getDeletedAt().isAfter(LocalDateTime.now().minusDays(30))) {
&& deletedUser.getDeletedAt().isAfter(Instant.now().minus(30, ChronoUnit.DAYS))) {
throw new BusinessException(AuthErrorStatus.REJOIN_NOT_ALLOWED);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ public void deleteComment(Long commentId, User user){
}

comment.softDelete();
comment.getPost().decrementCommentCount();
commentLikeRepository.deleteAllByCommentId(commentId);
comment.resetLikeCount();
}
Expand Down
Loading
Loading