|
|
@@ -207,7 +207,7 @@ public class HouseInfoServiceImpl implements HouseInfoService {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- // Competition competition = competitionService.getCompetitionById(record.getCompetitionId().toString());
|
|
|
+ Competition competition = competitionService.getCompetitionById(record.getCompetitionId().toString());
|
|
|
|
|
|
for (PlayerInfo playerInfo : playerInfos) {
|
|
|
double rankRate = playerInfo.getRank() * 100 / (double) playerInfos.size();
|
|
|
@@ -231,9 +231,22 @@ public class HouseInfoServiceImpl implements HouseInfoService {
|
|
|
playerInfo.setPoints(new BigDecimal(points));
|
|
|
playerInfo.setHouseRank(playerInfo.getRank());
|
|
|
|
|
|
- String content = "你在" + DateTimeTool.dateTimeToTimeYYYYHHmmStr(houseInfo.getBeginTime())
|
|
|
- + "开始的比赛\"" + houseInfo.getHouseName() + "\"中获得了第" + playerInfo.getHouseRank()
|
|
|
- + "名," + (points >= 0 ? "获得" : "扣除") + Math.abs(points) + "积分。";
|
|
|
+ String content;
|
|
|
+ if (playerInfo.getResultError()) {
|
|
|
+ content = "你在" + DateTimeTool.dateTimeToTimeYYYYHHmmStr(houseInfo.getBeginTime())
|
|
|
+ + "开始的游戏竞赛 " + competition.getCompetitionName() + " - " + houseInfo.getHouseName()
|
|
|
+ + "无有效结果,积分" + (points >= 0 ? "+" : "-") + Math.abs(points)
|
|
|
+ + ",你可以点击下方的申诉按钮提交本次战绩截图信息,客服人员会及时为您处理。";
|
|
|
+ } else if (playerInfo.getDataError() || !playerInfo.getPlayed()) {
|
|
|
+ content = "很遗憾,在" + DateTimeTool.dateTimeToTimeYYYYHHmmStr(houseInfo.getBeginTime())
|
|
|
+ + "开始的游戏竞赛 " + competition.getCompetitionName() + " - " + houseInfo.getHouseName()
|
|
|
+ + "系统检测到你的游戏数据异常,积分" + (points >= 0 ? "+" : "-") + Math.abs(points);
|
|
|
+ } else {
|
|
|
+ content = "你在" + DateTimeTool.dateTimeToTimeYYYYHHmmStr(houseInfo.getBeginTime())
|
|
|
+ + "开始的游戏竞赛 " + competition.getCompetitionName() + " - " + houseInfo.getHouseName()
|
|
|
+ + "中获得了第" + playerInfo.getHouseRank() + "名,积分" + (points >= 0 ? "+" : "-") + Math.abs(points);
|
|
|
+ }
|
|
|
+
|
|
|
SystemNotice systemNotice = new SystemNotice();
|
|
|
systemNotice.setGameId(playerInfo.getGameId());
|
|
|
systemNotice.setHouseId(playerInfo.getHouseId());
|
|
|
@@ -288,6 +301,16 @@ public class HouseInfoServiceImpl implements HouseInfoService {
|
|
|
private void cloneHouse(HouseInfo source) {
|
|
|
logger.info("cloneHouse");
|
|
|
try {
|
|
|
+ Competition competition = competitionService.getCompetitionById(source.getCompetitionId().toString());
|
|
|
+ if (competition == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (competition.getEndTime() != null && competition.getEndTime().before(new Date())) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (competition.getStatus() == AppConstant.CompetitionStatus.END) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
HouseInfo houseInfo = (HouseInfo) source.clone();
|
|
|
houseInfo.setId(null);
|
|
|
houseInfo.setStatusFlag(AppConstant.HouseStatus.WAIT);
|