| | |
| | | return ResponseWarpper.success(ResultUtil.error("账号已冻结")); |
| | | } |
| | | } |
| | | String numberRandom = UUIDUtil.getNumberRandom(4); |
| | | String numberRandom = UUIDUtil.getNumberRandom(5); |
| | | SendSmsRequest request = new SendSmsRequest(); |
| | | request.setDestAddress(phone); |
| | | request.setTemplateId("TPL202410290001"); |
| | |
| | | name = UUIDUtil.getRandomCode() + name.substring(name.lastIndexOf(".")); |
| | | File file1 = FileUtil.writeFromStream(inputStream, new File(filePath + name)); |
| | | HttpRequest post = HttpUtil.createPost(adminUrl + "/upload/image"); |
| | | HttpRequest form = post.form("file", file1); |
| | | HttpResponse execute = form.execute(); |
| | | post.form("file", file1); |
| | | HttpResponse execute = post.execute(); |
| | | int status = execute.getStatus(); |
| | | if(200 != status){ |
| | | throw new RuntimeException("上传图片异常"); |