Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
platform
/
platform-shopmall-parent
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0c5e8488
authored
Apr 27, 2023
by
刘宇峰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
创建订单时异步子订单处理、修复商品差价范围查询
1 parent
fb762e15
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
platform-shopmall/src/main/java/cn/com/glsx/admin/modules/service/OrderChildService.java
platform-shopmall/src/main/resources/mapper/GoodsMapper.xml
platform-shopmall/src/main/java/cn/com/glsx/admin/modules/service/OrderChildService.java
View file @
0c5e848
...
@@ -15,6 +15,7 @@ import com.glsx.plat.common.utils.DateUtils;
...
@@ -15,6 +15,7 @@ import com.glsx.plat.common.utils.DateUtils;
import
com.glsx.plat.common.utils.SnowFlake
;
import
com.glsx.plat.common.utils.SnowFlake
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
tk.mybatis.mapper.entity.Example
;
import
tk.mybatis.mapper.entity.Example
;
...
@@ -104,9 +105,9 @@ public class OrderChildService {
...
@@ -104,9 +105,9 @@ public class OrderChildService {
* @author huangch
* @author huangch
* @date 2023/4/12 15:00
* @date 2023/4/12 15:00
*/
*/
//
@Async
@Async
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
List
<
OrderChild
>
createOrderChild
(
String
tparOrderCode
,
String
parentOrderCode
)
{
public
List
<
OrderChild
OrderDetailItem
>
createOrderChild
(
String
tparOrderCode
,
String
parentOrderCode
)
{
QueryOrderDetailResponse
orderDetail
=
cloudCraneService
.
queryOrderDetail
(
QueryOrderDetailRequest
.
builder
().
parentOrderCode
(
parentOrderCode
).
build
());
QueryOrderDetailResponse
orderDetail
=
cloudCraneService
.
queryOrderDetail
(
QueryOrderDetailRequest
.
builder
().
parentOrderCode
(
parentOrderCode
).
build
());
...
@@ -165,7 +166,7 @@ public class OrderChildService {
...
@@ -165,7 +166,7 @@ public class OrderChildService {
}
}
orderChildMapper
.
insertList
(
orderChildList
);
orderChildMapper
.
insertList
(
orderChildList
);
orderChildGoodsMapper
.
insertList
(
orderChildGoodsList
);
orderChildGoodsMapper
.
insertList
(
orderChildGoodsList
);
return
order
ChildList
;
return
order
Detail
.
getChildOrderList
()
;
}
}
public
void
updateOrderChildByExample
(
List
<
OrderChild
>
orderClidList
)
{
public
void
updateOrderChildByExample
(
List
<
OrderChild
>
orderClidList
)
{
...
...
platform-shopmall/src/main/resources/mapper/GoodsMapper.xml
View file @
0c5e848
...
@@ -138,16 +138,19 @@
...
@@ -138,16 +138,19 @@
and sg.sell_price
>
= #{startSellPrice}
and sg.sell_price
>
= #{startSellPrice}
</if>
</if>
<if
test=
"endSellPrice != null"
>
<if
test=
"endSellPrice != null"
>
and sg.sell_price
<
#{endSellPrice}
and sg.sell_price
<
=
#{endSellPrice}
</if>
</if>
<if
test=
"startMarketPrice != null"
>
<if
test=
"startMarketPrice != null"
>
and sg.market_price
>
= #{startMarketPrice}
and sg.market_price
>
= #{startMarketPrice}
</if>
</if>
<if
test=
"endMarketPrice != null"
>
<if
test=
"endMarketPrice != null"
>
and sg.market_price
<
#{endMarketPrice}
and sg.market_price
<
=
#{endMarketPrice}
</if>
</if>
<if
test=
"startDiffPrice != null and endDiffPrice != null"
>
<if
test=
"startDiffPrice != null"
>
and (sg.market_price-sg.sell_price) between #{startDiffPrice} and #{endDiffPrice}
and (sg.market_price-sg.sell_price)
>
= #{startDiffPrice}
</if>
<if
test=
"endDiffPrice != null"
>
and (sg.market_price-sg.sell_price)
<
= #{endDiffPrice}
</if>
</if>
<if
test=
"shelvesStatus != null"
>
<if
test=
"shelvesStatus != null"
>
and sg.shelves_status = #{shelvesStatus}
and sg.shelves_status = #{shelvesStatus}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment