Commit 0c5e8488 by 刘宇峰

创建订单时异步子订单处理、修复商品差价范围查询

1 parent fb762e15
......@@ -15,6 +15,7 @@ import com.glsx.plat.common.utils.DateUtils;
import com.glsx.plat.common.utils.SnowFlake;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import tk.mybatis.mapper.entity.Example;
......@@ -104,9 +105,9 @@ public class OrderChildService {
* @author huangch
* @date 2023/4/12 15:00
*/
// @Async
@Async
@Transactional(rollbackFor = Exception.class)
public List<OrderChild> createOrderChild(String tparOrderCode, String parentOrderCode) {
public List<OrderChildOrderDetailItem> createOrderChild(String tparOrderCode, String parentOrderCode) {
QueryOrderDetailResponse orderDetail = cloudCraneService.queryOrderDetail(QueryOrderDetailRequest.builder().parentOrderCode(parentOrderCode).build());
......@@ -165,7 +166,7 @@ public class OrderChildService {
}
orderChildMapper.insertList(orderChildList);
orderChildGoodsMapper.insertList(orderChildGoodsList);
return orderChildList;
return orderDetail.getChildOrderList();
}
public void updateOrderChildByExample(List<OrderChild> orderClidList) {
......
......@@ -138,16 +138,19 @@
and sg.sell_price &gt;= #{startSellPrice}
</if>
<if test="endSellPrice != null">
and sg.sell_price &lt; #{endSellPrice}
and sg.sell_price &lt;= #{endSellPrice}
</if>
<if test="startMarketPrice != null">
and sg.market_price &gt;= #{startMarketPrice}
</if>
<if test="endMarketPrice != null">
and sg.market_price &lt; #{endMarketPrice}
and sg.market_price &lt;= #{endMarketPrice}
</if>
<if test="startDiffPrice != null and endDiffPrice != null">
and (sg.market_price-sg.sell_price) between #{startDiffPrice} and #{endDiffPrice}
<if test="startDiffPrice != null">
and (sg.market_price-sg.sell_price) &gt;= #{startDiffPrice}
</if>
<if test="endDiffPrice != null">
and (sg.market_price-sg.sell_price) &lt;= #{endDiffPrice}
</if>
<if test="shelvesStatus != null">
and sg.shelves_status = #{shelvesStatus}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!