package com.house365.service.interfaces;

import com.house365.common.searchBeans.QueryParams;
import com.house365.service.impl.ComputeClientHystrix;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Date: 2016/12/14</p>
 *
 * @author XN
 * @version 1.0
 */
@FeignClient(value = "wechat-service", fallback = ComputeClientHystrix.class)
public interface ComputeClient {

    @RequestMapping(method = RequestMethod.GET, value = "/add")
    Integer add(@RequestParam(value = "a") Integer a, @RequestParam(value = "b") Integer b);

    @RequestMapping(method = RequestMethod.GET, value = "/company/list")
    Integer list(@RequestBody QueryParams queryParams);

    @RequestMapping(value = "checkWeChatCallback", method = RequestMethod.GET)
    String checkWeChatCallback(@RequestParam(value = "msg_signature") String sVerifyMsgSig,
                               @RequestParam(value = "timestamp") String sVerifyTimeStamp, @RequestParam(value = "nonce") String sVerifyNonce,
                               @RequestParam(value = "echostr") String sVerifyEchoStr);
}
