| | |
| | | |
| | | <!-- 通过字典code获取字典数据 --> |
| | | <select id="queryDictTextByKey" parameterType="String" resultType="String"> |
| | | select s.item_text from sys_dict_item s |
| | | select s.item_text from sys_dict_item s |
| | | where s.dict_id = (select id from sys_dict where dict_code = #{code}) |
| | | and s.item_value = #{key} |
| | | </select> |
| | |
| | | <select id="queryTableDictItemsByCode" parameterType="String" resultType="org.jeecg.common.system.vo.DictModel"> |
| | | select ${text} as "text",${code} as "value" from ${table} |
| | | </select> |
| | | |
| | | |
| | | <!--通过查询指定table的 text code 获取字典(指定查询条件)--> |
| | | <select id="queryTableDictItemsByCodeAndFilter" parameterType="String" resultType="org.jeecg.common.system.vo.DictModel"> |
| | | select ${text} as "text",${code} as "value" from ${table} |
| | |
| | | where ${filterSql} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <!--通过查询指定table的 text code key 获取字典值--> |
| | | <select id="queryTableDictTextByKey" parameterType="String" resultType="String"> |
| | | select ${text} as "text" from ${table} where ${code}= #{key} |
| | |
| | | <select id="duplicateCheckCountSql" resultType="Long" parameterType="org.jeecg.modules.system.model.DuplicateCheckVo"> |
| | | SELECT COUNT(*) FROM ${tableName} WHERE ${fieldName} = #{fieldVal} and id <> #{dataId} |
| | | </select> |
| | | |
| | | |
| | | <!-- 重复校验 sql语句 --> |
| | | <select id="duplicateCheckCountSqlNoDataId" resultType="Long" parameterType="org.jeecg.modules.system.model.DuplicateCheckVo"> |
| | | SELECT COUNT(*) FROM ${tableName} WHERE ${fieldName} = #{fieldVal} |
| | | </select> |
| | | |
| | | |
| | | <!-- 查询部门信息 作为字典数据 --> |
| | | <select id="queryAllDepartBackDictModel" resultType="org.jeecg.common.system.vo.DictModel"> |
| | | select id as "value",depart_name as "text" from sys_depart where del_flag = '0' |
| | | </select> |
| | | |
| | | |
| | | <!-- 查询用户信息 作为字典数据 --> |
| | | <select id="queryAllUserBackDictModel" resultType="org.jeecg.common.system.vo.DictModel"> |
| | | select username as "value",realname as "text" from sys_user where del_flag = '0' |
| | | </select> |
| | | |
| | | |
| | | <!--通过查询指定table的 text code 获取字典数据,且支持关键字查询 |
| | | <select id="queryTableDictItems" parameterType="String" resultType="org.jeecg.common.system.vo.DictModel"> |
| | | select ${text} as "text",${code} as "value" from ${table} where ${text} like #{keyword} |
| | | </select> --> |
| | | |
| | | |
| | | <!-- 根据表名、显示字段名、存储字段名、父ID查询树 --> |
| | | <select id="queryTreeList" parameterType="Object" resultType="org.jeecg.modules.system.model.TreeSelectModel"> |
| | | select ${text} as "title", |
| | |
| | | and ${filterSql} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="queryTableFieldByParams" resultType="java.util.Map"> |
| | | select ${columns},${paramName} as paramValue |
| | | from ${table} where ${paramName} in |
| | | <foreach item="key" collection="paramValues" open="(" separator="," close=")"> |
| | | #{key} |
| | | </foreach> |
| | | </select> |
| | | <select id="queryTableDictTextBySubSql" resultType="java.lang.String"> |
| | | select ${text} as "text" from ${table} where ${subSql} |
| | | </select> |
| | | </mapper> |