package com.usky.ids.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.usky.common.security.utils.SecurityUtils;
import com.usky.ids.domain.IdsParkMap;
import com.usky.ids.mapper.IdsParkMapMapper;
import com.usky.ids.service.IdsParkMapService;
import com.usky.common.mybatis.core.AbstractCrudService;
import com.usky.ids.service.util.HttpClientUtils;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author han
 * @since 2025-01-18
 */
@Service
public class IdsParkMapServiceImpl extends AbstractCrudService<IdsParkMapMapper, IdsParkMap> implements IdsParkMapService {
    @Override
    public Object mapList(){
        HashMap map = new HashMap();
        map.put("key", "A10001");
        map.put("timestamp", "20241231111111");
        map.put("version", "v3.20.0.2");
        map.put("sign", "f1c0a78dddb4f4591f04b32cc2151ea7");
        String resultString = HttpClientUtils.doPost("http://172.18.0.25:8180/mpgs/api/v3/parkingLot/getParkingLotInfo",map);
        JSONObject resultVO = JSONObject.parseObject(resultString);
        String resultData = resultVO.get("data").toString();
        JSONObject resultVO1 = JSONObject.parseObject(resultData);
        Object mapList = resultVO1.get("mapList");
        System.out.println(mapList);
        return mapList;
    }
}
