This commit is contained in:
2025-11-05 19:37:58 +08:00
parent 9dd567c86c
commit 5fbaf2e323
6 changed files with 141 additions and 41 deletions

View File

@@ -124,7 +124,14 @@
<if test="params.beginTime != null"> and order_time &gt;= #{params.beginTime}</if>
<if test="params.endTime != null"> and order_time &lt;= #{params.endTime}</if>
</where>
order by order_time desc
<choose>
<when test="params.orderBy != null and params.orderBy != ''">
order by ${params.orderBy} ${params.isAsc}
</when>
<otherwise>
order by order_time desc
</otherwise>
</choose>
</select>
<select id="selectOrderRowsById" parameterType="String" resultMap="OrderRowsResult">
@@ -195,7 +202,14 @@
</foreach>
</if>
</where>
order by order_time desc
<choose>
<when test="orderRows.params != null and orderRows.params.orderBy != null and orderRows.params.orderBy != ''">
order by ${orderRows.params.orderBy} ${orderRows.params.isAsc}
</when>
<otherwise>
order by order_time desc
</otherwise>
</choose>
</select>
<insert id="insertOrderRows" parameterType="OrderRows">