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

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.system.app.dto.separateAccounts.FindAccountRequestDTO;
import org.jeecg.modules.system.app.dto.separateAccounts.FindAccountResponseDTO;
import org.jeecg.modules.system.app.entity.SeparateAccounts;

/**
 * @Description: 分账管理
 * @Author: jeecg-boot
 * @Date:   2025-07-10
 * @Version: V1.0
 */
public interface SeparateAccountsMapper extends BaseMapper<SeparateAccounts> {

    IPage<FindAccountResponseDTO> findPage(@Param("page") Page<FindAccountResponseDTO> page, @Param("findAccountRequestDTO") FindAccountRequestDTO findAccountRequestDTO);

    SeparateAccounts findByDeptId(@Param("deptId") String deptId,@Param("id") String id);

    @Select("select * from nm_separate_accounts where dept_id =#{deptId} ")
    SeparateAccounts findByDeptIdAndStatus(@Param("deptId") String deptId);

}
