Skip to content
Merged

D2M #152

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
7160c05
Merge pull request #144 from On-Survey/main
wonjuneee Apr 14, 2026
5fd6059
feat: 섀문응닡 μ™„λ£Œ μ‹œ ν™œμ„± μ„Ήμ…˜ μ™Έ 문항에 λŒ€ν•œ 응닡은 μ‚­μ œ
wonjuneee Apr 18, 2026
96280c4
fix: κΈ°λ³Έκ΅¬ν˜„ μ˜ˆμ™Έμ²˜λ¦¬ μΆ”κ°€ 및 λ¬Έν•­ μ„Ήμ…˜μ— NOT NULL μ œμ•½ μΆ”κ°€
wonjuneee Apr 18, 2026
2fa8383
mod: ν”„λ‘ νŠΈ λ³€μˆ˜ 넀이밍에 맞좘 ν•„λ“œλ„€μž„ λ³€κ²½
wonjuneee Apr 18, 2026
2694eb4
feat: ꡬ글폼 κ·Έλ¦¬λ“œ, μ‹œκ°„ μœ ν˜• λ¬Έν•­ λŒ€μ‘ νƒ€μž… κ΅¬ν˜„
wonjuneee Apr 18, 2026
54c778f
Merge pull request #145 from On-Survey/feat/OMF-307
wonjuneee Apr 21, 2026
28b9107
feat: μ„€λ¬Έ 쑰회/λ³€ν™˜ λ‘œμ§μ— κ·Έλ¦¬λ“œ, μ‹œκ°„ νƒ€μž… λ¬Έν•­ κ΅¬ν˜„
wonjuneee Apr 24, 2026
1ef21af
feat: μ„€λ¬Έ 응닡집계/제좜 λ‘œμ§μ— κ·Έλ¦¬λ“œ, μ‹œκ°„ νƒ€μž… λ¬Έν•­ κ΅¬ν˜„
wonjuneee Apr 24, 2026
ff1f4cf
chore: λ‘œκΉ… μˆ˜μ •
wonjuneee Apr 24, 2026
6fbf500
fix: μ½”λ“œλ¦¬λ·° 반영
wonjuneee Apr 24, 2026
1c50615
Merge branch 'develop' into feat/OMF-305
wonjuneee Apr 24, 2026
fe23444
Merge pull request #146 from On-Survey/feat/OMF-305
wonjuneee Apr 25, 2026
90a9207
feat: 섀문응닡 CSVλ³€ν™˜ 둜직 κ·Έλ¦¬λ“œ λ¬Έν•­ λŒ€μ‘
wonjuneee Apr 25, 2026
4b27880
fix: ν…ŒμŠ€νŠΈλ‘œ λˆ„λ½λœ where쑰건 볡ꡬ
wonjuneee Apr 25, 2026
c292d45
hotfix: μ—°λ ΉλŒ€ 계산 뢈일치 ν•΄κ²° (λ§Œλ‚˜μ΄, ν•œκ΅­λ‚˜μ΄)
KJaeKwan Apr 29, 2026
3d882eb
hotfix: μ—°λ ΉλŒ€ 계산 데이터 μΆ”μΆœμ—λ„ 반영
KJaeKwan Apr 29, 2026
5f37a2a
Merge pull request #147 from On-Survey/feat/OMF-312
wonjuneee Apr 30, 2026
3d661c1
feat(admin): add GET /v1/admin/surveys/{surveyId}/export endpoint
KJaeKwan May 4, 2026
c496912
feat(backoffice): add CSV download button to survey list
KJaeKwan May 4, 2026
6bb4596
test(admin): add unit tests for admin CSV export
KJaeKwan May 4, 2026
8ade311
refactor: admin μ „μš© csv μΆ”μΆœ ν•¨μˆ˜ 뢄리
KJaeKwan May 4, 2026
6545073
chore: test code μ‚­μ œ
KJaeKwan May 4, 2026
78c92fe
fix: μ–΄λ“œλ―Ό CSV 응닡에 μΊμ‹œ λ°©μ§€ 헀더 μΆ”κ°€
KJaeKwan May 4, 2026
d141e4c
Merge pull request #148 from On-Survey/feat/OMF-327
KJaeKwan May 4, 2026
3ae8957
fix: ν™ˆ κ²°μ œμ‹œ 코인 차감 둜직 제거
May 5, 2026
94174cd
Merge pull request #149 from On-Survey/feat/328
KJaeKwan May 5, 2026
5b9812e
docs: `QuestionDto` ν•˜μœ„νƒ€μž…μ΄ μ •μƒμ μœΌλ‘œ λ¬Έμ„œν™”λ˜μ§€ μ•ŠλŠ” ν˜„μƒ μˆ˜μ •
wonjuneee Apr 30, 2026
fc48c76
mod: λ°±μ˜€ν”ΌμŠ€ κ·Έλ¦¬λ“œ/μ‹œκ°„ λ¬Έν•­ λŒ€μ‘
wonjuneee May 2, 2026
e5aa7e1
fix: `isInterval` ν•„λ“œ nullable μ œμ•½ 제거
wonjuneee May 4, 2026
68619c1
fix: λ°±μ˜€ν”ΌμŠ€ ꡬ글폼 μœ νš¨μ„± 검사 μΆ”κ°€ 및 λ³€ν™˜λœ 섀문데이터가 λ‘œλ“œλ˜λ„λ‘ μˆ˜μ •
wonjuneee May 5, 2026
32ae625
feat: λ°±μ˜€ν”ΌμŠ€ κ·Έλ¦¬λ“œ, μ‹œκ°„ μœ ν˜• λ¬Έν•­ λ Œλ”λ§ κ΅¬ν˜„ 및 λ“œλž˜κ·Έμ•€λ“œλ‘­ κΈ°λŠ₯ μ΅œμ ν™”
wonjuneee May 5, 2026
11b09ff
chore: νΌλ³€ν™˜ μ‹€νŒ¨ λ‘œκΉ… 데이터 μΆ”κ°€
wonjuneee May 6, 2026
9df370d
mod: 제λͺ©, 이미지 문항은 전체 λ¬Έν•­ μˆ˜μ— μΉ΄μš΄νŠΈλ˜μ§€ μ•Šλ„λ‘ μˆ˜μ •
wonjuneee May 6, 2026
583806d
fix: CSV μΆ”μΆœ μ‹œ μ‘λ‹΅μž ν–‰ μˆœμ„œλ₯Ό 제좜 μ‹œμ (createdAt) κΈ°μ€€μœΌλ‘œ μ •λ ¬
KJaeKwan May 6, 2026
6d3d065
fix: μ½”λ“œλ¦¬λ·° 반영
wonjuneee May 6, 2026
c537dc2
fix: μ„€λ¬Έ μ†Œμœ μž λ³€κ²½ μ‹œ, `userKey`도 λ³€κ²½λ˜λ„λ‘ μˆ˜μ •
wonjuneee May 6, 2026
9e2a89c
fix: μ½”λ“œ 리뷰 반영
May 6, 2026
f18725e
Merge pull request #151 from On-Survey/feat/OMF-330
KJaeKwan May 7, 2026
09b2724
fix: findMembersWhoAnswered μ •λ ¬ 기쀀을 response.createdAt.asc()으둜 μˆ˜μ •
KJaeKwan May 7, 2026
73ee363
refactor: λ©”μ„œλ“œ 레벨 쀑볡 @Transactional 제거 및 buildCsv μ±…μž„ 뢄리
KJaeKwan May 7, 2026
546c156
Merge pull request #150 from On-Survey/feat/OMF-313
wonjuneee May 7, 2026
858fa77
Merge branch 'main' into develop
wonjuneee May 10, 2026
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
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ public SuccessResponse<String> changeSurveyOwner(
@PathVariable Long surveyId,
@RequestBody ChangeSurveyOwnerRequest request
) {
log.info("[ADMIN] μ„€λ¬Έ μ†Œμœ μž λ³€κ²½ μš”μ²­ - surveyId: {}, newMemberId: {}", surveyId, request.newMemberId());
log.info("[ADMIN] μ„€λ¬Έ μ†Œμœ μž λ³€κ²½ μš”μ²­ - surveyId: {}, memberId: {}, userKey: {}", surveyId, request.newMemberId(), request.newUserKey());

adminFacade.changeSurveyOwner(surveyId, request.newMemberId());
adminFacade.changeSurveyOwner(surveyId, request.newMemberId(), request.newUserKey());

return SuccessResponse.ok("μ„€λ¬Έ μ†Œμœ μžκ°€ λ³€κ²½λ˜μ—ˆμŠ΅λ‹ˆλ‹€.");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ public record QuestionDto(
String imageUrl,
ChoicePropDto choiceProperty,
RatingPropDto ratingProperty,
DatePropDto dateProperty
DatePropDto dateProperty,
GridPropDto gridProperty,
TimePropDto timeProperty
) {
public static QuestionDto from(SurveyQuestion vo) {
if (vo == null) return null;
Expand All @@ -91,7 +93,9 @@ public static QuestionDto from(SurveyQuestion vo) {
vo.imageUrl(),
ChoicePropDto.from(vo.choiceProperty()),
RatingPropDto.from(vo.ratingProperty()),
DatePropDto.from(vo.dateProperty())
DatePropDto.from(vo.dateProperty()),
GridPropDto.from(vo.gridProperty()),
TimePropDto.from(vo.timeProperty())
);
}

Expand All @@ -110,10 +114,10 @@ public static ChoicePropDto from(SurveyQuestion.ChoiceProp vo) {
return new ChoicePropDto(vo.maxChoice(), vo.hasCustomInput(), vo.hasNoneOption(), vo.isSectionDecidable(), optionDtos);
}

public record OptionDto(String content, Integer nextSection, String imageUrl) {
public record OptionDto(Long optionId, String content, Integer nextSection, String imageUrl) {
public static OptionDto from(SurveyQuestion.ChoiceProp.Option vo) {
if (vo == null) return null;
return new OptionDto(vo.content(), vo.nextSection(), vo.imageUrl());
return new OptionDto(vo.optionId(), vo.content(), vo.nextSection(), vo.imageUrl());
}
}
}
Expand All @@ -131,6 +135,35 @@ public static DatePropDto from(SurveyQuestion.DateProp vo) {
return new DatePropDto(vo.defaultDate());
}
}

public record TimePropDto(Boolean isInterval) {
public static TimePropDto from(SurveyQuestion.TimeProp vo) {
if (vo == null) return null;
return new TimePropDto(vo.isInterval());
}
}

public record GridPropDto(
Boolean isCheckbox,
Boolean isChoiceMixed,
Boolean isChoiceDistinct,
Set<GridOptionDto> gridOptions
) {
public static GridPropDto from(SurveyQuestion.GridProp vo) {
if (vo == null) return null;
Set<GridOptionDto> optionDtos = vo.gridOptions() != null
? vo.gridOptions().stream().map(GridOptionDto::from).collect(Collectors.toSet())
: Set.of();
return new GridPropDto(vo.isCheckbox(), vo.isChoiceMixed(), vo.isChoiceDistinct(), optionDtos);
}

public record GridOptionDto(Long gridOptionId, Boolean isRow, String content, Integer order) {
public static GridOptionDto from(SurveyQuestion.GridProp.GridOption vo) {
if (vo == null) return null;
return new GridOptionDto(vo.gridOptionId(), vo.isRow(), vo.content(), vo.order());
}
}
}
}

