package com.ruoyi.system.mapper.house;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ruoyi.system.domain.changerecord.annotation.DataChangeLog;
import com.ruoyi.system.domain.changerecord.enums.OperationType;
import com.ruoyi.system.domain.changerecord.enums.SubjectType;
import com.ruoyi.system.domain.house.HouseResource;
import com.ruoyi.system.domain.house.vo.*;
import org.apache.ibatis.annotations.Param;

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

public interface HouseResourceMapper {

    @DataChangeLog(subjectType = SubjectType.HOUSE_RESOURCE, operation = OperationType.INSERT, idExpr = "id")
    void insertHouseResource(HouseResource houseResource);

    HouseResource selectHouseResourceById(String id);

    @DataChangeLog(subjectType = SubjectType.HOUSE_RESOURCE, operation = OperationType.UPDATE, idExpr = "id")
    void updateHouseResource(HouseResource houseResource);

    @DataChangeLog(subjectType = SubjectType.HOUSE_RESOURCE, operation = OperationType.DELETE, idExpr = ".")
    void deleteHouseResourceById(String id);

    @DataChangeLog(subjectType = SubjectType.HOUSE_RESOURCE, operation = OperationType.INSERT, idExpr = "list[*].id")
    void batchInsertHouseResources(List<HouseResource> houseResources);

    IPage<HouseResourcePage> selectPage(IPage<HouseResource> page, @Param("query") HouseResourcePageQuery houseResourcePageQuery);

    List<HouseResourcePage> selectProfileGraph(@Param("query") HouseResourcePageQuery houseResourcePageQuery);

    List<HouseResourcePage> selectList(@Param("query") HouseResourcePageQuery houseResourcePageQuery);

    List<HouseResourcePage> exportList(@Param("query") HouseResourcePageQuery houseResourcePageQuery);

    List<HouseResource> selectAll();

    List<HouseResourcePage> selectPageBusinessEntityStatistics();

    List<HouseResourcePage> selectForContrast(@Param("two") String two, @Param("name") String name);

    List<HouseResourcePage> selectByIdList(@Param("idList") List<String> idList);

    List<HouseResourceDataCollectionSimpleObject> selectHouseResourceByCreateTime(@Param("query") HouseResourceDataCollectionQuery query);

    List<HouseResourceDataCollectionSimpleObject> selectHouseResourceByUpdateTime(@Param("query") HouseResourceDataCollectionQuery query);

    List<HouseResourceDataCollectionSimpleObject> selectHouseResourceByUpdateTimeDeleteFlag(@Param("query") HouseResourceDataCollectionQuery query);
}
