This commit is contained in:
2023-07-26 18:05:54 +08:00
parent a4aace1e68
commit 85908b4c70
3 changed files with 51 additions and 4 deletions

View File

@@ -218,4 +218,11 @@ public interface OrderBasicInfoMapper {
List<MerchantOrderInfoVO> getMerchantOrderInfoList(@Param("dto") QueryMerchantOrderDTO dto);
List<RefundOrder> batchRefundQuery(List<String> orderCodeList);
/**
* 根据订单编号
* @param orderCodeList 订单编号列表
* @return
*/
List<OrderBasicInfo> queryOrderList(@Param("orderCodeList") List<String> orderCodeList);
}

View File

@@ -883,8 +883,26 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
}
// 根据交易日期查询运营商下面所有站点的交易日报
List<SettleOrderReport> orderReports = settleOrderReportService.selectByMerchantIdAndDate(merchantId, tradeDate);
List<SettleOrderReport> stationReportList = settleOrderReportService.selectByMerchantIdAndDate(merchantId, tradeDate);
for (SettleOrderReport orderReport : stationReportList) {
String orderCodes = orderReport.getOrderCodes();
if (StringUtils.isBlank(orderCodes)) {
logger.warn("站点:{}, 日期:{}, 没有查到订单数据", orderReport.getStationId(), tradeDate);
continue;
}
List<String> orderCodeList = Lists.newArrayList(StringUtils.split(orderCodes, ","));
List<OrderBasicInfo> orderBasicInfos = queryOrderList(orderCodeList);
if (CollectionUtils.isEmpty(orderBasicInfos)) {
continue;
}
orderBasicInfos.parallelStream().forEach(x -> {
try {
doPaymentConfirm(x, adapayMemberAccount);
} catch (Exception e) {
logger.error("订单交易确认失败:{}", x.getOrderCode(), e);
}
});
}
}
/**
@@ -944,6 +962,19 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
}
}
/**
* 批量查询订单
* @param orderCodeList
* @return
*/
public List<OrderBasicInfo> queryOrderList(List<String> orderCodeList) {
List<OrderBasicInfo> resultList = Lists.newArrayList();
if (CollectionUtils.isEmpty(orderCodeList)) {
return resultList;
}
return orderBasicInfoMapper.queryOrderList(orderCodeList);
}
/**
* 临时订单退款
*/

View File

@@ -1082,8 +1082,6 @@
<if test="dto.endTime != null" >
and t1.settlement_time <![CDATA[ <= ]]> #{dto.endTime,jdbcType=VARCHAR}
</if>
order by t1.create_time desc
</select>
@@ -1105,4 +1103,15 @@
#{itme,jdbcType=VARCHAR}
</foreach>
</select>
<select id="queryOrderList" resultMap="OrderBasicInfoResult">
select
<include refid="Base_Column_List"/>
from order_basic_info
where del_flag = '0'
and order_code in
<foreach collection="orderCodeList" item="item" open="(" separator="," close=")">
#{item,jdbcType=VARCHAR}
</foreach>
</select>
</mapper>