Skip to content

Commit

Permalink
Merge pull request #475 from khoa-nd/master
Browse files Browse the repository at this point in the history
Merged
  • Loading branch information
khoa-nd committed Dec 24, 2015
2 parents b003916 + 6863749 commit 7a249b1
Showing 1 changed file with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public void sendEmailNotifyEmployerWhenPhaseClosed(ChallengeEntity challengeEnti
public void sendApplicationEmailToContestant(ChallengeEntity challengeEntity, ChallengeRegistrantEntity challengeRegistrantEntity) {
List<String> subjectVariableValues = Arrays.asList(challengeEntity.getChallengeName());
String recipientAddresses = challengeRegistrantEntity.getRegistrantEmail();
String templateName = EmailTemplateNameEnum.CHALLENGE_CONFIRM_ON_JOIN_INTERNAL_CHALLENGE.name();
String templateName = EmailTemplateNameEnum.CHALLENGE_CONFIRM_USER_ON_JOIN_CHALLENGE.name();
if (challengeEntity.getChallengeType() == ChallengeTypeEnum.INTERNAL) {
templateName = EmailTemplateNameEnum.CHALLENGE_CONFIRM_ON_JOIN_INTERNAL_CHALLENGE.name();
}
Expand Down Expand Up @@ -372,15 +372,12 @@ private Map<String, Object> buildConfirmUserJoinChallengeEmailTemplateModel(
templateModel.put("challengeId", String.valueOf(challengeEntity.getChallengeId()));
templateModel.put("challengeNameAlias", challengeEntity.getChallengeName().replaceAll("\\W", "-"));

// if (challengeEntity.getChallengeType() == ChallengeTypeEnum.INTERNAL) {
// final int MIN_RANDOM_SEED_NUMBER = 1000;
// final int MAX_RANDOM_SEED_NUMBER = 9999;
// templateModel.put("passCode", DataUtils.getRandomNumberInRange(MIN_RANDOM_SEED_NUMBER, MAX_RANDOM_SEED_NUMBER));
// }

final int MIN_RANDOM_SEED_NUMBER = 1000;
final int MAX_RANDOM_SEED_NUMBER = 9999;
templateModel.put("passCode", String.valueOf(DataUtils.getRandomNumberInRange(MIN_RANDOM_SEED_NUMBER, MAX_RANDOM_SEED_NUMBER)));
if (challengeEntity.getChallengeType() == ChallengeTypeEnum.INTERNAL) {
final int MIN_RANDOM_SEED_NUMBER = 1000;
final int MAX_RANDOM_SEED_NUMBER = 9999;
templateModel.put("passCode", DataUtils.getRandomNumberInRange(MIN_RANDOM_SEED_NUMBER, MAX_RANDOM_SEED_NUMBER));
}

return templateModel;
}

Expand Down

0 comments on commit 7a249b1

Please sign in to comment.