为排序字段添加白名单验证
This commit is contained in:
@@ -500,7 +500,12 @@
|
|||||||
order by materialId desc
|
order by materialId desc
|
||||||
</if>
|
</if>
|
||||||
<if test="column != 'createTime'">
|
<if test="column != 'createTime'">
|
||||||
order by ${column} ${order}
|
<if test="column == 'barCode' or column == 'numSum' or column == 'priceSum'">
|
||||||
|
order by ${column}
|
||||||
|
<if test="order == 'asc' or order == 'desc'">
|
||||||
|
${order}
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
</if>
|
</if>
|
||||||
<if test="offset != null and rows != null">
|
<if test="offset != null and rows != null">
|
||||||
limit #{offset},#{rows}
|
limit #{offset},#{rows}
|
||||||
@@ -706,7 +711,12 @@
|
|||||||
order by oper_time desc,number desc
|
order by oper_time desc,number desc
|
||||||
</if>
|
</if>
|
||||||
<if test="column != 'createTime'">
|
<if test="column != 'createTime'">
|
||||||
order by ${column} ${order}
|
<if test="column == 'barCode' or column == 'operNumber' or column == 'unitPrice' or column == 'allPrice'">
|
||||||
|
order by ${column}
|
||||||
|
<if test="order == 'asc' or order == 'desc'">
|
||||||
|
${order}
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
</if>
|
</if>
|
||||||
<if test="offset != null and rows != null">
|
<if test="offset != null and rows != null">
|
||||||
limit #{offset},#{rows}
|
limit #{offset},#{rows}
|
||||||
|
|||||||
@@ -698,7 +698,12 @@
|
|||||||
order by m.id desc
|
order by m.id desc
|
||||||
</if>
|
</if>
|
||||||
<if test="column != 'createTime'">
|
<if test="column != 'createTime'">
|
||||||
order by ${column} ${order}
|
<if test="column == 'mBarCode' or column == 'purchaseDecimal' or column == 'currentStock' or column == 'currentStockPrice' or column == 'currentWeight'">
|
||||||
|
order by ${column}
|
||||||
|
<if test="order == 'asc' or order == 'desc'">
|
||||||
|
${order}
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
</if>
|
</if>
|
||||||
<if test="offset != null and rows != null">
|
<if test="offset != null and rows != null">
|
||||||
limit #{offset},#{rows}
|
limit #{offset},#{rows}
|
||||||
|
|||||||
Reference in New Issue
Block a user