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