|
@@ -58,19 +58,19 @@ public class RepairInvoiceServiceImpl extends ServiceImpl<IRepairInvoiceMapper,
|
|
|
throw new BusinessException(ResultCode.ORDER_INVOICE_OPEN);
|
|
|
}
|
|
|
if(repairInvoice.getInvoiceType() == 0){ //普通发票邮件发送,专用发票邮寄
|
|
|
- if(StringUtils.isBlank(param.getInvoiceNo()) || StringUtils.isBlank(param.getEInvoiceImg())){
|
|
|
+ if(StringUtils.isBlank(param.getInvoiceNo()) || StringUtils.isBlank(param.getInvoiceImg())){
|
|
|
throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
|
}
|
|
|
LambdaUpdateWrapper<RepairInvoice> wrapper = new LambdaUpdateWrapper<>();
|
|
|
wrapper.eq(RepairInvoice::getInvoiceId,param.getInvoiceId());
|
|
|
wrapper.set(RepairInvoice::getInvoiceNo,param.getInvoiceNo());
|
|
|
- wrapper.set(RepairInvoice::getEInvoiceImg,param.getEInvoiceImg());
|
|
|
+ wrapper.set(RepairInvoice::getInvoiceImg,param.getInvoiceImg());
|
|
|
wrapper.set(RepairInvoice::getStatus,1);
|
|
|
wrapper.set(RepairInvoice::getSysUserId,userId);
|
|
|
this.update(wrapper);
|
|
|
|
|
|
MailTemplate mailTemplate = this.setMailMsg(repairInvoice.getRepairId(),repairInvoice.getInvoiceEmail());
|
|
|
- Boolean mail = mailTemplateService.sendMail(repairInvoice.getInvoiceEmail(), mailTemplate,param.getEInvoiceImg());
|
|
|
+ Boolean mail = mailTemplateService.sendMail(repairInvoice.getInvoiceEmail(), mailTemplate,param.getInvoiceImg());
|
|
|
if(!mail){
|
|
|
throw new BusinessException(ResultCode.MAIL_SEND_ERROR);
|
|
|
}
|