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 24
     @Select("select MAX(id) as maxId from SYS_DICTIONARY")
25 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 28
     List<DataDictionaryDO> getDataTree(@Param("groupId") String groupId, @Param("dictCode") String dictCode);
29 29
 
30 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 37
     @Select("SELECT DICT_CODE FROM SYS_DICTIONARY WHERE GROUP_ID = #{groupId} AND DICT_NAME in (${dictName})")
38 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 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 35
           <include refid="Base_Column_List"/>
36 36
         From SYS_DICTIONARY t
37 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 39
     </select>
41 40
 
42
-
43
-
44 41
 </mapper>