|
|
@@ -3,11 +3,13 @@ package com.izouma.awesomeadmin.service.impl;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.*;
|
|
|
|
|
|
+import com.izouma.awesomeadmin.beans.UserPlayTimes;
|
|
|
import com.izouma.awesomeadmin.dao.MemberCoinMapper;
|
|
|
import com.izouma.awesomeadmin.dao.SystemNoticeMapper;
|
|
|
import com.izouma.awesomeadmin.dao.UserInfoMapper;
|
|
|
import com.izouma.awesomeadmin.dto.Result;
|
|
|
import com.izouma.awesomeadmin.model.*;
|
|
|
+import com.izouma.awesomeadmin.service.SystemVariableService;
|
|
|
import com.izouma.awesomeadmin.util.PushUtil;
|
|
|
import org.apache.log4j.Logger;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -26,16 +28,15 @@ public class PlayerInfoServiceImpl implements PlayerInfoService {
|
|
|
private static Logger logger = Logger.getLogger(PlayerInfoServiceImpl.class);
|
|
|
|
|
|
@Autowired
|
|
|
- private PlayerInfoMapper playerInfoMapper;
|
|
|
-
|
|
|
+ private PlayerInfoMapper playerInfoMapper;
|
|
|
@Autowired
|
|
|
- private UserInfoMapper userInfoMapper;
|
|
|
-
|
|
|
+ private UserInfoMapper userInfoMapper;
|
|
|
@Autowired
|
|
|
- private MemberCoinMapper memberCoinMapper;
|
|
|
-
|
|
|
+ private MemberCoinMapper memberCoinMapper;
|
|
|
+ @Autowired
|
|
|
+ private SystemNoticeMapper systemNoticeMapper;
|
|
|
@Autowired
|
|
|
- private SystemNoticeMapper systemNoticeMapper;
|
|
|
+ private SystemVariableService systemVariableService;
|
|
|
|
|
|
@Override
|
|
|
public List<PlayerInfo> getPlayerInfoList(PlayerInfo record) {
|
|
|
@@ -212,6 +213,7 @@ public class PlayerInfoServiceImpl implements PlayerInfoService {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
@Override
|
|
|
public PlayerInfo seasonUserRank(PlayerInfo record) {
|
|
|
|
|
|
@@ -395,5 +397,21 @@ public class PlayerInfoServiceImpl implements PlayerInfoService {
|
|
|
|
|
|
return new Result(false, "领取失败");
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public UserPlayTimes getUserPlayTimes(Integer userId) {
|
|
|
+ logger.info("getUserPlayTimes");
|
|
|
+ try {
|
|
|
+ UserPlayTimes userPlayTimes = new UserPlayTimes();
|
|
|
+ userPlayTimes.setTotalNormal(Integer.parseInt(systemVariableService.get(AppConstant.SysConfig.JOIN_ROOMS_NORMAL)));
|
|
|
+ userPlayTimes.setTotalAdvanced(Integer.parseInt(systemVariableService.get(AppConstant.SysConfig.JOIN_ROOMS_ADVANCED)));
|
|
|
+ userPlayTimes.setUsedNormal(playerInfoMapper.queryTodayPlayTimes(userId, AppConstant.CompetitionType.NORMAL));
|
|
|
+ userPlayTimes.setUsedAdvanced(playerInfoMapper.queryTodayPlayTimes(userId, AppConstant.CompetitionType.ADVANCE));
|
|
|
+ return userPlayTimes;
|
|
|
+ } catch (Exception e) {
|
|
|
+ logger.error(e);
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
}
|
|
|
|