|
|
|
|
@ -27,6 +27,7 @@ import org.springblade.modules.business.vo.*; |
|
|
|
|
import org.springblade.modules.job.CarInfoTask; |
|
|
|
|
import org.springblade.upload.entity.PocBusLineImg; |
|
|
|
|
import org.springblade.upload.mapper.ProBusLineImgMapper; |
|
|
|
|
import org.springblade.upload.service.IProBusLineImgService; |
|
|
|
|
import org.springframework.data.redis.core.RedisTemplate; |
|
|
|
|
import org.springframework.util.CollectionUtils; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
@ -59,8 +60,9 @@ public class CommonApiController extends BladeController { |
|
|
|
|
|
|
|
|
|
private final IStationHintService stationHintService; |
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
ProBusLineImgMapper proBusLineImgMapper; |
|
|
|
|
|
|
|
|
|
private final IProBusLineImgService proBusLineImgService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 设置车牌号 |
|
|
|
|
@ -436,11 +438,8 @@ public class CommonApiController extends BladeController { |
|
|
|
|
resultMap.put("scenicData", busLine.getScenic()); |
|
|
|
|
resultMap.put("speed",info.getSpeed()); |
|
|
|
|
List<BusLine> busLineList = stationHintService.getBusLineByName(nextSite.getSname()); |
|
|
|
|
QueryWrapper<PocBusLineImg> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.select("img_url","img_type"); |
|
|
|
|
queryWrapper.eq("bus_line_id",busLineList.get(0).getId()); |
|
|
|
|
ArrayList<imgVo> imgList = getImgVos(queryWrapper); |
|
|
|
|
redisTemplate.opsForValue().set("imgList-info", imgList); |
|
|
|
|
List<imgVo> imgList = proBusLineImgService.getImgByid(busLineList.get(0).getId()); |
|
|
|
|
redisTemplate.opsForValue().set("imgList-info", imgList); |
|
|
|
|
resultMap.put("imgData", imgList); |
|
|
|
|
} |
|
|
|
|
//定时任务缓存
|
|
|
|
|
@ -448,19 +447,5 @@ public class CommonApiController extends BladeController { |
|
|
|
|
return R.data(resultMap); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@NotNull |
|
|
|
|
private ArrayList<imgVo> getImgVos(QueryWrapper<PocBusLineImg> queryWrapper) { |
|
|
|
|
List<PocBusLineImg> pocBusLineImgs = proBusLineImgMapper.selectList(queryWrapper); |
|
|
|
|
ArrayList<imgVo> imgList = new ArrayList<>(); |
|
|
|
|
for(PocBusLineImg pocBusLineImg : pocBusLineImgs){ |
|
|
|
|
imgVo img = new imgVo(); |
|
|
|
|
img.setImgUrl(pocBusLineImg.getImgUrl()); |
|
|
|
|
img.setImgType(pocBusLineImg.getImgType()); |
|
|
|
|
img.setBusLineId(pocBusLineImg.getBusLineId()); |
|
|
|
|
imgList.add(img); |
|
|
|
|
} |
|
|
|
|
return imgList; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|