xiangpei
2025-02-20 d1127f18844cdca09b5f69c8fbeb3788055fd793
system/src/main/resources/mapper/system/SysDictDataMapper.xml
@@ -35,6 +35,9 @@
         <if test="dictLabel != null and dictLabel != ''">
            AND dict_label like concat('%', #{dictLabel}, '%')
         </if>
         <if test="parentId != null">
            AND parent_id = #{parentId}
         </if>
         <if test="status != null and status != ''">
            AND status = #{status}
         </if>
@@ -95,6 +98,11 @@
       update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType}
   </update>
   <select id="selectDictDataByValue" parameterType="string" resultMap="SysDictDataResult">
      <include refid="selectDictDataVo"/>
      where dict_value = #{dictValue} AND parent_id = (SELECT dict_code FROM sys_dict_data WHERE dict_value = #{parentValue} AND dict_type = #{dictType}) AND dict_type = #{dictType}
   </select>
    <insert id="insertDictData" parameterType="SysDictData">
       insert into sys_dict_data(
          <if test="dictSort != null">dict_sort,</if>