Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.

Commit

Permalink
Fix: mapper error
Browse files Browse the repository at this point in the history
  • Loading branch information
Catnap421 committed Jun 24, 2021
1 parent 59f1ecd commit f1690cc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public interface ReplyMapper extends EntityMapper<Reply, ReplyDto> {
@Mapping(target = "questionId", expression = "java(reply.getQuestion().getQuestionId())")
@Mapping(target = "requestedByAuthor", ignore = true)
@Mapping(target = "likedByRequester", ignore = true)
@Mapping(target = "accomplishedBadge", ignore = true)
ReplyDto.ReadOnly toDto(Reply reply);

@Mapping(target = "image", source = "reply.image")
Expand All @@ -25,6 +26,7 @@ public interface ReplyMapper extends EntityMapper<Reply, ReplyDto> {
@Mapping(target = "questionId", expression = "java(reply.getQuestion().getQuestionId())")
@Mapping(target = "requestedByAuthor", expression = "java(reply.isAuthor(loggedInMember))")
@Mapping(target = "likedByRequester", expression = "java(reply.likedByRequester(loggedInMember))")
@Mapping(target = "accomplishedBadge", ignore = true)
ReplyDto.ReadOnly toDto(Reply reply, Member loggedInMember);

@Mapping(target = "image", source = "reply.image")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package net.mureng.api.reply.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
Expand Down Expand Up @@ -74,6 +75,7 @@ public static class ReadOnly extends ReplyDto {
@JsonProperty(index = PropertyDisplayOrder.LIKED_BY_MEMBER)
private Boolean likedByRequester;

@JsonInclude(JsonInclude.Include.NON_EMPTY)
@ApiModelProperty(value = "μ‚¬μš©μžκ°€ νšλ“ν•œ 뱃지 번호",
accessMode = ApiModelProperty.AccessMode.READ_ONLY, position = PropertyDisplayOrder.ACCOMPLISHED_BADGE)
@JsonProperty(index = PropertyDisplayOrder.ACCOMPLISHED_BADGE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
public interface TodayExpressionMapper {

@Mapping(target = "scrappedByRequester", expression = "java(todayExpression.scrappedByRequester(loggedInMember))")
@Mapping(target = "accomplishedBadge", ignore = true)
TodayExpressionDto toDto(TodayExpression todayExpression, @Context Member loggedInMember);

@Mapping(target = "scrappedByRequester", expression = "java(todayExpression.scrappedByRequester(loggedInMember))")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package net.mureng.api.todayexpression.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
Expand Down Expand Up @@ -38,6 +39,7 @@ public class TodayExpressionDto {
@ApiModelProperty(value = "μš”μ²­μžμ˜ 슀크랩 μ—¬λΆ€", position = PropertyDisplayOrder.SCRAPPED_BY_REQUESTER)
private boolean scrappedByRequester;

@JsonInclude(JsonInclude.Include.NON_EMPTY)
@ApiModelProperty(value = "μ‚¬μš©μžκ°€ νšλ“ν•œ 뱃지 번호", position = PropertyDisplayOrder.ACCOMPLISHED_BADGE)
private Long accomplishedBadge;

Expand Down

0 comments on commit f1690cc

Please sign in to comment.