Browse Source

修改Bug

qinhouyu 1 year ago
parent
commit
cc5b3a182c
1 changed files with 6 additions and 1 deletions
  1. 6 1
      ruoyi-gas/src/main/resources/mapper/GUserMapper.xml

+ 6 - 1
ruoyi-gas/src/main/resources/mapper/GUserMapper.xml

@@ -118,7 +118,12 @@
 
     <select id="getByRanks" resultType="java.lang.Long">
         select id from g_user
-        where ranks = #{ranks}
+        where 1=1
+        <if test="ranks != null  and ranks!= ''">
+            and ranks = (
+            SELECT post_id from sys_post WHERE post_name = #{ranks}
+            )
+        </if>
         and del_flag = '0'
     </select>
 </mapper>