package com.jeeplus.psimanage.loss.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jeeplus.psimanage.loss.domain.PsiLossBasic;
import com.jeeplus.psimanage.loss.domain.PsiLossDetailed;
import com.jeeplus.psimanage.loss.service.dto.PsiLossDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PsiLossBasicMapper extends BaseMapper<PsiLossBasic> {

    void updateStatusById(@Param("id") String id, @Param("status") String status);

    List<String> findChildIds(String department);

    IPage<PsiLossDto> findList(Page<PsiLossDto> page, @Param(Constants.WRAPPER) QueryWrapper<PsiLossDto> queryWrapper);

    IPage<PsiLossDetailed> getLossByTradeName(Page<PsiLossDetailed> page, @Param(Constants.WRAPPER) QueryWrapper<PsiLossDetailed> queryWrapper);

    String getUserNameByUserId(String handledBy);

    String getOfficeNameByOfficeId(String handledByOffice);
}
