package org.dromara.zhishu.service.impl;

import com.pdd.pop.sdk.common.util.JsonUtil;
import lombok.RequiredArgsConstructor;
import org.dromara.zhishu.domain.WarehouseSettingsAttribute;
import org.dromara.zhishu.service.IWarehouseSettingsAttributeService;
import org.dromara.zhishu.util.InterfaceUtils;
import org.dromara.zhishu.util.UrlUtil;
import org.springframework.stereotype.Service;

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

@RequiredArgsConstructor
@Service
public class WarehouseSettingsAttributeServiceImpl implements IWarehouseSettingsAttributeService {

    /**
     * 查询规则属性列表
     *
     * @param warehouseSettingsAttribute
     * @return
     */
    @Override
    public List selectList(WarehouseSettingsAttribute warehouseSettingsAttribute){
        Map params = new HashMap<>();
        String warehouseSettingsAttributeListStr = InterfaceUtils.getInterfaceGetWithParams(UrlUtil.getOrderServiceUrl(),"/api/warehouseSettingAttribute/getList",params);
        List warehouseSettingsAttributeList = JsonUtil.transferToObj(warehouseSettingsAttributeListStr,List.class);
        return warehouseSettingsAttributeList;
    }
}
