|
|
|
@@ -43,6 +43,8 @@ public class WxPrepaymentServiceImpl implements WxPrepaymentService { |
|
|
|
public void payFirst(WxPrepayment wxPrepayment) { |
|
|
|
final IdWorker idWorker = IdWorker.get(); |
|
|
|
wxPrepayment.setId(idWorker.nextId()); |
|
|
|
wxPrepayment.setTotalAmount(wxPrepayment.getLastPayAmount()); |
|
|
|
wxPrepayment.setRemainAmount(wxPrepayment.getLastPayAmount()); |
|
|
|
wxPrepaymentMapper.insertSelective(wxPrepayment); |
|
|
|
addPrepaymentHistory(wxPrepayment); |
|
|
|
} |
|
|
|
@@ -64,8 +66,6 @@ public class WxPrepaymentServiceImpl implements WxPrepaymentService { |
|
|
|
wxPrepaymentHistory.setId(idWorker.nextId()); |
|
|
|
wxPrepaymentHistory.setTenantId(wxPrepayment.getTenantId()); |
|
|
|
wxPrepaymentHistory.setMerchantId(wxPrepayment.getMerchantId()); |
|
|
|
wxPrepaymentHistory.setPayWay(wxPrepayment.getLastPayWay()); |
|
|
|
wxPrepaymentHistory.setPayType(wxPrepayment.getLastPayType()); |
|
|
|
String lastPayAmount = new BigDecimal(wxPrepayment.getLastPayAmount()).divide(new BigDecimal(100)).setScale(2).toPlainString(); |
|
|
|
wxPrepaymentHistory.setAmountDetail("+" + lastPayAmount + "元"); |
|
|
|
wxPrepaymentHistory.setRemainAmount(wxPrepayment.getRemainAmount()); |
|
|
|
|