package org.dromara.zhishu.service.strategy;

import org.dromara.common.core.domain.R;
import org.dromara.common.core.exception.ServiceException;
import org.dromara.zhishu.domain.dto.request.OrderDeliveryKWRequest;
import org.dromara.zhishu.domain.dto.request.OrderDeliveryRequest;
import org.dromara.zhishu.domain.dto.response.LogisticsMethodResponse;
import org.dromara.zhishu.service.client.KfzClient;
import org.dromara.zhishu.util.InterfaceUtils;
import org.dromara.zhishu.util.UrlUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

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

@Service
public class OrderGFStrategy implements OrderStrategy {



    @Override
    public List<LogisticsMethodResponse> deliveryMethodList(Long shopId) {
        return null;
    }

    @Override
    public Boolean orderDelivery(OrderDeliveryRequest request) {
       return false;
    }

    @Override
    public Boolean syncKfzHistoryOrder(Long shopId, Integer days) {
        Map<String, String> orderParams = new HashMap<>();
        orderParams.put("shopId", shopId.toString());
        orderParams.put("days", days.toString());
        //访问go闲鱼服务
        String service = InterfaceUtils.postForm(UrlUtil.getgoofishServiceUrl(), "/huidiao/goofish/getAllGoofishOrderByDays", orderParams);
        System.out.println("service:"+service);

        return true;
    }
}
