全部游戏列表
This commit is contained in:
@@ -17,7 +17,7 @@ import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import static com.accompany.common.constant.Constant.SysConfId.*;
|
||||
import static com.accompany.common.constant.GameConstant.GameChannel.*;
|
||||
|
||||
@Api(tags = "游戏配置", value = "游戏配置")
|
||||
@RestController
|
||||
@@ -59,7 +59,7 @@ public class GameAdminController extends BaseController {
|
||||
gameConfigVO.setGameName(GameService.ALL);
|
||||
resultList.add(gameConfigVO);
|
||||
|
||||
List<GameConfigVO> joyPlayList = gameService.getAllConfigGameList(JOY_PLAY_GAME);
|
||||
List<GameConfigVO> joyPlayList = gameService.getAllConfigGameList(JOYPLAY.name());
|
||||
if (CollectionUtils.isNotEmpty(joyPlayList)) {
|
||||
for (GameConfigVO configVO : joyPlayList) {
|
||||
if (gameConfigVO.getGameName().trim().contains("全部")) {
|
||||
@@ -69,7 +69,7 @@ public class GameAdminController extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
List<GameConfigVO> leaderccList = gameService.getAllConfigGameList(LEADERCC_GAME);
|
||||
List<GameConfigVO> leaderccList = gameService.getAllConfigGameList(LEADERCC.name());
|
||||
if (CollectionUtils.isNotEmpty(leaderccList)) {
|
||||
for (GameConfigVO configVO : leaderccList) {
|
||||
if (gameConfigVO.getGameName().trim().contains("全部")) {
|
||||
@@ -79,7 +79,7 @@ public class GameAdminController extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
List<GameConfigVO> baishunList = gameService.getAllConfigGameList(BAISHUN_GAME);
|
||||
List<GameConfigVO> baishunList = gameService.getAllConfigGameList(BAISHUN.name());
|
||||
if (CollectionUtils.isNotEmpty(baishunList)) {
|
||||
for (GameConfigVO configVO : baishunList) {
|
||||
if (gameConfigVO.getGameName().trim().contains("全部")) {
|
||||
|
@@ -84,12 +84,12 @@ public class GameService {
|
||||
String tokenCache = getToketBuket(leaderccMiniGameConfig.getAppId(), uid).get();
|
||||
String sign = param.getSign();
|
||||
if (StringUtils.isEmpty(tokenCache) || (!tokenCache.equals(token))) {
|
||||
log.info("checkTokenAndSignForInfo.tokenError, token:{} param:{}", token, JSONObject.toJSONString(param));
|
||||
log.info("checkTokenAndSignForInfo.tokenError, token:{} param:{}" , token, JSONObject.toJSONString(param));
|
||||
return 1;
|
||||
}
|
||||
String currSign = DigestUtils.md5Hex(param.getGameId().toString() + uid + token + param.getRoomId() + key).toLowerCase();
|
||||
if (!currSign.equals(sign)) {
|
||||
log.info("checkTokenAndSignForInfo.signError, currSign:{},param:{}", currSign, JSONObject.toJSONString(param));
|
||||
log.info("checkTokenAndSignForInfo.signError, currSign:{},param:{}" , currSign, JSONObject.toJSONString(param));
|
||||
return 2;
|
||||
}
|
||||
if (!this.checkGameId(param.getGameId())) {
|
||||
@@ -122,13 +122,13 @@ public class GameService {
|
||||
String tokenCache = getToketBuket(leaderccMiniGameConfig.getAppId(), uid).get();
|
||||
String sign = param.getSign();
|
||||
if (StringUtils.isEmpty(tokenCache) || (!tokenCache.equals(token))) {
|
||||
log.info("checkTokenAndSignForGold.tokenError, token:{} param:{}", token, JSONObject.toJSONString(param));
|
||||
log.info("checkTokenAndSignForGold.tokenError, token:{} param:{}" , token, JSONObject.toJSONString(param));
|
||||
return 1;
|
||||
}
|
||||
String currSign = DigestUtils.md5Hex(param.getOrderId().toString()+ param.getGameId() + param.getRoundId()
|
||||
String currSign = DigestUtils.md5Hex(param.getOrderId().toString() + param.getGameId() + param.getRoundId()
|
||||
+ uid + param.getCoin() + param.getType() + token + param.getWinId() + param.getRoomId() + key).toLowerCase();
|
||||
if (!currSign.equals(sign)) {
|
||||
log.info("checkTokenAndSignForInfo.signError, currSign:{},param:{}", currSign, JSONObject.toJSONString(param));
|
||||
log.info("checkTokenAndSignForInfo.signError, currSign:{},param:{}" , currSign, JSONObject.toJSONString(param));
|
||||
return 2;
|
||||
}
|
||||
if (!this.checkGameId(param.getGameId())) {
|
||||
@@ -176,7 +176,7 @@ public class GameService {
|
||||
if (param.getType() == Constant.GameGoldType.REDUCT) {
|
||||
// 扣减用户钻石
|
||||
afterPurse = userPurseService.subDiamond(uid, param.getCoin().doubleValue(), BillObjTypeEnum.LEADERCC_GAME_OUT,
|
||||
(up)-> billRecordService.insertGeneralBillRecord(uid, param.getOrderId(), BillObjTypeEnum.LEADERCC_GAME_OUT, param.getCoin().doubleValue(), up));
|
||||
(up) -> billRecordService.insertGeneralBillRecord(uid, param.getOrderId(), BillObjTypeEnum.LEADERCC_GAME_OUT, param.getCoin().doubleValue(), up));
|
||||
}
|
||||
|
||||
gameMsgMessage.setRoomUid(log.getRoomUid());
|
||||
@@ -192,7 +192,7 @@ public class GameService {
|
||||
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("coin", afterPurse.getDiamonds().longValue());
|
||||
jsonObject.put("coin" , afterPurse.getDiamonds().longValue());
|
||||
return new GameResponseVO<>(jsonObject);
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ public class GameService {
|
||||
gameConfigVOS = JSONObject.parseArray(confValueById, GameConfigVO.class);
|
||||
}
|
||||
}
|
||||
if (org.springframework.util.CollectionUtils.isEmpty(gameConfigVOS)) {
|
||||
if (CollectionUtils.isEmpty(gameConfigVOS)) {
|
||||
return EMPTY_LIST;
|
||||
}
|
||||
for (GameConfigVO gameConfigVO : gameConfigVOS) {
|
||||
|
Reference in New Issue
Block a user