package org.jeecg.modules.system.app.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.app.vo.OrderVO;
import org.jeecg.modules.app.vo.PlaceInfoVO;
import org.jeecg.modules.system.app.entity.AppSitePriceRules;

import java.util.Date;
import java.util.List;

/**
 * @Description: 场地价格规则表
 * @Author: jeecg-boot
 * @Date:   2025-07-03
 * @Version: V1.0
 */
public interface AppSitePriceRulesMapper extends BaseMapper<AppSitePriceRules> {

    /**
     * @Author SheepHy
     * @Description 计算包场信息自动排序今天、明天、后天、周一到周天
     * @Date 15:26 2025/7/10
     * @Param
     * @return
     **/
    List<PlaceInfoVO.theGymnasiumIsCharteredInfoVO> theGymnasiumIsCharteredInfo(@Param("orgCode")String orgCode, @Param("categoryId")String categoryId);

    List<OrderVO.PreviewOrderPlaceSchoolChild> timeSlot(@Param("placeId")String placeId,@Param("startTime")Date startTime);

    List<OrderVO.PreviewOrderTimePeriod> previewOrderPlaceGymnasiumChartered(@Param("rulesId")List<String> rulesId);

    /**
     * 批量插入
     * @param list
     * @return
     */
    int insertList(@Param("list") List<AppSitePriceRules> list);

    /**
     * 批量更新
     * @param list
     * @return
     */
    int updateList(@Param("list") List<AppSitePriceRules> list);

    /**
     * 根据id查询所有（包含逻辑删除数据）
     * @param id
     * @return
     */
    @Select("select * from nm_site_price_rules where id = #{id}")
    AppSitePriceRules selectAllById(String id);
}
