package com.miaxis.feign.service;


import com.miaxis.common.config.FeignConfig;
import com.miaxis.feign.dto.ToutiaoCreatOrderDTO;
import com.miaxis.feign.dto.ToutiaoTokenDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 *
 * 头条
 */
@FeignClient(name="ttService",
        url = "https://developer.toutiao.com",configuration = FeignConfig.class)
@Component
public interface ToutiaoService {
    /**
     *  获取openid
     * @return
     */
    @PostMapping(value = "/api/apps/v2/jscode2session")
    String getTtUserInfo(@RequestBody ToutiaoTokenDTO toutiaoTokenDTO);

    /**
     *  预下单
     * @return
     */
    @PostMapping(value = "/api/apps/ecpay/v1/create_order")
    String createOrder(@RequestBody ToutiaoCreatOrderDTO toutiaoCreatOrderDTO);



//    /**
//     * 获取用户信息
//     */
//    @PostMapping(value = "/oauth/userinfo")
//    String getUserInfo(
//            @RequestBody DyUserInfoDTO dyUserInfoDTO
//    );


}
