package com.yeejoin.amos.api.householdapi.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.api.householdapi.Utils.HttpUtils;
import com.yeejoin.amos.api.householdapi.face.model.HouseholdPvApiDto;
import com.yeejoin.amos.api.householdapi.face.service.impl.HouseholdPvApiServiceImpl;
import com.yeejoin.amos.api.householdapi.face.service.impl.HouseholdPvProducerInfoServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.jdbc.Null;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import rx.Producer;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.List;

/**
 * 户用光伏-厂商API haders
 *
 * @author system_generator
 * @date 2023-06-07
 */
@RestController
@Api(tags = "测试")
@RequestMapping(value = "/household-pv-api-test")
public class HouseholdPvApiTestController {
	@Autowired
	private HouseholdPvApiServiceImpl householdPvApiServiceImpl;
	@Autowired
	private HouseholdPvProducerInfoServiceImpl householdPvProducerInfoServiceImpl;
    /**
     * 新增户用光伏-厂商API haders
     *
     * @return
     */
    @TycloudOperation(ApiLevel = UserType.AGENCY)
    @PostMapping(value = "/Test")
    @ApiOperation(httpMethod = "get", value = "新增户用光伏-厂商API haders", notes = "新增户用光伏-厂商API haders")
    public ResponseModel<Null> save(@RequestParam Long seq) {
		HouseholdPvApiDto householdPvApiDto=householdPvApiServiceImpl.queryBySeq(seq);


       String result =HttpUtils.doPost(householdPvApiDto.getApiUrl(), "1");
		System.out.println(result);
        return null;
    }

}
