Merge branch 'hotfix-tradbill' into test6.9.16
Showing
3 changed files
with
10 additions
and
4 deletions
@@ -13,5 +13,7 @@ public interface SellerOrderMapper { | @@ -13,5 +13,7 @@ public interface SellerOrderMapper { | ||
13 | 13 | ||
14 | List<SellerOrder> selectBySkups(@Param("skupList") List<Integer> skupList); | 14 | List<SellerOrder> selectBySkups(@Param("skupList") List<Integer> skupList); |
15 | 15 | ||
16 | + SellerOrder selectBySkup(@Param("skup") Integer skup); | ||
17 | + | ||
16 | SellerOrder selectByOrderCode(@Param("orderCode") String orderCode); | 18 | SellerOrder selectByOrderCode(@Param("orderCode") String orderCode); |
17 | } | 19 | } |
@@ -27,12 +27,17 @@ | @@ -27,12 +27,17 @@ | ||
27 | 27 | ||
28 | <select id="selectBySkups" resultMap="BaseResultMap"> | 28 | <select id="selectBySkups" resultMap="BaseResultMap"> |
29 | select <include refid="Base_Column_List" /> | 29 | select <include refid="Base_Column_List" /> |
30 | - from seller_order where id in | 30 | + from seller_order where skup in |
31 | <foreach collection="skupList" item="skup" open="(" close=")" separator=","> | 31 | <foreach collection="skupList" item="skup" open="(" close=")" separator=","> |
32 | #{skup} | 32 | #{skup} |
33 | </foreach> | 33 | </foreach> |
34 | </select> | 34 | </select> |
35 | 35 | ||
36 | + <select id="selectBySkup" resultMap="BaseResultMap"> | ||
37 | + select <include refid="Base_Column_List" /> | ||
38 | + from seller_order where skup = #{skup} | ||
39 | + </select> | ||
40 | + | ||
36 | <select id="selectByOrderCode" resultMap="BaseResultMap"> | 41 | <select id="selectByOrderCode" resultMap="BaseResultMap"> |
37 | select <include refid="Base_Column_List" /> | 42 | select <include refid="Base_Column_List" /> |
38 | from seller_order where order_code = #{orderCode} | 43 | from seller_order where order_code = #{orderCode} |
@@ -242,9 +242,8 @@ public class TradeBillsServiceImpl implements ITradeBillsService { | @@ -242,9 +242,8 @@ public class TradeBillsServiceImpl implements ITradeBillsService { | ||
242 | req.setOrderCode2(Optional.of(req.getOrderCode()) | 242 | req.setOrderCode2(Optional.of(req.getOrderCode()) |
243 | .map(e->buyerOrderGoodsMapper.selectByOrderCodeOne(e.toString())) | 243 | .map(e->buyerOrderGoodsMapper.selectByOrderCodeOne(e.toString())) |
244 | .map(e->e.getSkup()) | 244 | .map(e->e.getSkup()) |
245 | - .map(e->sellerOrderMapper.selectBySkups(Lists.newArrayList(e))) | ||
246 | - .filter(CollectionUtils::isNotEmpty) | ||
247 | - .map(e->e.get(0).getOrderCode()) | 245 | + .map(skup->sellerOrderMapper.selectBySkup(skup)) |
246 | + .map(sellerOrder->sellerOrder.getOrderCode()) | ||
248 | .map(Long::valueOf) | 247 | .map(Long::valueOf) |
249 | .orElse(null)); | 248 | .orElse(null)); |
250 | } | 249 | } |
-
Please register or login to post a comment