| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.Optional; |
| | | |
| | | /** |
| | | * Created by vincent on 3/15/2024 |
| | |
| | | @Autowired |
| | | private DictService dictService; |
| | | |
| | | public String getMapFloorList(Long userId) { |
| | | String floorKey = "map-floor-list"; |
| | | Dict dict = dictService.getOne(new LambdaQueryWrapper<Dict>().eq(Dict::getFlag, floorKey)); |
| | | return Optional.ofNullable(dict).map(Dict::getValue).orElse(null); |
| | | } |
| | | |
| | | public String getMapData(MapQueryParam param, Long userId) { |
| | | String mapKey = getMapKey(param.getFloor()); |
| | | Dict dict = dictService.getOne(new LambdaQueryWrapper<Dict>().eq(Dict::getFlag, mapKey)); |
| | | if (Cools.isEmpty(dict)) { |
| | | return null; |
| | | } else { |
| | | return dict.getValue(); |
| | | } |
| | | return Optional.ofNullable(dict).map(Dict::getValue).orElse(null); |
| | | } |
| | | |
| | | public void saveMapData(MapDataParam param, Long userId) { |