| | |
| | | * |
| | | * @param id 应收账单ID |
| | | * @param pushStatus 推送状态 |
| | | * @param pushFailReason 推送失败原因 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int updatePushStatus(Integer id, Integer pushStatus, String pushFailReason) { |
| | | public int updatePushStatus(Integer id, Integer pushStatus) { |
| | | TmsArBill tmsArBill = new TmsArBill(); |
| | | tmsArBill.setId(id); |
| | | tmsArBill.setPushStatus(pushStatus); |
| | | tmsArBill.setPushTime(DateUtils.getNowDate()); |
| | | tmsArBill.setPushFailReason(pushFailReason); |
| | | return tmsArBillMapper.updateTmsArBill(tmsArBill); |
| | | } |
| | | |
| | |
| | | // 更新推送状态为成功 |
| | | tmsArBill.setPushStatus(2); |
| | | tmsArBill.setPushTime(DateUtils.getNowDate()); |
| | | tmsArBill.setPushFailReason(null); |
| | | tmsArBillMapper.updateTmsArBill(tmsArBill); |
| | | } catch (Exception e) { |
| | | logger.error("推送数据到外部系统失败,账单ID: {}, 客户: {}", |
| | |
| | | // 更新推送状态为失败 |
| | | tmsArBill.setPushStatus(3); |
| | | tmsArBill.setPushTime(DateUtils.getNowDate()); |
| | | tmsArBill.setPushFailReason(e.getMessage()); |
| | | tmsArBillMapper.updateTmsArBill(tmsArBill); |
| | | } |
| | | } |