package com.cool.store.mapper;

import com.cool.store.entity.HyInspectionSettingDO;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author zhangchenbiao
 * @date 2023-07-18 04:27
 */
public interface HyInspectionSettingMapper {
    /**
     *
     * 默认插入方法，只会给有值的字段赋值
	 * 会对传进来的字段做判空处理，如果字段为空，则使用数据库默认字段或者null
     * dateTime:2023-07-18 04:27
     */
    int insertSelective(HyInspectionSettingDO record);

    /**
     *
     * 默认更新方法，根据主键更新，不会把null值更新到数据库，避免覆盖之前有值的
     * dateTime:2023-07-18 04:27
     */
    int updateByPrimaryKeySelective(HyInspectionSettingDO record);

    /**
     * 获取稽核区域设置分页
     * @return
     */
    Page<HyInspectionSettingDO> getInspectionSettingPage();

    /**
     * 获取稽核详情
     * @param inspectionSettingId
     * @return
     */
    HyInspectionSettingDO getInspectionSettingDetail(@Param("inspectionSettingId") Long inspectionSettingId);

    /**
     * 获取已经配置的稽核人
     * @return
     */
    List<String> getInspectionUserIds();

    /**
     * 根据id批量获取
     * @param inspectionSettingIds
     * @return
     */
    List<HyInspectionSettingDO> getHyInspectionSettingByIds(@Param("inspectionSettingIds") List<Long> inspectionSettingIds);

    /**
     *
     * @param inspectionUserId
     * @return
     */
    List<HyInspectionSettingDO> getHyInspectionSettingByUserId(@Param("inspectionUserId") String inspectionUserId, @Param("excludeInspectionSettingId") Long excludeInspectionSettingId);
}