/**
 * All rights Reserved, Designed By www.freemud.cn
 *
 * @Title: CustomerExtendClient
 * @Package cn.freemud.service.thirdparty
 * @Description:
 * @author: song.cai
 * @date: 2019/2/20 16:42
 * @version V1.0
 * @Copyright: 2019 www.freemud.cn Inc. All rights reserved.
 * 注意：本内容仅限于上海非码科技内部传阅，禁止外泄以及用于其他的商业目
 */

package cn.freemud.service.thirdparty;

import com.freemud.application.sdk.api.ordercenter.annotation.LogIgnoreFeign;
import cn.freemud.entities.dto.GetMemberExtendInfoRequestDto;
import cn.freemud.entities.dto.GetMemberExtendInfoResponseDto;
import cn.freemud.entities.dto.GetMemberInfoByIdRequestDto;
import cn.freemud.entities.dto.GetMemberInfoByIdResponseDto;
import cn.freemud.entities.dto.member.GetMemberIdsReq;
import cn.freemud.entities.dto.member.GetMemberIdsResp;
import com.freemud.application.sdk.api.base.BaseResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient(name = "CUSTOMER-SERVICE", url = "${saas.customerclient.feign.url}")
@RequestMapping(produces = {"application/json;charset=UTF-8"})
public interface CustomerClient {

    /**
     * 根据会员id获取会员信息
     */
    @PostMapping(value = "/customerservice/getMemberById")
    GetMemberInfoByIdResponseDto getMemberInfoById(@RequestBody GetMemberInfoByIdRequestDto getMemberInfoByIdRequestDto);


    /**
     * 查询memberId的对应的客户下所有会员编号（资产合并前的）
     */
    @PostMapping("/customerservice/customer/getMemberIds")
    @LogIgnoreFeign
    GetMemberIdsResp getMemberIds(@RequestBody GetMemberIdsReq request);


    /**
     * 查询收货地址详情
     */
    @LogIgnoreFeign(logMessage="getMemberExtendInfo")
    @PostMapping(value = "/customerservice/extend/getMemberExtendInfo")
    BaseResponse<GetMemberExtendInfoResponseDto>
            getMemberExtendInfo(@RequestBody GetMemberExtendInfoRequestDto extendInfoRequest);
}
