소스 검색

[微信分账][修改]:分账完结接口

release_toaliyun_real
Stormeye Wu 7 년 전
부모
커밋
40bcdc74fa
2개의 변경된 파일16개의 추가작업 그리고 20개의 파일을 삭제
  1. +1
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxCardSpendServiceImpl.java
  2. +15
    -20
      mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingOrderServiceImpl.java

+ 1
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxCardSpendServiceImpl.java 파일 보기

@@ -275,6 +275,7 @@ public class WxCardSpendServiceImpl implements WxCardSpendService {
if(cardSpend.getCardRemainAmount().equals(0)) {
// 卡已被抵扣,但是分账还有余额
if (cardSpend.getCardRemainRealAmount() > 0) {
shareOrder.setOrderId(null);
shareOrder.setPayAmount(0);
shareOrder.setShareAmount(cardInfo.getRemainingShareFeeAmount());
shareOrder.setType(EnumProfitSharingOrderType.PROFIT_SHARING_FINISH.getCode());


+ 15
- 20
mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingOrderServiceImpl.java 파일 보기

@@ -432,27 +432,22 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ

//分账检查是否已创建分账订单
WxProfitSharingOrder record = new WxProfitSharingOrder();

//创建分账订单
Date currentDate = new Date();
record = new WxProfitSharingOrder();
record.setId(idworker.nextId());
record.setTenantId(sharingOrderDto.getTenantId());
record.setTransactionId(sharingOrderDto.getTransactionId());
record.setOrderId(sharingOrderDto.getOrderId());
record = wxProfitSharingOrderMapper.selectOne(record);
if (record == null) {
//创建分账订单
Date currentDate = new Date();
record = new WxProfitSharingOrder();
record.setId(idworker.nextId());
record.setTenantId(sharingOrderDto.getTenantId());
record.setTransactionId(sharingOrderDto.getTransactionId());
record.setOrderId(sharingOrderDto.getOrderId());
record.setPayAmount(sharingOrderDto.getPayAmount());
record.setMerchantId(sharingOrderDto.getMerchantId());
record.setSharingStatus(EnumProfitSharingOrderStatus.PROFIT_SHARING_UNKNOWN.getCode());
record.setCreateTime(currentDate);
record.setUpdateTime(currentDate);
record.setPayTimeStart(sharingOrderDto.getPayTimeStart());
record.setPayTimeEnd(sharingOrderDto.getPayTimeEnd());
record.setType(sharingOrderDto.getType());
wxProfitSharingOrderMapper.insertSelective(record);
}
record.setPayAmount(sharingOrderDto.getPayAmount());
record.setMerchantId(sharingOrderDto.getMerchantId());
record.setSharingStatus(EnumProfitSharingOrderStatus.PROFIT_SHARING_UNKNOWN.getCode());
record.setCreateTime(currentDate);
record.setUpdateTime(currentDate);
record.setPayTimeStart(sharingOrderDto.getPayTimeStart());
record.setPayTimeEnd(sharingOrderDto.getPayTimeEnd());
record.setType(sharingOrderDto.getType());
wxProfitSharingOrderMapper.insertSelective(record);

//分账提交
WxProfitSharingFinishP psFCmd = new WxProfitSharingFinishP();


불러오는 중...
취소
저장