package com.cool.store.service;

import com.cool.store.dto.OpenInfoDTO;
import com.cool.store.dto.UserDTO;
import com.cool.store.entity.LineInfoDO;
import com.cool.store.entity.ShopInfoDO;
import com.cool.store.request.*;
import com.cool.store.response.BranchShopDetailResponse;
import com.cool.store.response.BranchShopResponse;
import com.cool.store.response.MiniShopsResponse;
import com.cool.store.response.ShopResponse;
import com.cool.store.vo.shop.MiniShopPageVO;
import com.cool.store.vo.shop.ShopStageInfoVO;
import com.cool.store.vo.shop.StageShopCountVO;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * @author zhangchenbiao
 * @FileName: ShopService
 * @Description:店铺
 * @date 2024-04-11 10:25
 */
public interface ShopService {

    /**
     * 初始化店铺数据
     * @param lineInfo
     * @return
     */
    Integer initShop(LineInfoDO lineInfo);

    Long initAiShop(LineInfoDO lineInfo);

    /**
     * 获取首页数据
     * @param lineId
     * @return
     */
    List<MiniShopPageVO> getShopList(Long lineId,String userId);

    /**
     * 获取店铺阶段信息
     * @param shopId
     * @param shopStage
     * @return
     */
    List<ShopStageInfoVO> getShopStageInfo(Long shopId, Integer shopStage);

    /**
     * 获取各阶段店铺数量
     * @param lineId
     * @return
     */
    StageShopCountVO getStageShopCount(Long lineId);

    /**
     * 删除铺位
     * @param request
     * @return
     */
    Integer deleteShop(DeleteShopRequest request);

    /**
     * 新增铺位
     * @param request
     * @return
     */
    Long addShop(AddShopRequest request);

    /**
     * 获取店铺信息
     */
    ShopInfoDO getShopInfo(Long shopId);

    Integer updateShopCode(UpdateShopCodeRequest request,String userId);

    /**
     * 新建分店
     */
    Long addBranchShop(AddBranchShopRequest request,String userId);

    /**
     * 开店详情/左边小窗
     */
    BranchShopDetailResponse getBranchShopDetail(Long shopId);
    /**
     * 修改开店详情/左边小窗
     */
    Integer updateBranchShopDetail(BranchShopDetailRequest request,String userId);
    /**
     * 修改门店招商专员/督导
     */
    Integer updateShopInvestment(Long shopId,String updateUserId,String userId);

    /**
     * 转让运营顾问
     * @param shopId
     * @param operationsConsultant
     * @return
     */
    Boolean updateOperationsConsultant(Long shopId,String operationsConsultant);

    /**
     * 门店结束跟进
     * @param shopId
     * @return
     */
    Boolean shopClose(Long shopId);
    Boolean updateShopStatue(Long shopId);

    /**
     * 分店列表
     */
    PageInfo<BranchShopResponse> getBranchShopList(BranchShopRequest request, String userId);

    Boolean dataHandler(Long shopId);

    PageInfo<MiniShopsResponse> getShopListSuccessOpen(ShopListSuccessOpenRequest request);

    ShopResponse  getShopNameAndCode(Long shopId,Long lineId);

    ShopResponse getShopNameAndCodeByMobile(String mobile, Long shopId);

    String getFranchiseBrandName(Long shopId);
    //处理shop表省市区
    Integer dateHandler(Integer pageNum, Integer pageSize);


    /**
     * 获取意向阶段处理人
     * @param lineId
     * @param subStage
     * @return
     */
    List<UserDTO> getIntendSubStageHandle(Long lineId,Integer subStage);


    /**
     * 获取子阶段处理人数据
     * @param shopId
     * @param subStage
     * @return
     */
    List<UserDTO> getSubStageHandle(Long shopId,Integer subStage);

    ShopStageInfoVO getShopStageStatus(Long shopId, Integer subStage);
    /**
     * @Auther: wangshuo
     * @Date: 2025/8/4
     * @description: 校验门店编码重复
     */
    Boolean checkShopCodeRepeat(String shopCode,Long shopId);

    Boolean isShowButton(Long shopId);

    /**
     * 提交开业报备
     * @param openDateReportRequest
     * @return
     */
    Boolean submitOpenDateReport(OpenDateReportRequest openDateReportRequest);

    /**
     * 确认开业
     * @param request
     * @return
     */
    Boolean confirmOpen(OpenDateReportRequest request,String userId);

    /**
     * 获取开业信息
     * @param shopId
     * @return
     */
    OpenInfoDTO getShopOpenInfo(Long shopId);

}
