Commit b986771a by wangling

修改sql,只取最新的网吧旅店信息

parent c130caf8
......@@ -209,18 +209,22 @@
<include refid = "bkbzxx_where_sql" />
</select>
<select id="selectBkrwbzxx" parameterType="com.founder.interservice.bkxx.model.Bkbzxx" resultType="com.founder.interservice.bkxx.model.Bkbzxx">
SELECT
t2.pk_value as pkValue,
t2.bzid as bzid,
t2.bkfknr as bkfknr,
t2.bkzyid as bkzyid,
t2.bkzy as bkzy,
t2.sffs as sffs,
t2.sfsc as sfsc,
t2.type as type,
t2.createdtime as createdtime
from Z_AJBK_BZXX t2
WHERE 1=1
<include refid = "bkbzxx_where_sql" />
SELECT *
FROM (SELECT ROW_NUMBER ()
OVER (PARTITION BY t2.bkzy ORDER BY t2.createdtime DESC)
rn,
t2.pk_value as pkValue,
t2.bzid as bzid,
t2.bkfknr as bkfknr,
t2.bkzyid as bkzyid,
t2.bkzy as bkzy,
t2.sffs as sffs,
t2.sfsc as sfsc,
t2.type as type,
t2.createdtime as createdtime
FROM Z_AJBK_BZXX t2
WHERE 1=1
<include refid = "bkbzxx_where_sql" />)
WHERE rn = 1
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment