package com.bonus.core.drp.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bonus.core.drp.dto.DrpUnitPageDTO;
import com.bonus.core.drp.model.DrpUnit;
import com.bonus.core.drp.po.DrpUnitModel;
import com.bonus.core.drp.vo.DrpUnitPageVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DrpUnitMapper extends BaseMapper<DrpUnit> {
//   Page<DrpUnitPageVO> selectAllList(Page<DrpUnitPageVO> page, @Param("content") DrpUnitPageDTO content, @Param("delFlag") Integer delFlag);

   @Select({"select unit_id,unit_name,rate from drp_unit where unit_id = #{unitId}"})
   DrpUnitModel getUnit(@Param("unitId") Long unitId);

//   @Select({"select unit_id, unit_name, rate, weigh_type from drp_unit where del_flag = #{delFlag}"})
//   List<DrpListUnitVO> selectUnitListAndroid(Integer delFlag);
//
//   @Select({"select unit_id from drp_unit where unit_name = #{unitName} and del_flag = 2"})
//   Long getUnitIdByName(String unitName);
//
//   List<DrpUnitListVO> listUnitAll(@Param("content") DrpUnitListDTO content, @Param("delFlag") Integer delFlag);
//
//   Long getUnitIdByNameAndArea(@Param("unitName") String unitName, @Param("areaId") Long areaId);
}