public record ScreeningDto(
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ public AdminSurveyDetailResponse getSurveyDetail(Long surveyId) {

@Override
@Transactional
public void changeSurveyOwner(Long surveyId, Long memberId) {
surveyPort.updateSurveyOwner(surveyId, memberId);
public void changeSurveyOwner(Long surveyId, Long memberId, Long userKey) {
surveyPort.updateSurveyOwner(surveyId, memberId, userKey);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ public record SurveyQuestion(

ChoiceProp choiceProperty,
RatingProp ratingProperty,
DateProp dateProperty
DateProp dateProperty,
GridProp gridProperty,
TimeProp timeProperty
) {
public record ChoiceProp (
Integer maxChoice,
Expand All @@ -29,6 +31,7 @@ public record ChoiceProp (
Set<Option> options
) {
public record Option (
Long optionId,
String content,
Integer nextSection,
String imageUrl
Expand All @@ -44,4 +47,23 @@ public record RatingProp (
public record DateProp (
LocalDate defaultDate
) {}

public record GridProp (
Boolean isCheckbox,
Boolean isChoiceMixed,
Boolean isChoiceDistinct,

Set<GridOption> gridOptions
) {
public record GridOption (
Long gridOptionId,
Boolean isRow,
String content,
Integer order
) {}
}

public record TimeProp (
Boolean isInterval
) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public interface AdminUseCase {

AdminSurveyDetailResponse getSurveyDetail(Long surveyId);

void changeSurveyOwner(Long surveyId, Long newMemberId);
void changeSurveyOwner(Long surveyId, Long newMemberId, Long newUserKey);

List<SurveyGrantStatsResponse> getSurveyGrantStats();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public interface SurveyPort {

List<SurveySection> findSurveySectionsById(Long surveyId);

void updateSurveyOwner(Long surveyId, Long newMemberId);
void updateSurveyOwner(Long surveyId, Long newMemberId, Long newUserKey);

List<OngoingSurveyView> findOngoingSurveys();
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,11 @@ public List<OngoingSurveyView> findOngoingSurveys() {
}

@Override
public void updateSurveyOwner(Long surveyId, Long memberId) {
public void updateSurveyOwner(Long surveyId, Long memberId, Long userKey) {
SurveyOwnerChangeDto changeDto = SurveyOwnerChangeDto.builder()
.surveyId(surveyId)
.newMemberId(memberId)
.newUserKey(userKey)
.build();

surveyCommandService.updateSurveyOwner(changeDto);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
import OneQ.OnSurvey.domain.admin.domain.model.survey.SurveyScreening;
import OneQ.OnSurvey.domain.admin.domain.model.survey.SurveySection;
import OneQ.OnSurvey.domain.admin.domain.model.survey.SurveySingleViewInfo;
import OneQ.OnSurvey.domain.question.model.dto.GridOptionDto;
import OneQ.OnSurvey.domain.question.model.dto.SectionDto;
import OneQ.OnSurvey.domain.question.model.dto.type.ChoiceDto;
import OneQ.OnSurvey.domain.question.model.dto.type.DateDto;
import OneQ.OnSurvey.domain.question.model.dto.type.DefaultQuestionDto;
import OneQ.OnSurvey.domain.question.model.dto.type.GridDto;
import OneQ.OnSurvey.domain.question.model.dto.type.RatingDto;
import OneQ.OnSurvey.domain.question.model.dto.type.TimeDto;
import OneQ.OnSurvey.domain.survey.model.SurveyStatus;
import OneQ.OnSurvey.domain.survey.model.dto.ScreeningViewData;
import OneQ.OnSurvey.domain.survey.model.dto.SurveyDetailData;
Expand Down Expand Up @@ -89,6 +92,7 @@ public static SurveyQuestion toSurveyQuestion(DefaultQuestionDto questionDto) {
choice.getIsSectionDecidable(),
choice.getOptions().stream()
.map(optionDto -> new SurveyQuestion.ChoiceProp.Option(
optionDto.getOptionId(),
optionDto.getContent(),
optionDto.getNextSection(),
optionDto.getImageUrl()
Expand Down Expand Up @@ -116,6 +120,33 @@ public static SurveyQuestion toSurveyQuestion(DefaultQuestionDto questionDto) {
)
).build();
}
case "GRID" -> {
GridDto grid = (GridDto) questionDto;
yield question.gridProperty(
new SurveyQuestion.GridProp(
grid.getIsCheckbox(),
grid.getIsChoiceMixed(),
grid.getIsChoiceDistinct(),
(grid.getGridOptions() != null ? grid.getGridOptions() : List.<GridOptionDto>of())
.stream()
.map(gridOptionDto -> new SurveyQuestion.GridProp.GridOption(
gridOptionDto.getGridOptionId(),
gridOptionDto.getIsRow(),
gridOptionDto.getContent(),
gridOptionDto.getOrder()
))
.collect(Collectors.toSet())
)
).build();
}
case "TIME" -> {
TimeDto time = (TimeDto) questionDto;
yield question.timeProperty(
new SurveyQuestion.TimeProp(
time.getIsInterval()
)
).build();
}
default -> question.build();
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,31 @@

@Getter @ToString
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Entity @Table(name = "question_answer")
@Entity @Table(name = "QUESTION_ANSWER")
public class QuestionAnswer extends AbstractAnswer {

@Column(name = "question_id")
@Column(name = "QUESTION_ID", nullable = false)
private Long questionId;

@Column(length = 512)
@Column(name = "GRID_ROW_ORDER")
private Integer gridRowOrder;

@Column(length = 512, nullable = false)
private String content;

@Builder
private QuestionAnswer(Long questionId, Long memberId, String content) {
private QuestionAnswer(Long questionId, Long memberId, Integer gridRowOrder, String content) {
this.questionId = questionId;
this.memberId = memberId;
this.gridRowOrder = gridRowOrder;
this.content = content;
}

public static QuestionAnswer from(AnswerInsertDto.AnswerInfo info) {
return QuestionAnswer.builder()
.questionId(info.getId())
.memberId(info.getMemberId())
.gridRowOrder(info.getGridRowOrder())
.content(info.getContent())
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@

@Getter @Builder
public class AnswerInsertDto {
List<AnswerInfo> answerInfoList;
private Integer section;
private List<AnswerInfo> answerInfoList;

@Getter @Builder
public static class AnswerInfo {
private Long id;
private Long memberId;
private Integer gridRowOrder;
// TODO: 응닡값을 List둜 받도둝 ν•˜μ—¬, 쀑볡선택 응닡 처리λ₯Ό 쉽도둝 μˆ˜μ • (μŠ€ν¬λ¦¬λ‹ 응닡은 단일 μ›μ†Œμ˜ 리슀트둜 받도둝)
private String content;

public Boolean getBooleanContent() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,21 @@

@Getter @AllArgsConstructor
public class AnswerStats {
Long questionId;
String content;
Long count;
private Long questionId;
private Integer gridRowOrder;
private String content;
private Long count;

public AnswerStats(Long questionId, String content, Long count) {
this.questionId = questionId;
this.gridRowOrder = null;
this.content = content;
this.count = count;
}

public AnswerStats(Long questionId, String content) {
this.questionId = questionId;
this.gridRowOrder = null;
this.content = content;
this.count = 1L;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package OneQ.OnSurvey.domain.participation.model.dto;

import lombok.Builder;

import java.util.List;

@Builder
public record ParticipationCompletionDto(
long surveyId,
long memberId,
long userKey,
List<Integer> visitedSectionList
) {
}
Loading
Loading