| | |
| | | // System.err.println(url); |
| | | return ajax; |
| | | } |
| | | |
| | | @ApiOperation(value = "文件上传", notes = "多个文件上传") |
| | | @PostMapping("/uploadFiles") |
| | | // 新增:批量上传文件 |
| | | public List<String> uploadFiles(List<MultipartFile> files) { |
| | | List<String> urlList = new ArrayList<>(); |
| | | if (files == null || files.isEmpty()) { |
| | | return urlList; // 返回空列表 |
| | | } |
| | | |
| | | for (MultipartFile file : files) { |
| | | if (file.isEmpty()) { |
| | | continue; // 跳过空文件 |
| | | } |
| | | // 调用单个上传方法,添加到URL列表 |
| | | String url = null; |
| | | try { |
| | | AjaxResult ajax = uploadFile(file); |
| | | url = ajax.get("url").toString(); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | if (url != null) { |
| | | urlList.add(url); |
| | | } |
| | | } |
| | | return urlList; |
| | | } |
| | | |
| | | /** |
| | | * 通用上传请求(多个) |
| | | */ |
| | |
| | | if (order==null |
| | | ||order.getDelFlag().equals(DelFlagConstant.DELETE) |
| | | ||!Objects.equals(order.getAppUserId(), appuser.getId())){ |
| | | throw new ServiceException("订单id错误"); |
| | | throw new ServiceException("该订单不存在"); |
| | | } |
| | | if (order.getOrderStatus()!=1 && order.getOrderStatus()!=2){ |
| | | throw new ServiceException("订单状态错误"); |
| | | if (order.getOrderStatus()==3){ |
| | | throw new ServiceException("订单已被取消"); |
| | | }else if (order.getOrderStatus()==4){ |
| | | throw new ServiceException("订单已完成,不可修改"); |
| | | }else if (order.getOrderStatus()==5){ |
| | | throw new ServiceException("订单已完成,不可修改"); |
| | | } |
| | | |
| | | //判断地址簿id是否存在 |
| | | if (setConfirmOrderDTO.getAddressBookId()!=null){ |
| | | AddressBook addressBook = addressBookMapper.selectById(setConfirmOrderDTO.getAddressBookId()); |
| | |
| | | .authorizeHttpRequests((requests) -> { |
| | | permitAllUrl.getUrls().forEach(url -> requests.antMatchers(url).permitAll()); |
| | | // 对于登录login 注册register 验证码captchaImage 允许匿名访问 |
| | | requests.antMatchers("/system/login", "/register", "/captchaImage","/screen/data","/common/upload","/system/user/profile/updatePwd").permitAll() |
| | | requests.antMatchers("/system/login", "/register", "/captchaImage","/screen/data","/common/upload","/system/user/profile/updatePwd","/common/uploadFiles").permitAll() |
| | | // 静态资源,可匿名访问 |
| | | .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() |
| | | .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**","/swagger-ui/").permitAll() |
| | |
| | | /** 子菜单 */ |
| | | @ApiModelProperty("子菜单") |
| | | private List<MenuTreeVO> children = new ArrayList<MenuTreeVO>(); |
| | | |
| | | private Integer orderNum; |
| | | } |
| | |
| | | </select> |
| | | |
| | | <select id="getAllRootMenu" resultType="com.ruoyi.system.object.vo.MenuTreeVO"> |
| | | select distinct sm.menu_id,sm.menu_name,sm.path,sm.menu_type |
| | | select distinct sm.menu_id,sm.menu_name,sm.path,sm.menu_type,sm.order_num |
| | | from sys_menu sm |
| | | where |
| | | sm.parent_id = 0 order by sm.order_num asc |