|  | @@ -7,15 +7,13 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 | 
	
		
			
				|  |  |  import org.apache.commons.lang3.ObjectUtils;
 | 
	
		
			
				|  |  |  import org.apache.commons.lang3.StringUtils;
 | 
	
		
			
				|  |  |  import org.jeecg.common.api.vo.Result;
 | 
	
		
			
				|  |  | +import org.jeecg.common.constant.CommonConstant;
 | 
	
		
			
				|  |  |  import org.jeecg.common.util.DictAnnotationUtil;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.app.service.IGameService;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.app.vo.game.*;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.system.app.entity.AppInsure;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.system.app.entity.InsurePrice;
 | 
	
		
			
				|  |  | -import org.jeecg.modules.system.app.mapper.AppGameMapper;
 | 
	
		
			
				|  |  | -import org.jeecg.modules.system.app.mapper.AppGamePriceRulesMapper;
 | 
	
		
			
				|  |  | -import org.jeecg.modules.system.app.mapper.AppInsureMapper;
 | 
	
		
			
				|  |  | -import org.jeecg.modules.system.app.mapper.InsurePriceMapper;
 | 
	
		
			
				|  |  | +import org.jeecg.modules.system.app.mapper.*;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  |  import org.springframework.stereotype.Service;
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -42,6 +40,8 @@ public class GameServiceImpl  implements IGameService {
 | 
	
		
			
				|  |  |      private AppInsureMapper appInsureMapper;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      InsurePriceMapper insurePriceMapper;
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    private AppOrderMapper appOrderMapper;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Override
 | 
	
	
		
			
				|  | @@ -80,7 +80,10 @@ public class GameServiceImpl  implements IGameService {
 | 
	
		
			
				|  |  |              return Result.error("经纬度格式错误");
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          FindByIdResponse findByIdResponse =  appGameMapper.findById(id,longitudeNew,latitudeNew);
 | 
	
		
			
				|  |  | -        if (findByIdResponse!=null&&StringUtils.isNotEmpty(findByIdResponse.getBackgroundImage())){
 | 
	
		
			
				|  |  | +        if (findByIdResponse==null){
 | 
	
		
			
				|  |  | +            return Result.error("未查询到数据,请确认赛事是否存在");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if (StringUtils.isNotEmpty(findByIdResponse.getBackgroundImage())){
 | 
	
		
			
				|  |  |              List<String> backgroundImageList = new ArrayList<>();
 | 
	
		
			
				|  |  |              if (findByIdResponse.getBackgroundImage().indexOf(",")>0){
 | 
	
		
			
				|  |  |                  backgroundImageList= Arrays.asList(findByIdResponse.getBackgroundImage().split(","));
 | 
	
	
		
			
				|  | @@ -89,6 +92,17 @@ public class GameServiceImpl  implements IGameService {
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              findByIdResponse.setBackgroundImageList(backgroundImageList);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +        List<String> strings = new ArrayList<>();
 | 
	
		
			
				|  |  | +        if (findByIdResponse.getGamePriceRulesVOList()!=null&&!findByIdResponse.getGamePriceRulesVOList().isEmpty()){
 | 
	
		
			
				|  |  | +            for (GamePriceRulesVO gamePriceRulesVO : findByIdResponse.getGamePriceRulesVOList()) {
 | 
	
		
			
				|  |  | +                strings.add(gamePriceRulesVO.getId());
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        int orderNum = appOrderMapper.countTypeAndProductIds(strings, CommonConstant.ORDER_TYPE_1);
 | 
	
		
			
				|  |  | +        findByIdResponse.setOrderNum(orderNum);
 | 
	
		
			
				|  |  | +        List<GameOrderVo> gameOrderVoList = appOrderMapper.findByNewOrderInfo(strings,CommonConstant.ORDER_TYPE_1);
 | 
	
		
			
				|  |  | +        findByIdResponse.setGameOrderVoList(gameOrderVoList);
 | 
	
		
			
				|  |  |          return Result.OK(findByIdResponse);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 |