package com.tmerclub.cloud.systemtest.data.store;

import com.tmerclub.cloud.common.bean.BmapPoint;
import com.moyuer.cloud.delivery.dto.SameCityDTO;
import com.moyuer.cloud.systemtest.api.store.SameCityApi;

import java.util.ArrayList;
import java.util.List;

/**
 * @author lpj
 */
public class SameCityDtoData {
    public static SameCityDTO getSameCityDTO() {
        SameCityDTO sameCityDTO = new SameCityDTO();
        sameCityDTO.setChargeType(1);
        sameCityDTO.setDefaultDistance(0.0);
        sameCityDTO.setDeliveryFee(100L);
        sameCityDTO.setFreeWeight(1.0);
        sameCityDTO.setLat(22.943853);
        sameCityDTO.setLng(113.390465);
        sameCityDTO.setOverDistance(0.0);
        sameCityDTO.setOverDistanceFee(0L);
        sameCityDTO.setOverWeight(1.0);
        sameCityDTO.setOverWeightFee(100L);
        sameCityDTO.setPositionInfo(null);
        sameCityDTO.setSamecityId(SameCityApi.getSameCityInfo().getSamecityId());
        sameCityDTO.setShopId(SameCityApi.getSameCityInfo().getShopId());
        sameCityDTO.setStartFee(1L);
        sameCityDTO.setStatus(1);

        List<BmapPoint> polygonPath = new ArrayList<>();
        BmapPoint upperLeft = new BmapPoint();
        upperLeft.setLat(22.760551);
        upperLeft.setLng(113.199306);
        polygonPath.add(upperLeft);

        BmapPoint upperRight = new BmapPoint();
        upperRight.setLat(22.755218);
        upperRight.setLng(113.541955);
        polygonPath.add(upperRight);

        BmapPoint lowerLeft = new BmapPoint();
        lowerLeft.setLat(23.096059);
        lowerLeft.setLng(113.573001);
        polygonPath.add(lowerLeft);

        BmapPoint lowerRight = new BmapPoint();
        lowerRight.setLat(23.06095);
        lowerRight.setLng(113.161361);
        polygonPath.add(lowerRight);

        sameCityDTO.setPolygonPath(polygonPath);
        sameCityDTO.setPositionInfo("[{\"lat\":0.068656,\"lng\":44.169773},{\"lat\":40.685259,\"lng\":147.930527},{\"lat\":54.342124,\"lng\":166.916358},{\"lat\":53.909883,\"lng\":82.436151}]");

        return sameCityDTO;
    }
}
