Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit 320b683

Browse files
committed
append rounds info innto introduction
1 parent 1869eaa commit 320b683

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/main/java/com/appirio/service/challengefeeder/manager/ChallengeDetailFeederManager.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,18 +139,23 @@ public void pushChallengeFeeder(ChallengeFeederParam param) throws SupplyExcepti
139139
for (ChallengeDetailData challenge : challenges) {
140140
String requirement = "";
141141
if ("DESIGN".equalsIgnoreCase(challenge.getTrack())) {
142-
if (challenge.getStudioDetailRequirements() != null)
142+
if (challenge.getStudioDetailRequirements() != null) {
143143
requirement = challenge.getStudioDetailRequirements();
144+
}
145+
146+
String introduction = challenge.getIntroduction() != null ? "" : challenge.getIntroduction();
144147
if (challenge.getRound1Introduction() != null) {
145-
if (!requirement.startsWith(challenge.getRound1Introduction())) {
146-
requirement += String.format(ROUND_HEADER_HTML, "1") + challenge.getRound1Introduction();
147-
requirement += "\n";
148+
if (challenge.getRound1Introduction() != null) {
149+
introduction += String.format(ROUND_HEADER_HTML, "1") + challenge.getRound1Introduction();
150+
introduction += "\n";
148151
}
149152
}
150153

151154
if (challenge.getRound2Introduction() != null) {
152-
requirement += String.format(ROUND_HEADER_HTML, "2") + challenge.getRound2Introduction();
155+
introduction += String.format(ROUND_HEADER_HTML, "2") + challenge.getRound2Introduction();
153156
}
157+
158+
challenge.setIntroduction(introduction);
154159
} else if ("DEVELOP_MARATHON_MATCH".equalsIgnoreCase(challenge.getSubTrack()) || "MARATHON_MATCH".equalsIgnoreCase(challenge.getSubTrack())) {
155160
if (challenge.getMarathonMatchDetailRequirements() != null) {
156161
requirement = challenge.getMarathonMatchDetailRequirements();

0 commit comments

Comments
 (0)