Authored by mali

二手获取支付时间bug

... ... @@ -28,5 +28,5 @@ public interface BuyerOrderGoodsMapper {
List<BuyerOrderGoods> selectByOrderCodes(@Param("orderCodes") List<Long> orderCodes);
List<BuyerOrderGoods> selectOrderBySkups(@Param("skup") Integer skup);
}
\ No newline at end of file
... ...
... ... @@ -178,4 +178,10 @@
</foreach>
</select>
<select id="selectOrderBySkups" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from buyer_order_goods
where skup = #{skup,jdbcType=INTEGER} order by id ASC
</select>
</mapper>
\ No newline at end of file
... ...
... ... @@ -204,13 +204,12 @@ public class OrdersPayService {
public OrdersPay getOrderPayBySkup(Integer skup){
ArrayList<Integer> skupList = Lists.newArrayList(skup);
List<BuyerOrderGoods> bogs= buyerOrderGoodsMapper.selectBySkups(skupList);
List<BuyerOrderGoods> bogs= buyerOrderGoodsMapper.selectOrderBySkups(skup);
if(CollectionUtils.isEmpty(bogs)){
logger.warn("getOrderPayBySkup empty list ,skup {}",skup);
return null;
}
BuyerOrderGoods bog = bogs.get(0);
BuyerOrderGoods bog = bogs.get(bogs.size() - 1);
return ordersPayMapper.selectOrdersPay(bog.getOrderCode(), bog.getUid());
}
... ...