Merge branch 'hotfix-tradbill' into test6.9.16
Showing
3 changed files
with
13 additions
and
7 deletions
@@ -10,8 +10,10 @@ import com.yoho.order.model.SellerOrder; | @@ -10,8 +10,10 @@ import com.yoho.order.model.SellerOrder; | ||
10 | * Created by caoyan on 2018/9/12. | 10 | * Created by caoyan on 2018/9/12. |
11 | */ | 11 | */ |
12 | public interface SellerOrderMapper { | 12 | public interface SellerOrderMapper { |
13 | - | 13 | + |
14 | List<SellerOrder> selectBySkups(@Param("skupList") List<Integer> skupList); | 14 | List<SellerOrder> selectBySkups(@Param("skupList") List<Integer> skupList); |
15 | + | ||
16 | + SellerOrder selectBySkup(@Param("skup") Integer skup); | ||
15 | 17 | ||
16 | SellerOrder selectByOrderCode(@Param("orderCode") String orderCode); | 18 | SellerOrder selectByOrderCode(@Param("orderCode") String orderCode); |
17 | } | 19 | } |
@@ -24,14 +24,19 @@ | @@ -24,14 +24,19 @@ | ||
24 | select <include refid="Base_Column_List" /> | 24 | select <include refid="Base_Column_List" /> |
25 | from seller_order where id = #{id} | 25 | from seller_order where id = #{id} |
26 | </select> | 26 | </select> |
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 | + | ||
36 | + <select id="selectBySkup" resultMap="BaseResultMap"> | ||
37 | + select <include refid="Base_Column_List" /> | ||
38 | + from seller_order where skup = #{skup} | ||
39 | + </select> | ||
35 | 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" /> |
@@ -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