package com.ruoyi.system.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.SysTable;
import com.ruoyi.system.domain.vo.UnitAndTSystableVo;
import org.apache.ibatis.annotations.Select;

/**
 * 参数配置 数据层
 *
 * @author ruoyi
 */
public interface SysTableMapper extends BaseMapper<SysTable> {

    @Select("SELECT c.title subjectName, e.title unitName,e.id unitId\n" +
            "from t_systable c\n" +
            "LEFT JOIN j_unit e ON e.kind = '2' and c.unit_id = e.id\n" +
            "where c.kind = 'JSDD' and c.logic_delete_flag = 0 AND c.code=#{subjectId}")
    UnitAndTSystableVo getUnitNameAndUnitId(String subjectId);
}
