| | |
| | | System.out.println("根据id获取用户:"+id); |
| | | return appUserService.getById(id); |
| | | } |
| | | // 获取所有用户 |
| | | @PostMapping("/getAppUserAll") |
| | | public List<AppUser> getAppUserAll() { |
| | | return appUserService.list(); |
| | | } |
| | | |
| | | @PostMapping("/getBaseUserById") |
| | | public R<Map<String, Object>> getBaseUserById(@RequestParam("id") Long id) { |
| | |
| | | if (result == null || result.get("total_points") == null) { |
| | | userStatistics.setTotalScore(0L); |
| | | }else { |
| | | userStatistics.setTotalScore(((BigDecimal) result.get("total_points")).longValue()); |
| | | userStatistics.setTotalScore(Long.valueOf(result.get("total_points").toString())); |
| | | } |
| | | //条件构造 消费积分现金支付金额 |
| | | queryWrapper.clear(); |
| | |
| | | return R.ok(s); |
| | | }*/ |
| | | |
| | | private static final String FILE_DIRECTORY = "/var/files/ldf_files"; // Linux路径 |
| | | private static final String FILE_DIRECTORY = "/dev/xvdb/project/upload_files"; // Linux路径 |
| | | // private static final String FILE_DIRECTORY = "E://ldf_files"; // Linux路径 |
| | | |
| | | @PostMapping("/upload") |
| | |
| | | File targetFile = new File(filePath); |
| | | file.transferTo(targetFile); |
| | | // 5. 返回可访问的URL(修正路径分隔符为Web格式) |
| | | return R.ok("http://zjrqxny.com/account/app-user/download" + datePath + "/" + UUID+file.getOriginalFilename()); |
| | | return R.ok("https://zjrqxny.com/images" + datePath + "/" + UUID+file.getOriginalFilename()); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | return R.fail("上传文件失败"); |