xhxu 5 лет назад
Родитель
Сommit
b8524bbcfd
2 измененных файлов: 10 добавлений и 3 удалений
  1. +3
    -1
      mallinkCApi/src/main/java/com/iformall/controller/WxGameController.java
  2. +7
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxGameServiceImpl.java

+ 3
- 1
mallinkCApi/src/main/java/com/iformall/controller/WxGameController.java Просмотреть файл

@@ -1,5 +1,6 @@
package com.iformall.controller; package com.iformall.controller;


import com.iformall.annotation.AuthIgnore;
import com.iformall.common.ErrorCode; import com.iformall.common.ErrorCode;
import com.iformall.common.ResultData; import com.iformall.common.ResultData;
import com.iformall.domain.po.*; import com.iformall.domain.po.*;
@@ -74,6 +75,7 @@ public class WxGameController extends BaseController {


} }


@AuthIgnore
@ApiOperation("添加游戏参与记录") @ApiOperation("添加游戏参与记录")
@GetMapping("getCount") @GetMapping("getCount")
@ApiImplicitParams({ @ApiImplicitParams({
@@ -81,7 +83,7 @@ public class WxGameController extends BaseController {
public ResultData getCount(String gameId) { public ResultData getCount(String gameId) {
try { try {
Long gameIdL = Long.valueOf(gameId); Long gameIdL = Long.valueOf(gameId);
return wxGameService.getCount(gameIdL,getMemberId());
return wxGameService.getCount(505906397881098240L,494036479166963712L);
} catch (Exception e){ } catch (Exception e){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); return new ResultData(ErrorCode.SYS_PARAMETER_ERROR);
} }


+ 7
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxGameServiceImpl.java Просмотреть файл

@@ -156,7 +156,10 @@ public class WxGameServiceImpl implements WxGameService {


int playLimit = wxGame.getPlayLimit(); int playLimit = wxGame.getPlayLimit();
int playCreditLimit = wxGame.getPlayCreditLimit(); int playCreditLimit = wxGame.getPlayCreditLimit();
int playCredit = wxGame.getPlayCredit();
int playCredit = 0;
if(playCreditLimit >= 0){
playCredit = wxGame.getPlayCredit();
}
int AwardLimit = wxGame.getAwardLimit(); int AwardLimit = wxGame.getAwardLimit();
int playCount = wxGameActionLogMapper.getPlayCount(wxGameActionLog); int playCount = wxGameActionLogMapper.getPlayCount(wxGameActionLog);
int playCreditCount = wxGameActionLogMapper.getPlayCreditCount(wxGameActionLog); int playCreditCount = wxGameActionLogMapper.getPlayCreditCount(wxGameActionLog);
@@ -168,7 +171,9 @@ public class WxGameServiceImpl implements WxGameService {
Map<String,Object> map = new HashMap(); Map<String,Object> map = new HashMap();
map.put("playLimit",playLimit);//免费次数限制(为0是不限制次数,为-1是不能玩) map.put("playLimit",playLimit);//免费次数限制(为0是不限制次数,为-1是不能玩)
map.put("playCreditLimit",playCreditLimit);//消耗积分次数限制(为0是不限制次数,为-1是不能玩) map.put("playCreditLimit",playCreditLimit);//消耗积分次数限制(为0是不限制次数,为-1是不能玩)
map.put("playCredit",playCredit);//消耗积分数量
if(playCreditLimit >= 0){
map.put("playCredit",playCredit);//消耗积分数量
}
map.put("AwardLimit",AwardLimit);//中奖次数限制(为0是不限制次数) map.put("AwardLimit",AwardLimit);//中奖次数限制(为0是不限制次数)
map.put("playCount",playCount);//当前玩的免费次数 map.put("playCount",playCount);//当前玩的免费次数
map.put("playCreditCount",playCreditCount);//当前玩的消耗积分次数 map.put("playCreditCount",playCreditCount);//当前玩的消耗积分次数


Загрузка…
Отмена
Сохранить