Authored by LUOXC

Merge branch 'hotfix-tradbill' into test6.9.16

... ... @@ -13,5 +13,7 @@ public interface SellerOrderMapper {
List<SellerOrder> selectBySkups(@Param("skupList") List<Integer> skupList);
SellerOrder selectBySkup(@Param("skup") Integer skup);
SellerOrder selectByOrderCode(@Param("orderCode") String orderCode);
}
... ...
... ... @@ -27,12 +27,17 @@
<select id="selectBySkups" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
from seller_order where id in
from seller_order where skup in
<foreach collection="skupList" item="skup" open="(" close=")" separator=",">
#{skup}
</foreach>
</select>
<select id="selectBySkup" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
from seller_order where skup = #{skup}
</select>
<select id="selectByOrderCode" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
from seller_order where order_code = #{orderCode}
... ...
... ... @@ -242,9 +242,8 @@ public class TradeBillsServiceImpl implements ITradeBillsService {
req.setOrderCode2(Optional.of(req.getOrderCode())
.map(e->buyerOrderGoodsMapper.selectByOrderCodeOne(e.toString()))
.map(e->e.getSkup())
.map(e->sellerOrderMapper.selectBySkups(Lists.newArrayList(e)))
.filter(CollectionUtils::isNotEmpty)
.map(e->e.get(0).getOrderCode())
.map(skup->sellerOrderMapper.selectBySkup(skup))
.map(sellerOrder->sellerOrder.getOrderCode())
.map(Long::valueOf)
.orElse(null));
}
... ...