12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="org.springblade.manager.mapper.TextdictInfoMapper">
- <!-- 通用查询映射结果 -->
- <resultMap id="textdictInfoResultMap" type="org.springblade.manager.entity.TextdictInfo">
- <result column="id" property="id"/>
- <result column="is_deleted" property="isDeleted"/>
- <result column="name" property="name"/>
- <result column="type" property="type"/>
- <result column="tab_id" property="tabId"/>
- <result column="col_key" property="colKey"/>
- <result column="sig_role_id" property="sigRoleId"/>
- <result column="is_deleted" property="isDeleted"/>
- <result column="col_name" property="colName"/>
- <result column="sig_role_name" property="sigRoleName"/>
- <result column="pyzbx" property="pyzbx"/>
- <result column="pyzby" property="pyzby"/>
- <result column="excel_id" property="excelId"/>
- <result column="project_id" property="projectId"/>
- <result column="time_state" property="timeState"/>
- <result column="time_name" property="timeName"/>
- <result column="time_col_key" property="timeColKey"/>
- </resultMap>
- <select id="selectTextdictInfoPage" resultMap="textdictInfoResultMap">
- select distinct * from m_textdict_info where is_deleted = 0
- <if test="param2.type== 2 ">
- and type in('2','6') and (tab_id=#{param2.tabId} or excel_id=#{param2.excelId})
- </if>
- <if test="param2.type!= 2 ">
- and type =#{param2.type} and tab_id=#{param2.tabId}
- </if>
- <if test="param2.projectId!=null and param2.projectId!='' ">
- and project_id=#{param2.projectId}
- </if>
- </select>
- <select id="selectTextdictInfoById" resultType="org.springblade.manager.vo.TextdictInfoVO">
- select *,(SELECT parent_id from blade_role c where c.id=b.sig_role_id) as parentRoleId from m_textdict_info b where is_deleted = 0 and id=#{id}
- </select>
- <select id="selectTextdictInfoByExcelId" resultMap="textdictInfoResultMap">
- SELECT a.* from m_textdict_info a,
- (select tab_id,count(1) from m_textdict_info where is_deleted = 0 and type in('2','6') and excel_id=#{param2.excelId} GROUP BY tab_id ORDER BY count(tab_id) desc LIMIT 1) b
- where a.tab_id=b.tab_id and a.is_deleted = 0 and a.type in('2','6') and a.excel_id=#{param2.excelId}
- </select>
- <select id="selectTextdictBYIds" resultMap="textdictInfoResultMap">
- SELECT a.* from m_textdict_info a
- where project_id=#{projectId} and id in
- <foreach collection="ids" item="id" open="(" close=")" separator=",">
- #{id}
- </foreach>
- </select>
- <select id="selectTextdictInfoOne" resultMap="textdictInfoResultMap">
- select * from m_textdict_info where is_deleted = 0
- and id= #{id}
- and sig_role_id = #{sigRoleId}
- and project_id= #{projectId}
- </select>
- </mapper>
|