package com.czg.account.service;

import com.czg.account.dto.PageDTO;
import com.czg.account.dto.shopinfo.*;
import com.czg.account.entity.ShopInfo;
import com.czg.exception.CzgException;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author Administrator
 */
public interface ShopInfoService extends IService<ShopInfo> {

    @Override
    ShopInfo getById(Serializable id) throws CzgException;
    Page<ShopInfo> get(PageDTO pageDTO, String shopName, Integer status, Integer isHeadShop);

    Page<ShopInfo> getShopByMainId(PageDTO pageDTO, String shopName, Integer status);

    Boolean add(ShopInfoAddDTO shopInfoAddDTO);

    Boolean edit(ShopInfoEditDTO shopInfoEditDTO);

    ShopDetailDTO detail(Long id) throws CzgException;

    ShopInfoByCodeDTO getByCode(String tableCode, String lat, String lng, boolean checkState);

    ShopInfoDetailDTO getDetail(Long shopId);

    Page<ShopInfoSubVO> getSubList(String lat, String lng, float distance);

    List<ShopBranchSelectDTO> findShopBranch(Long shopId);

    Long getMainIdByShopId(Long shopId) throws CzgException;

    List<ShopInfo> getByMainIdOrList(Long mainShopId, List<Long> shopIdList, String shopName);

    BigDecimal updateAmount(Long id, BigDecimal amount);

    /**
     * 获取所有未删除的 过期时间>三天前  店铺id列表
     *
     * @return 店铺id列表
     */
    List<Long> getShopIdList();
}
