package com.fengqi.wechat.remote;

import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
import com.fengqi.wechat.entity.dto.AppGiftCodeDto;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;
//url = "http://172.16.55.39:8082"
@FeignClient(value = "manageClient", url = "${manage.uri}")
public interface ManageClient {

    @GetMapping("/manager/api/menu/getMenuTree")
    String getMenuList(@RequestParam("type")Integer type);

    @PostMapping("/manager/api/giftCode/v1/getCode")
    Map<String, Object> getCode(AppGiftCodeDto dto);

    @GetMapping("/manager/api/giftCode/v1/openid/{openid}")
    JSONObject getByOpenid(@PathVariable("openid") String openid);

    @GetMapping("/manager/api/gift/v1/{id}")
    Map<String, Object> getGift(@PathVariable("id") Integer id);

}
