package com.yc.ship.module.otc.api.store;

import com.yc.ship.framework.common.pojo.CommonResult;
import com.yc.ship.module.otc.api.store.dto.*;
import com.yc.ship.module.otc.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import io.swagger.v3.oas.annotations.tags.Tag;

import javax.annotation.security.PermitAll;
import java.util.List;


@Tag(name = "RPC 服务 - 门店")
public interface StoreApi {

    String PREFIX = ApiConstants.PREFIX + "/store";

    /**
     * 获取旅行社用户登录信息
     *
     * @param reqDTO
     * @return
     */
    @PermitAll
    @Operation(summary = "门店余额和授信交易")
    CommonResult<Long> storeTrade(StoreReqDTO reqDTO);


    @PermitAll
    @Operation(summary = "根据设备ID获取设备信息")
    CommonResult<StoreMachineDTO> getMachineByMachineId(String machineId);

    @PermitAll
    @Operation(summary = "根据ID获取设备信息")
    CommonResult<StoreMachineDTO> getMachineById(Long id);

    @PermitAll
    @Operation(summary = "根据ID获取门店信息")
    CommonResult<StoreInfoReqDTO> getStoreById(Long id);

    @PermitAll
    @Operation(summary = "门店平台授信交易")
    CommonResult<StoreRespDTO> storePlatTrade(StoreReqDTO reqDTO);

    @PermitAll
    @Operation(summary = "创建默认门店")
    CommonResult<Long> createDefaultStore(Long tenantId);

    @PermitAll
    @Operation(summary = "根据用户ID获取门店信息")
    CommonResult<StoreCardRespDTO> getStoreByUserId(Long userId);

    @PermitAll
    @Operation(summary = "同步门店产品状态")
    CommonResult<Boolean> syncStoreProductStatus(StoreProductReqDTO reqDTO);

    /**
     * 获取门店信息
     * @param id
     * @return
     */
    StoreInfoRespDTO getStoreInfo(Long id);

    /**
     * 获取门店列表
     * @return
     */
    List<StoreInfoRespDTO> getStoreList();
}
