package com.bonus.canteen.core.supermarket.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bonus.canteen.core.auth.config.LeNiuDataPermission;
import com.bonus.canteen.core.auth.enums.DataPermissionTypeEnum;
import com.bonus.canteen.core.supermarket.dto.SupermarketInfoPageDTO;
import com.bonus.canteen.core.supermarket.model.SupermarketInfo;
import com.bonus.canteen.core.supermarket.vo.SupermarketInfoPageVO;
import com.bonus.canteen.core.supermarket.vo.SupermarketTreeVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SupermarketInfoMapper extends BaseMapper<SupermarketInfo> {
    Integer getRefundLimitTime(@Param("supermarketId") Long supermarketId, @Param("appSaleMode") Integer appSaleMode);
    @LeNiuDataPermission(
            alias = "a",
            permissionType = DataPermissionTypeEnum.PERMISSION_SUPERMARKET
    )
    Page<SupermarketInfoPageVO> pageSupermarket(Page<SupermarketInfoPageVO> resultPage, @Param("content") SupermarketInfoPageDTO content, @Param("delFlag") Integer delFlag, @Param("areaAuth") List<Long> areaAuth);

    @LeNiuDataPermission(
            alias = "a",
            permissionType = DataPermissionTypeEnum.PERMISSION_SUPERMARKET
    )
    List<SupermarketTreeVO> querySupermarketTree(@Param("areaAuth") List<Long> areaAuth);
//
//    List<AppletSupermarketListVO> listSupermarketInfo(@Param("delFlag") Integer delFlag);
//
//    AppletSupermarketConfigVO getConfigById(@Param("supermarketId") Long supermarketId);

}
