| | |
| | | @RequestParam("invoiceUrl") String invoiceUrl){ |
| | | TOrderInvoice orderInvoice = orderInvoiceService.getById(id); |
| | | orderInvoice.setInvoiceUrl(invoiceUrl); |
| | | orderInvoice.setStatus(3); |
| | | orderInvoiceService.updateById(orderInvoice); |
| | | // 发送邮箱 |
| | | // 收件人电子邮箱,TODO 换成自己的收件箱 |
| | |
| | | byte[] imageBytes = IOUtils.toByteArray(inputStream); |
| | | |
| | | // 创建临时文件 |
| | | File tempFile = File.createTempFile("tempImage", ".png"); |
| | | // 截取imageUrl后缀名 |
| | | String fileExtension = imageUrl.substring(imageUrl.lastIndexOf(".")); |
| | | File tempFile = File.createTempFile("tempImage", fileExtension); |
| | | try (FileOutputStream fos = new FileOutputStream(tempFile)) { |
| | | fos.write(imageBytes); |
| | | } |