dcs 6 ヶ月 前
コミット
02381c27de
1 ファイル変更4 行追加4 行削除
  1. 4 4
      virgo.api/src/main/resources/mapper/TagMapper.xml

+ 4 - 4
virgo.api/src/main/resources/mapper/TagMapper.xml

@@ -17,19 +17,19 @@
     </select>
 
     <select id="fuzzyName" resultType="long">
-        SELECT id FROM tag where deleteState = 0 and name LIKE CONCAT('%', #{name}, '%')
+        SELECT id FROM tag where name LIKE CONCAT('%', #{name}, '%') and deleteState = 0
     </select>
 
     <select id="getType" resultMap="tagResult">
-        select * from tag where deleteState = 0 and type = #{type} or type = 0
+        select * from tag where type = #{type} or type = 0 and deleteState = 0
     </select>
 
     <select id="getCode" resultMap="tagResult">
-        select * from tag where deleteState = 0 and code = #{code} or type = 0
+        select * from tag where code = #{code} or type = 0 and deleteState = 0
     </select>
 
     <select id="getOrganizationId" resultMap="tagResult">
-        select * from tag where deleteState = 0 and organizationId = #{organizationId} and type = #{type} or type = 0
+        select * from tag where organizationId = #{organizationId} and type = #{type} or type = 0 and deleteState = 0
     </select>
 
     <select id="getList" resultMap="tagResult">