开服冲榜,邮件内容

back_recharge
duhui 2022-11-17 14:26:39 +08:00
parent 0090f15645
commit fb0061f391
2 changed files with 7 additions and 9 deletions

View File

@ -1,8 +1,6 @@
package com.ljsd.jieling.handler.equip; package com.ljsd.jieling.handler.equip;
import com.ljsd.jieling.handler.BaseHandler; import com.ljsd.jieling.handler.BaseHandler;
import com.ljsd.jieling.logic.dao.UserManager;
import com.ljsd.jieling.logic.dao.root.User;
import com.ljsd.jieling.logic.hero.HeroLogic; import com.ljsd.jieling.logic.hero.HeroLogic;
import com.ljsd.jieling.network.session.ISession; import com.ljsd.jieling.network.session.ISession;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;

View File

@ -181,9 +181,9 @@ public class OpenServerCompeteRankActivity extends AbstractActivity {
final long count = score.longValue(); final long count = score.longValue();
AyyncWorker ayyncWorker = new AyyncWorker(user, true, user1 -> { AyyncWorker ayyncWorker = new AyyncWorker(user, true, user1 -> {
//sendmail //sendmail
String title = OpenServerCompeteRankActivity.this.getMailTitle(rankType); String title = getMailTitle(rankType);
String content = OpenServerCompeteRankActivity.this.getMailContent(rankType, count, rankId); String content = getMailContent(rankType, count, rankId);
String mailReward = ItemUtil.getMailReward(OpenServerCompeteRankActivity.this.getMailReward(rankType, rankId)); String mailReward = ItemUtil.getMailReward(getMailReward(rankType, rankId));
MailLogic.getInstance().sendMail(uid, title, content, mailReward, TimeUtils.nowInt(), Global.MAIL_EFFECTIVE_TIME); MailLogic.getInstance().sendMail(uid, title, content, mailReward, TimeUtils.nowInt(), Global.MAIL_EFFECTIVE_TIME);
//update activity //update activity
ActivityProgressInfo info = new ActivityProgressInfo(); ActivityProgressInfo info = new ActivityProgressInfo();
@ -221,14 +221,14 @@ public class OpenServerCompeteRankActivity extends AbstractActivity {
private String getMailTitle(int rankType){ private String getMailTitle(int rankType){
int mailTitle = SChongRankInfo.getMap().get(id).get(rankType).getMailTitle(); int mailTitle = SChongRankInfo.getMap().get(id).get(rankType).getMailTitle();
String msg = SErrorCodeEerverConfig.getMsgById(mailTitle); String key = SErrorCodeEerverConfig.errorMap.get(mailTitle).getkey();
return SErrorCodeEerverConfig.getI18NMessage(msg); return SErrorCodeEerverConfig.getI18NMessage(key);
} }
private String getMailContent(int rankType,long score,int rank){ private String getMailContent(int rankType,long score,int rank){
// 获取邮件内容格式 // 获取邮件内容格式
int mailText = SChongRankInfo.getMap().get(id).get(rankType).getMailText(); int mailText = SChongRankInfo.getMap().get(id).get(rankType).getMailText();
String msg = SErrorCodeEerverConfig.getMsgById(mailText); String key = SErrorCodeEerverConfig.errorMap.get(mailText).getkey();
// 分值 // 分值
String scoreStr = String.valueOf(score); String scoreStr = String.valueOf(score);
// 类型3主线编队排行榜的分数需要特殊处理 // 类型3主线编队排行榜的分数需要特殊处理
@ -237,7 +237,7 @@ public class OpenServerCompeteRankActivity extends AbstractActivity {
SMainLevelConfig config = SMainLevelConfig.getVirtualMap().get(id); SMainLevelConfig config = SMainLevelConfig.getVirtualMap().get(id);
scoreStr = config.getName(); scoreStr = config.getName();
} }
return SErrorCodeEerverConfig.getFormatMessage(msg, new Object[]{scoreStr,rank}); return SErrorCodeEerverConfig.getFormatMessage(key, new Object[]{scoreStr,rank});
} }