Browse Source

优化排序

develop
zhaoxianglong 10 months ago
parent
commit
d4daacdf04
  1. 15
      zc-business/src/main/resources/mapper/business/StatusMapper.xml

15
zc-business/src/main/resources/mapper/business/StatusMapper.xml

@ -121,6 +121,9 @@
AND d.use_state = #{status.useState}
</if>
</where>
<if test="status.orderByField != null and status.orderDirection != null">
ORDER BY ${status.orderByField} ${status.orderDirection}
</if>
</select>
@ -185,6 +188,9 @@
AND d.use_state = #{status.useState}
</if>
</where>
<if test="status.orderByField != null and status.orderDirection != null">
ORDER BY ${status.orderByField} ${status.orderDirection}
</if>
</select>
@ -222,6 +228,9 @@
d.device_type,
DAY (s.time)
</where>
<if test="status.orderByField != null and status.orderDirection != null">
ORDER BY ${status.orderByField} ${status.orderDirection}
</if>
</select>
@ -251,6 +260,9 @@
AND d.use_state = #{status.useState}
</if>
</where>
<if test="status.orderByField != null and status.orderDirection != null">
ORDER BY ${status.orderByField} ${status.orderDirection}
</if>
</select>
<select id="deviceStatusListById" parameterType="com.zc.business.domain.Status" resultMap="BaseResultMap">
@ -264,6 +276,9 @@
AND s.device_id = #{status.deviceId}
</if>
</where>
<if test="status.orderByField != null and status.orderDirection != null">
ORDER BY ${status.orderByField} ${status.orderDirection}
</if>
</select>
</mapper>

Loading…
Cancel
Save