package com.ltkj.hosp.mapper;
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.ltkj.hosp.domain.TjStandard;
|
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Select;
|
|
import java.util.List;
|
|
/**
|
* standardMapper接口
|
*
|
* @author ltkj
|
* @date 2022-11-24
|
*/
|
@Mapper
|
public interface TjStandardMapper extends BaseMapper<TjStandard> {
|
/**
|
* 查询standard
|
*
|
* @param id standard主键
|
* @return standard
|
*/
|
public TjStandard selectTjStandardById(String id);
|
|
/**
|
* 查询standard列表
|
*
|
* @param tjStandard standard
|
* @return standard集合
|
*/
|
public List<TjStandard> selectTjStandardList(TjStandard tjStandard);
|
|
/**
|
* 新增standard
|
*
|
* @param tjStandard standard
|
* @return 结果
|
*/
|
public int insertTjStandard(TjStandard tjStandard);
|
|
/**
|
* 修改standard
|
*
|
* @param tjStandard standard
|
* @return 结果
|
*/
|
public int updateTjStandard(TjStandard tjStandard);
|
|
/**
|
* 删除standard
|
*
|
* @param id standard主键
|
* @return 结果
|
*/
|
public int deleteTjStandardById(String id);
|
|
/**
|
* 批量删除standard
|
*
|
* @param ids 需要删除的数据主键集合
|
* @return 结果
|
*/
|
public int deleteTjStandardByIds(String[] ids);
|
|
@Select("SELECT * FROM tj_standard WHERE pro_id=#{proId} AND deleted='0'")
|
public List<TjStandard> getTjStandardListByProId(String proId);
|
|
|
@Select("select * from tj_standard \n" +
|
"where IF(NULL is NULL, 0 = 0, tj_sex =#{tjSex})\n" +
|
"AND IF(NULL is NULL, 0 = 0, tj_type=#{tjType})\n" +
|
"AND stan_id in \n" +
|
"(SELECT stan_id FROM tj_standard WHERE pro_id=#{proId} AND deleted='0')")
|
public TjStandard getListBySexAndType(Long tjSex,int tjType,String proId);
|
}
|