package com.chexiang.myhome.service;

import com.chexiang.myhome.base.http.retrofit.host.HostAnoy;
import com.chexiang.myhome.base.http.retrofit.host.HostApi;
import com.chexiang.myhome.base.http.retrofit.stub.RMResponse;
import com.chexiang.myhome.base.model.BModel;
import com.chexiang.myhome.model.card.CardForSaleModel;
import com.chexiang.myhome.model.card.CardQueryModel;
import com.chexiang.myhome.model.card.CardSaleDetailInfo;
import com.chexiang.myhome.model.card.CardSaleSourceModel;
import com.chexiang.myhome.model.card.CardTemplateModel;
import com.chexiang.myhome.model.card.CouponsChannelInfo;
import com.chexiang.myhome.model.card.EmployeeModel;
import com.chexiang.myhome.model.card.ForSellCardListInfo;
import com.chexiang.myhome.model.card.NewCarsSaleInfo;
import com.chexiang.myhome.model.card.NewCarsSaleModel;
import com.chexiang.myhome.model.card.PostSaveCardModel;
import com.chexiang.myhome.model.card.SaveCardModel;
import com.chexiang.myhome.model.card.VerifyCouponsModel;

import java.util.Map;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;

/**
 * 卡销售
 */

@HostAnoy.NameSpace(HostApi.PADHOST)
public interface CardService {

    //卡销售列表查询--1160
    @POST("/pad/cardsales/listOrder")
    Call<RMResponse<CardQueryModel>> postCardSale(@Body Map<String, Object> map);

    //卡销售订单状态列表--1160-1
    @GET("/pad/cardsales/orderStatuses")
    Call<RMResponse<CardSaleSourceModel>> getCardSaleStatus();

    //卡模板类型列表--1160-2
    @GET("/pad/card/cardTemplateTypes")
    Call<RMResponse<CardTemplateModel>> getCardTemplate();

    //更多--卡订单来源--1162
    @GET("/pad/cardsales/orderSources")
    Call<RMResponse<CardSaleSourceModel>> getCardOrderRes();

    //初始化卡销售列表查询数据--1160-3--后期增加
    @GET("/pad/cardsales/initListOrder")
    Call<RMResponse<CardSaleSourceModel>> initListOrder();


    //卡销售详情--1163
    @GET("/pad/cardsales/info/{cardSalesId}")
    Call<RMResponse<CardSaleDetailInfo>> getCardDetail(@Path("cardSalesId") String cardSalesId);

    //新卡销售--手机号查询匹配--1033-6
    @POST("/pad/customermgmt/queryCxCustomer")
    Call<RMResponse<NewCarsSaleModel>> postNewCardSale(@Body Map<String,String> map);

    //新卡销售--手机号查询匹配--1033-6
    @POST("/pad/customermgmt/queryCxCustomer")
    Call<RMResponse<NewCarsSaleInfo>> postNewCardSale2(@Body Map<String,String> map);


    //获取门店员工--销售员列表
    @GET("/pad/order/emp/todayStoreDutyList")
    Call<RMResponse<EmployeeModel>> getEmployee();

    //查询卡销售金额,服务列表--1168
    @POST("/pad/cardsales/cardInfoPriceAndInfo")
    Call<RMResponse<CardForSaleModel>> postQueryCardSale(@Body Map<String,String> map);


    //获取优惠券来源列表
    @GET("/pad/order/getCouponValidateChannel")
    Call<RMResponse<CouponsChannelInfo>> getCouponsList();

    //卡销售验证券码,并返回此券码可对应的卡模板列表
    @GET("/pad/cardsales/validCoupon/{couponNo}/{couponChannel}")
    Call<RMResponse<VerifyCouponsModel>> getVerifyCoupons(@Path("couponNo") String couponNo, @Path("couponChannel") String couponChannel);

    // 验券结束后根据卡的模版获取一张可以销售的卡
    @GET("/pad/cardsales/cardInfo/{cardTempLateId}")
    Call<RMResponse<CardForSaleModel>> createCard(@Path("cardTempLateId") String id);

    //激活卡
    @POST("/pad/cardsales/activeCard")
    Call<RMResponse> postActiveCard(@Body Map<String,String> map);

    //取消订单
    @GET("/pad/cardsales/cancel/{cardSalesId}/{version}")
    Call<RMResponse<BModel>> cancle(@Path("cardSalesId") String id, @Path("version") String version);

    //卡模板列表,不区分销售状态--1161
    @GET("/pad/card/listAllTemplate")
    Call<RMResponse<CardSaleSourceModel>> getCardTemplateAll();

    //可销售卡查询
    @POST("/pad/card/listForSales")
    Call<RMResponse<ForSellCardListInfo>> postForCardSell(@Body Map<String,Object> map);

    //保存按钮
    @POST("/pad/cardsales/saveOrder")
    Call<RMResponse<SaveCardModel>> postSave(@Body PostSaveCardModel postSaveCardModel);

}