网站和主题单独菜单管理

This commit is contained in:
duandongmei
2019-01-08 12:17:57 +06:00
parent 5f4d300d6a
commit 94dc852118
8 changed files with 494 additions and 2 deletions

View File

@@ -15,15 +15,22 @@ public interface SysDictDao extends CrudDao<SysDataDictionaryName> {
List<SysDataDictionaryName> findDictList(SysDataDictionaryName sysDictName);
List<SysDataDictionaryItem> findDictItemList(SysDataDictionaryItem sysDictItem);
SysDataDictionaryName getDictById(@Param("DEL_FLAG_NORMAL")Integer DEL_FLAG_NORMAL,@Param("id") Integer id);
void insertDictName(SysDataDictionaryName sysDictName);
void updateDictName(SysDataDictionaryName sysDictName);
void insertDictItem(SysDataDictionaryItem sysDictitem);
int findMaxItemSort(SysDataDictionaryItem sysDictitem);
int findMaxItemCode(SysDataDictionaryItem sysDictitem);
void deleteDictItem(@Param("dictId")Integer dictId);
void deleteDictItemById(SysDataDictionaryItem sysDictitem);
void deleteDictName(@Param("dictId")Integer dictId);

View File

@@ -22,6 +22,17 @@
</collection>
</resultMap>
<resultMap id="dictItemResultMap" type="com.nis.domain.SysDataDictionaryItem" >
<id column="id" property="id" jdbcType="INTEGER" />
<result property="itemCode" column="item_code" jdbcType="VARCHAR" />
<result property="itemValue" column="item_value" jdbcType="VARCHAR" />
<result property="itemDesc" column="item_desc" jdbcType="VARCHAR" />
<result property="itemSort" column="item_sort" jdbcType="INTEGER" />
<result property="status" column="item_status" jdbcType="INTEGER" />
<result property="type" column="type" jdbcType="INTEGER" />
<result property="dictionaryId" column="dictionary_id" jdbcType="INTEGER" />
</resultMap>
@@ -112,6 +123,36 @@
</select>
<select id="findDictItemList" resultMap="dictItemResultMap" parameterType="com.nis.domain.SysDataDictionaryItem">
SELECT * FROM sys_data_dictionary_item WHERE status=1
<if test="itemCode != null and itemCode != '' " >
AND item_code = #{itemCode}
</if>
<if test="id != null " >
AND id = #{id}
</if>
<if test="itemValue != null and itemValue != '' " >
AND item_value like '%${itemValue}%'
</if>
<if test="itemDesc != null and itemDesc != '' " >
AND item_desc like '%${itemDesc}%'
</if>
<if test="dictionaryId != null" >
AND dictionary_id = #{dictionaryId}
</if>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
<otherwise>
ORDER BY item_sort desc
</otherwise>
</choose>
</select>
<!-- 插入词典标识信息 -->
<insert id="insertDictName" parameterType="com.nis.domain.SysDataDictionaryName" useGeneratedKeys="true" keyProperty="id" >
insert into sys_data_dictionary_name (module_name, mark,
@@ -143,6 +184,11 @@
delete from sys_data_dictionary_item
where dictionary_id = #{dictId}
</delete>
<!-- 删除词典项信息 -->
<delete id="deleteDictItemById">
delete from sys_data_dictionary_item
where id = #{id} and dictionary_id= #{dictionaryId}
</delete>
<!-- 编辑词典标识信息 -->
<update id="updateDictName" parameterType="com.nis.domain.SysDataDictionaryName" >
@@ -163,4 +209,21 @@
type=#{type}, dictionary_id=#{dictionaryId}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="findMaxItemCode" resultType="java.lang.Integer" parameterType="com.nis.domain.SysDataDictionaryItem">
SELECT max(item_code) FROM sys_data_dictionary_item
<where>
<if test="dictionaryId != null" >
AND dictionary_id = #{dictionaryId}
</if>
</where>
</select>
<select id="findMaxItemSort" resultType="java.lang.Integer" parameterType="com.nis.domain.SysDataDictionaryItem">
SELECT max(item_sort) FROM sys_data_dictionary_item
<where>
<if test="dictionaryId != null" >
AND dictionary_id = #{dictionaryId}
</if>
</where>
</select>
</mapper>