This commit is contained in:
whz 2024-05-31 11:04:06 +08:00
parent f6d6bc5062
commit 78f60238c1
3 changed files with 3 additions and 1 deletions

View File

@ -27,7 +27,7 @@ public class SiteController {
"tweet_web_ellipsis_size", 400, "tweet_web_ellipsis_size", 400,
"tweet_mobile_ellipsis_size", 300, "tweet_mobile_ellipsis_size", 300,
"default_tweet_visibility", "friend", "default_tweet_visibility", "friend",
"default_msg_loop_interval", 5000, "default_msg_loop_interval", 50000,
"copyright_top", "2023 paopao.info", "copyright_top", "2023 paopao.info",
"copyright_left", "Roc's Me", "copyright_left", "Roc's Me",
"copyright_left_link", "", "copyright_left_link", "",

View File

@ -8,6 +8,7 @@ import org.mapstruct.*;
public interface PostContentMapper { public interface PostContentMapper {
PostContent toEntity(PostContentDto postContentDto); PostContent toEntity(PostContentDto postContentDto);
@Mapping(source = "post.id", target = "postId")
PostContentDto toDto(PostContent postContent); PostContentDto toDto(PostContent postContent);
@BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE) @BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)

View File

@ -8,6 +8,7 @@ import org.mapstruct.*;
public interface PostMapper { public interface PostMapper {
Post toEntity(PostDto postDto); Post toEntity(PostDto postDto);
@Mapping(source = "user.id", target = "userId")
PostDto toDto(Post post); PostDto toDto(Post post);
@BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE) @BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)