| | |
| | | String extension = FilenameUtils.getExtension(file.getOriginalFilename()); |
| | | String uuid=UUID.randomUUID().toString().replaceAll("-", ""); |
| | | String name = uuid + "."+ extension; |
| | | minioUtil.upload(file, name); |
| | | String fileName = minioUtil.uploadRetFileName(file, name); |
| | | Thumbnails.of(file.getInputStream()).scale(0.5).outputQuality(0.71).outputFormat("jpg").toFile(uuid+"_compress"); |
| | | File file1=new File(uuid+"_compress.jpg"); |
| | | String imageUrl = minioUtil.uploadFile(file1, uuid+"_compress.jpg"); |
| | | //上传完压缩图后把原图清理,防止文件服务器资源爆满 |
| | | minioUtil.removeMinio(fileName); |
| | | return R.ok(imageUrl); |
| | | } catch (Exception e) { |
| | | log.error("上传照片失败【{}】", e.getMessage()); |
| | |
| | | Map map=umfPayUtil.pay(orderid, DateUtils.getCurrentDateString(),openid,amount); |
| | | return R.ok(map); |
| | | } |
| | | @ApiOperation("无水洗车下单接口") |
| | | @GetMapping("/wsPay") |
| | | public R wsPay(@RequestParam("orderid") String orderid,@RequestParam("openid")String openid,@RequestParam("amount")String amount){ |
| | | Map map=umfPayUtil.pay2(orderid, DateUtils.getCurrentDateString(),openid,amount); |
| | | return R.ok(map); |
| | | } |
| | | } |