|
@@ -45,12 +45,9 @@ public class InvoiceManagementServiceImpl implements InvoiceManagementService {
|
|
|
emailService.send(sendBo);
|
|
|
|
|
|
LambdaUpdateWrapper<ChargeRecord> wrapper = new LambdaUpdateWrapper<>();
|
|
|
- wrapper.eq(ChargeRecord::getId, bo.getId())
|
|
|
- .set(ChargeRecord::getWhetherInvoice, 1);
|
|
|
+ wrapper.eq(ChargeRecord::getId, bo.getId()).set(ChargeRecord::getWhetherInvoice, 1);
|
|
|
int updateFlag = chargeRecordMapper.update(wrapper);
|
|
|
- if (updateFlag <= 0) {
|
|
|
- throw new RuntimeException("开票失败!");
|
|
|
- }
|
|
|
+ if (updateFlag <= 0) throw new RuntimeException("开票失败!");
|
|
|
|
|
|
ChargeRecord chargeRecord = chargeRecordMapper.selectById(bo.getId());
|
|
|
|
|
@@ -66,9 +63,7 @@ public class InvoiceManagementServiceImpl implements InvoiceManagementService {
|
|
|
record.setFailReason("");
|
|
|
|
|
|
int insertFlag = invoiceRecordMapper.insert(record);
|
|
|
- if (insertFlag <= 0) {
|
|
|
- throw new RuntimeException("开票失败!");
|
|
|
- }
|
|
|
+ if (insertFlag <= 0) throw new RuntimeException("开票失败!");
|
|
|
|
|
|
return R.ok();
|
|
|
}
|