소스 검색

[游戏][修改]:游戏限制剩余次数回传

release_toaliyun_real
hupeng 7 년 전
부모
커밋
ca2c8d317c
1개의 변경된 파일12개의 추가작업 그리고 7개의 파일을 삭제
  1. +12
    -7
      mallinkService/src/main/java/com/iformall/service/impl/WxGameServiceImpl.java

+ 12
- 7
mallinkService/src/main/java/com/iformall/service/impl/WxGameServiceImpl.java 파일 보기

@@ -101,13 +101,18 @@ public class WxGameServiceImpl implements WxGameService {
wxGameActionLog.setUserId(userId);
wxGameActionLog.setGameId(gameId);

if (wxGame.getPlayLimit() != 0
&& wxGameActionLogMapper.getPlayCount(wxGameActionLog) > wxGame.getPlayLimit())
return new ResultData(ErrorCode.GAME_PLAY_HAS_BEEN_LIMITED);

if (wxGame.getAwardLimit() != 0
&& wxGameActionLogMapper.getAwardCount(wxGameActionLog) > wxGame.getAwardLimit())
return new ResultData(ErrorCode.GAME_AWARD_HAS_BEEN_LIMITED);
int playLimit = wxGame.getPlayLimit();
int AwardLimit = wxGame.getPlayLimit();
int playCount = wxGameActionLogMapper.getPlayCount(wxGameActionLog);
int AwardCount = wxGameActionLogMapper.getAwardCount(wxGameActionLog);

if ( playLimit != 0
&& playCount > playLimit)
return new ResultData(ErrorCode.GAME_PLAY_HAS_BEEN_LIMITED,playCount - playLimit );

if (AwardLimit != 0
&& AwardCount > AwardLimit)
return new ResultData(ErrorCode.GAME_AWARD_HAS_BEEN_LIMITED,AwardCount - AwardLimit);
return new ResultData();
}



불러오는 중...
취소
저장