Authored by Lixiaodi

指定索引

@@ -37,7 +37,7 @@ @@ -37,7 +37,7 @@
37 </update> 37 </update>
38 38
39 <select id="selectTypeCount" resultType="java.lang.Integer"> 39 <select id="selectTypeCount" resultType="java.lang.Integer">
40 - SELECT count(1) count FROM ${tableName} force index (`read`) WHERE uid = #{uid} 40 + SELECT count(1) count FROM ${tableName} force index (`uid`) WHERE uid = #{uid}
41 and is_read = #{isRead} and is_del = #{isDel} AND type = #{type} 41 and is_read = #{isRead} and is_del = #{isDel} AND type = #{type}
42 <if test="time != 0 and isRead ='N'"> 42 <if test="time != 0 and isRead ='N'">
43 and create_time &gt;= #{time} 43 and create_time &gt;= #{time}