|
@@ -3,8 +3,10 @@ package com.game.business.controller;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.game.business.domain.AppGameItem;
|
|
import com.game.business.domain.AppGameItem;
|
|
|
|
+import com.game.business.domain.AppGameItemMultiple;
|
|
import com.game.business.domain.AppGameLottery;
|
|
import com.game.business.domain.AppGameLottery;
|
|
import com.game.business.dto.AppUserDTO;
|
|
import com.game.business.dto.AppUserDTO;
|
|
|
|
+import com.game.business.service.IAppGameItemMultipleService;
|
|
import com.game.business.service.IAppGameItemService;
|
|
import com.game.business.service.IAppGameItemService;
|
|
import com.game.business.service.IAppGameLotteryService;
|
|
import com.game.business.service.IAppGameLotteryService;
|
|
import com.game.business.service.IAppGameService;
|
|
import com.game.business.service.IAppGameService;
|
|
@@ -31,10 +33,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
-import java.util.ArrayList;
|
|
|
|
-import java.util.Date;
|
|
|
|
-import java.util.List;
|
|
|
|
-import java.util.Map;
|
|
|
|
|
|
+import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@RestController
|
|
@RestController
|
|
@@ -54,6 +53,9 @@ public class AppGameLotteryController extends BaseController{
|
|
@Autowired
|
|
@Autowired
|
|
private AppGameLotteryTask appGameLotteryTask;
|
|
private AppGameLotteryTask appGameLotteryTask;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private IAppGameItemMultipleService appGameItemMultipleService;
|
|
|
|
+
|
|
@PostMapping(value = "/list")
|
|
@PostMapping(value = "/list")
|
|
@ApiOperation(value = "游戏开奖记录", notes = "游戏开奖记录")
|
|
@ApiOperation(value = "游戏开奖记录", notes = "游戏开奖记录")
|
|
public HttpRetPageArr<AppGameLotteryVO> getListByGameId(@RequestParam(name = "gameId") Long gameId, @RequestParam(name= "gameDate", required = false) String gameDate
|
|
public HttpRetPageArr<AppGameLotteryVO> getListByGameId(@RequestParam(name = "gameId") Long gameId, @RequestParam(name= "gameDate", required = false) String gameDate
|
|
@@ -86,18 +88,35 @@ public class AppGameLotteryController extends BaseController{
|
|
|
|
|
|
if(StringUtils.isNotBlank(appGameLotteryVO.getGameLotterySucc())){
|
|
if(StringUtils.isNotBlank(appGameLotteryVO.getGameLotterySucc())){
|
|
|
|
|
|
- String [] itmeArr = appGameLotteryVO.getGameLotterySucc().split(",");
|
|
|
|
String itemName = "";
|
|
String itemName = "";
|
|
String itemMultiple = "";
|
|
String itemMultiple = "";
|
|
|
|
+ List<String> multipleList = new ArrayList<>();
|
|
|
|
+
|
|
|
|
+ AppGameItemMultiple appGameItemMultiple = appGameItemMultipleService.getAppGameItemMultiple(appGameLottery.getGameId(), appGameLottery.getGameDate());
|
|
|
|
+ if(appGameItemMultiple != null){
|
|
|
|
+ multipleList = Arrays.asList(appGameItemMultiple.getItemMultiple().split(","));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ String [] itmeArr = appGameLotteryVO.getGameLotterySucc().split(",");
|
|
|
|
+
|
|
for (int j = 0; j < itmeArr.length; j++) {
|
|
for (int j = 0; j < itmeArr.length; j++) {
|
|
String item = itmeArr[j];
|
|
String item = itmeArr[j];
|
|
if(codeItmeMap.containsKey(item)){
|
|
if(codeItmeMap.containsKey(item)){
|
|
if(StringUtils.isNotBlank(itemName)){
|
|
if(StringUtils.isNotBlank(itemName)){
|
|
itemName += "," + codeItmeMap.get(item).get(0).getItemName();
|
|
itemName += "," + codeItmeMap.get(item).get(0).getItemName();
|
|
- itemMultiple += "," + codeItmeMap.get(item).get(0).getItemMultiple();
|
|
|
|
|
|
+ if(!multipleList.isEmpty()){
|
|
|
|
+ itemMultiple += "," + multipleList.get(Integer.parseInt(item));
|
|
|
|
+ }else{
|
|
|
|
+ itemMultiple += "," + codeItmeMap.get(item).get(0).getItemMultiple();
|
|
|
|
+ }
|
|
}else{
|
|
}else{
|
|
itemName += codeItmeMap.get(item).get(0).getItemName();
|
|
itemName += codeItmeMap.get(item).get(0).getItemName();
|
|
- itemMultiple += codeItmeMap.get(item).get(0).getItemMultiple();
|
|
|
|
|
|
+
|
|
|
|
+ if(!multipleList.isEmpty()){
|
|
|
|
+ itemMultiple += multipleList.get(Integer.parseInt(item));
|
|
|
|
+ }else{
|
|
|
|
+ itemMultiple += codeItmeMap.get(item).get(0).getItemMultiple();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|