Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-api-boot-master
Commits
531164a7
Commit
531164a7
authored
Sep 12, 2024
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单动态多参数查询bug修复
parent
644b7db7
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
230 additions
and
83 deletions
+230
-83
OrderQueryVO.java
.../cn/iocoder/yudao/module/order/vo/order/OrderQueryVO.java
+118
-82
OrderMapper.xml
...rder-core/src/main/resources/mapper/order/OrderMapper.xml
+112
-1
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/vo/order/OrderQueryVO.java
View file @
531164a7
This diff is collapsed.
Click to expand it.
yudao-module-order/yudao-module-order-core/src/main/resources/mapper/order/OrderMapper.xml
View file @
531164a7
...
...
@@ -140,8 +140,115 @@
<include
refid=
"myOrderQuery"
>
</include>
</select>
<sql
id=
"dynamicQuery"
>
<if
test=
"query.dynamicStatusList != null and query.dynamicStatusList.size()>0"
>
AND (1 != 1
<if
test=
"query.dynamicStatusList.size()==1 "
>
or o.`status` =
<foreach
item=
'status'
index=
"index"
collection=
'query.statusList'
>
#{status}
</foreach>
</if>
<if
test=
"query.dynamicStatusList.size()>1 "
>
or o.`status` in
<foreach
item=
'status'
index=
"index"
collection=
'query.statusList'
open=
'('
separator=
','
close=
')'
>
#{status}
</foreach>
</if>
<if
test=
"query.dynamicShipmentStateList != null and query.dynamicShipmentStateList.size()>0"
>
<if
test=
"query.dynamicShipmentStateList.size()==1 "
>
AND o.`shipment_State` =
<foreach
item=
'shipmentState'
index=
"index"
collection=
'query.dynamicShipmentStateList'
>
#{shipmentState}
</foreach>
</if>
<if
test=
"query.dynamicShipmentStateList.size()>1 "
>
AND o.`shipment_State` in
<foreach
item=
'shipmentState'
index=
"index"
collection=
'query.dynamicShipmentStateList'
open=
'('
separator=
','
close=
')'
>
#{shipmentState}
</foreach>
</if>
</if>
<if
test=
"query.dynamicTransportIdList != null and query.dynamicTransportIdList.size() > 0"
>
o.`transport_id` in
<foreach
item=
'transportId'
index=
'index'
collection=
'query.dynamicTransportIdList'
open=
'('
separator=
','
close=
')'
>
#{transportId}
</foreach>
</if>
<if
test=
"query.dynamicAirShipmentList != null and query.dynamicAirShipmentList.size() > 0"
>
<foreach
item=
'airShipment'
index=
"index"
collection=
'query.dynamicAirShipmentList'
>
<choose>
<when
test=
"airShipment == 1"
>
or (o.`status` = 5 AND o.air_shipment = 1 and abnormal_state = 0 and audit_type = 0)
</when>
<when
test=
"airShipment == 2"
>
or (o.`status` = 5 AND o.air_shipment = 2)
</when>
<when
test=
"airShipment == 3"
>
or (o.`status` = 5 AND o.air_shipment = 3)
</when>
<when
test=
"airShipment == 4"
>
or (o.`status` = 5 AND o.air_shipment = 4)
</when>
<when
test=
"airShipment == 10"
>
or (o.`status` = 5 AND o.air_shipment in(2,3,4))
</when>
<when
test=
"airShipment == 11"
>
or (o.`status` = 5 AND o.air_shipment in(1,2,3,4) and abnormal_state = 0 and audit_type = 0)
</when>
<when
test=
"airShipment == 12"
>
or (o.`status` = 5 AND o.air_shipment in(2,3) and abnormal_state = 0 and audit_type = 0)
</when>
<when
test=
"airShipment == 20"
>
or (o.`status` = 5 AND o.air_shipment in(0,2,3,4) and abnormal_state = 0 and audit_type = 0)
</when>
</choose>
</foreach>
</if>
<if
test=
"query.dynamicAbnormalStateList != null and query.dynamicAbnormalStateList.size()>0"
>
<foreach
item=
'abnormalState'
index=
"index"
collection=
'query.dynamicAbnormalStateList'
>
<choose>
<when
test=
"abnormalState != '0'"
>
<choose>
<when
test=
"abnormalState != '-1'"
>
OR o.`abnormal_state` = #{abnormalState}
</when>
<otherwise>
OR o.`abnormal_state` != 0
</otherwise>
</choose>
</when>
<otherwise>
OR o.`abnormal_state` = 0
</otherwise>
</choose>
</foreach>
</if>
<if
test=
"query.dynamicAuditTypeList != null and query.dynamicAuditTypeList.size()>0"
>
<foreach
item=
'auditType'
index=
"index"
collection=
'query.dynamicAuditTypeList'
>
<choose>
<when
test=
"auditType != 0"
>
<choose>
<when
test=
"auditType != -1"
>
or o.`audit_type` = #{auditType}
</when>
<otherwise>
or o.`audit_type` != 0
</otherwise>
</choose>
</when>
<otherwise>
or o.`audit_type` = 0
</otherwise>
</choose>
</foreach>
</if>
)
</if>
</sql>
<sql
id=
"orderQuerySql"
>
<include
refid=
"dynamicQuery"
/>
<if
test=
"query.isNeat == false "
>
AND o.sum_num
<![CDATA[ < ]]>
o.cost->>'$.totalNum'
</if>
...
...
@@ -367,7 +474,6 @@
#{shipmentState}
</foreach>
</if>
<if
test=
"query.shipmentStateList != null and query.shipmentStateList.size()>1 "
>
AND o.`shipment_State` in
<foreach
item=
'shipmentState'
index=
"index"
collection=
'query.shipmentStateList'
open=
'('
separator=
','
close=
')'
>
...
...
@@ -742,6 +848,7 @@
</sql>
<sql
id=
"myOrderQuerySql"
>
<include
refid=
"dynamicQuery"
/>
<if
test=
"query.isNeat == false "
>
AND o.sum_num
<![CDATA[ < ]]>
o.cost->>'$.totalNum'
</if>
...
...
@@ -1690,6 +1797,7 @@
</select>
<sql
id=
"myOrderQuery"
>
<include
refid=
"dynamicQuery"
/>
<if
test=
"query.isNeat == false "
>
AND o.sum_num
<![CDATA[ < ]]>
o.cost->>'$.totalNum'
</if>
...
...
@@ -2486,6 +2594,7 @@
<sql
id=
"orderQuery"
>
<include
refid=
"dynamicQuery"
/>
<if
test=
"query.isNeat == false "
>
AND o.sum_num
<![CDATA[ < ]]>
o.cost->>'$.totalNum'
</if>
...
...
@@ -3433,6 +3542,7 @@
</sql>
<sql
id=
"issuedOrderQuery"
>
<include
refid=
"dynamicQuery"
/>
<if
test=
"query.isNeat == false "
>
AND o.sum_num
<![CDATA[ < ]]>
o.cost->>'$.totalNum'
</if>
...
...
@@ -5073,6 +5183,7 @@
<include
refid=
"appOrderQurey"
/>
</select>
<sql
id=
"appOrderQurey"
>
<include
refid=
"dynamicQuery"
/>
<if
test=
"query.isNeat == false "
>
AND o.sum_num
<![CDATA[ < ]]>
o.cost->>'$.totalNum'
</if>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment