tangsong hace 1 año
padre
commit
eb323a2c9c

+ 2 - 2
src/main/java/com/unis/ynls/dataDictionary/mapper/DataDictionaryMapper.java

@@ -24,7 +24,7 @@ public interface DataDictionaryMapper extends Mapper<DataDictionaryDO> {
24
     @Select("select MAX(id) as maxId from SYS_DICTIONARY")
24
     @Select("select MAX(id) as maxId from SYS_DICTIONARY")
25
     Integer getMaxId();
25
     Integer getMaxId();
26
 
26
 
27
-    @Select("select t.*  From SYS_DICTIONARY t where t.GROUP_ID = #{groupId} Start With t.DICT_CODE = #{dictCode} Connect By Prior t.DICT_CODE = t.PDICT_CODE")
27
+    @Select("select t.*  From SYS_DICTIONARY t where t.GROUP_ID = #{groupId} and t.DICT_CODE like  '${dictCode}%' ")
28
     List<DataDictionaryDO> getDataTree(@Param("groupId") String groupId, @Param("dictCode") String dictCode);
28
     List<DataDictionaryDO> getDataTree(@Param("groupId") String groupId, @Param("dictCode") String dictCode);
29
 
29
 
30
     @Select("select t.id,t.dict_code,t.dict_name,t.pdict_code,t.group_id from SYS_DICTIONARY t order by t.group_id, t.order_by")
30
     @Select("select t.id,t.dict_code,t.dict_name,t.pdict_code,t.group_id from SYS_DICTIONARY t order by t.group_id, t.order_by")
@@ -37,6 +37,6 @@ public interface DataDictionaryMapper extends Mapper<DataDictionaryDO> {
37
     @Select("SELECT DICT_CODE FROM SYS_DICTIONARY WHERE GROUP_ID = #{groupId} AND DICT_NAME in (${dictName})")
37
     @Select("SELECT DICT_CODE FROM SYS_DICTIONARY WHERE GROUP_ID = #{groupId} AND DICT_NAME in (${dictName})")
38
     List<String> getDataDictionaryByGroupIdAndInDictName(String groupId, String dictName);
38
     List<String> getDataDictionaryByGroupIdAndInDictName(String groupId, String dictName);
39
 
39
 
40
-    @Select("select t.*  From SYS_DICTIONARY t where t.GROUP_ID = #{groupId} Start With t.DICT_CODE = #{dictCode} Connect By t.DICT_CODE = Prior t.PDICT_CODE order by t.id asc")
40
+    @Select("select t.*  From SYS_DICTIONARY t where t.GROUP_ID = #{groupId} and t.DICT_CODE like  '${dictCode}%'  order by t.id asc")
41
     List<DataDictionaryDO> getDataParent(@Param("groupId") String groupId, @Param("dictCode") String dictCode);
41
     List<DataDictionaryDO> getDataParent(@Param("groupId") String groupId, @Param("dictCode") String dictCode);
42
 }
42
 }

+ 1 - 4
src/main/resources/mybatis/mapper/DataDictionaryMapper.xml

@@ -35,10 +35,7 @@
35
           <include refid="Base_Column_List"/>
35
           <include refid="Base_Column_List"/>
36
         From SYS_DICTIONARY t
36
         From SYS_DICTIONARY t
37
         where t.GROUP_ID = #{groupId}
37
         where t.GROUP_ID = #{groupId}
38
-        Start With t.DICT_CODE = #{dictCode}
39
-        Connect By Prior t.DICT_CODE = t.PDICT_CODE
38
+        and t.DICT_CODE like '${dictCode}%'
40
     </select>
39
     </select>
41
 
40
 
42
-
43
-
44
 </mapper>
41
 </mapper>