mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-24 04:55:08 +08:00
update 订单日报
This commit is contained in:
@@ -23,6 +23,8 @@ public interface ISettleOrderReportService {
|
||||
|
||||
SettleOrderReport selectByStationIdAndDate(String stationId, String date);
|
||||
|
||||
List<SettleOrderReport> selectByMerchantIdAndDate(String merchantId, String date);
|
||||
|
||||
/**
|
||||
* 查询结算订单报列表
|
||||
*
|
||||
@@ -69,4 +71,26 @@ public interface ISettleOrderReportService {
|
||||
* @return
|
||||
*/
|
||||
MerchantOrderReportVO getMerchantOrderReport(MerchantOrderReportDTO dto);
|
||||
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(SettleOrderReport record);
|
||||
|
||||
int insertOrUpdate(SettleOrderReport record);
|
||||
|
||||
int insertOrUpdateSelective(SettleOrderReport record);
|
||||
|
||||
int insertSelective(SettleOrderReport record);
|
||||
|
||||
SettleOrderReport selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(SettleOrderReport record);
|
||||
|
||||
int updateByPrimaryKey(SettleOrderReport record);
|
||||
|
||||
int updateBatch(List<SettleOrderReport> list);
|
||||
|
||||
int updateBatchSelective(List<SettleOrderReport> list);
|
||||
|
||||
int batchInsert(List<SettleOrderReport> list);
|
||||
}
|
||||
|
||||
@@ -118,6 +118,9 @@ public class AdapayMemberAccountServiceImpl implements IAdapayMemberAccountServi
|
||||
|
||||
@Override
|
||||
public AdapayMemberAccount selectByMerchantId(String merchantId) {
|
||||
if (StringUtils.isBlank(merchantId)) {
|
||||
return null;
|
||||
}
|
||||
String redisKey = CacheConstants.ADAPAY_MEMBER_ACCOUNT + merchantId;
|
||||
AdapayMemberAccount adapayMemberAccount = redisCache.getCacheObject(redisKey);
|
||||
if (adapayMemberAccount == null) {
|
||||
|
||||
@@ -870,16 +870,29 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
|
||||
/**
|
||||
* 订单分账逻辑
|
||||
* orderSplittingOperations
|
||||
* 只有开通结算账户的运营商才走分账逻辑
|
||||
*/
|
||||
private void ledgerAccount(OrderBasicInfo orderBasicInfo) throws BaseAdaPayException {
|
||||
private void orderSplittingOperations(String merchantId, String tradeDate) {
|
||||
// 查询运营商有没有开通结算账户
|
||||
String merchantId = orderBasicInfo.getMerchantId();
|
||||
AdapayMemberAccount adapayMemberAccount = adapayMemberAccountService.selectByMerchantId(merchantId);
|
||||
if (adapayMemberAccount == null) {
|
||||
logger.error("订单分账逻辑error, 运营商id:{}, 未配置结算账户", merchantId);
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_ADAPAY_MEMBER_IS_NULL_ERROR);
|
||||
}
|
||||
|
||||
// 根据交易日期查询运营商下面所有站点的交易日报
|
||||
List<SettleOrderReport> orderReports = settleOrderReportService.selectByMerchantIdAndDate(merchantId, tradeDate);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 交易确认
|
||||
* @param orderBasicInfo 订单
|
||||
* @param adapayMemberAccount 结算账户
|
||||
* @throws BaseAdaPayException
|
||||
*/
|
||||
private void doPaymentConfirm(OrderBasicInfo orderBasicInfo, AdapayMemberAccount adapayMemberAccount) throws BaseAdaPayException {
|
||||
// 查询订单的交易id
|
||||
AdapayCallbackRecord adapayCallbackRecord = adapayCallbackRecordService.selectByOrderCode(orderBasicInfo.getOrderCode());
|
||||
if (adapayCallbackRecord == null) {
|
||||
|
||||
@@ -46,6 +46,11 @@ public class SettleOrderReportServiceImpl implements ISettleOrderReportService {
|
||||
return settleOrderReportMapper.selectByStationIdAndDate(stationId, date);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SettleOrderReport> selectByMerchantIdAndDate(String merchantId, String date) {
|
||||
return settleOrderReportMapper.selectByMerchantIdAndDate(merchantId, date);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询结算订单报列表
|
||||
*
|
||||
@@ -104,6 +109,7 @@ public class SettleOrderReportServiceImpl implements ISettleOrderReportService {
|
||||
|
||||
/**
|
||||
* 根据运营商id查询订单报表
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@@ -161,4 +167,60 @@ public class SettleOrderReportServiceImpl implements ISettleOrderReportService {
|
||||
vo.setMerchantOrderReport(report);
|
||||
return vo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return settleOrderReportMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(SettleOrderReport record) {
|
||||
return settleOrderReportMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertOrUpdate(SettleOrderReport record) {
|
||||
return settleOrderReportMapper.insertOrUpdate(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertOrUpdateSelective(SettleOrderReport record) {
|
||||
return settleOrderReportMapper.insertOrUpdateSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(SettleOrderReport record) {
|
||||
return settleOrderReportMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SettleOrderReport selectByPrimaryKey(Integer id) {
|
||||
return settleOrderReportMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(SettleOrderReport record) {
|
||||
return settleOrderReportMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(SettleOrderReport record) {
|
||||
return settleOrderReportMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateBatch(List<SettleOrderReport> list) {
|
||||
return settleOrderReportMapper.updateBatch(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateBatchSelective(List<SettleOrderReport> list) {
|
||||
return settleOrderReportMapper.updateBatchSelective(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int batchInsert(List<SettleOrderReport> list) {
|
||||
return settleOrderReportMapper.batchInsert(list);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user