Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/dev' into dev

pans 8 mēneši atpakaļ
vecāks
revīzija
638c813457

+ 14 - 0
snowy-plugin/snowy-plugin-disk/snowy-plugin-disk-func/src/main/java/vip/xiaonuo/disk/controller/ResourceFileFormatController.java

@@ -35,6 +35,7 @@ import vip.xiaonuo.disk.service.ResourceFileFormatService;
 import javax.annotation.Resource;
 import javax.validation.Valid;
 import javax.validation.constraints.NotEmpty;
+import java.util.List;
 
 /**
  * resource_file_format控制器
@@ -64,6 +65,19 @@ public class ResourceFileFormatController {
         return CommonResult.data(resourceFileFormatService.page(resourceFileFormatPageParam));
     }
 
+    /**
+     * resource_file_format-全量列表
+     *
+     * @author pans
+     * @date  2025/06/28 12:01
+     */
+    @ApiOperationSupport(order = 1)
+    @ApiOperation("resource_file_format-全量列表")
+    @GetMapping("/disk/fileformat/allList")
+    public CommonResult<List<ResourceFileFormat>> allList(ResourceFileFormatPageParam resourceFileFormatPageParam) {
+        return CommonResult.data(resourceFileFormatService.allList(resourceFileFormatPageParam));
+    }
+
     /**
      * 添加resource_file_format
      *

+ 8 - 0
snowy-plugin/snowy-plugin-disk/snowy-plugin-disk-func/src/main/java/vip/xiaonuo/disk/service/ResourceFileFormatService.java

@@ -38,6 +38,14 @@ public interface ResourceFileFormatService extends IService<ResourceFileFormat>
      */
     Page<ResourceFileFormat> page(ResourceFileFormatPageParam resourceFileFormatPageParam);
 
+    /**
+     * resource_file_format-全量列表
+     *
+     * @author pans
+     * @date  2025/06/28 12:01
+     */
+    List<ResourceFileFormat> allList(ResourceFileFormatPageParam resourceFileFormatPageParam);
+
     /**
      * 添加resource_file_format
      *

+ 23 - 0
snowy-plugin/snowy-plugin-disk/snowy-plugin-disk-func/src/main/java/vip/xiaonuo/disk/service/impl/ResourceFileFormatServiceImpl.java

@@ -60,6 +60,29 @@ public class ResourceFileFormatServiceImpl extends ServiceImpl<ResourceFileForma
         return this.page(CommonPageRequest.defaultPage(), queryWrapper);
     }
 
+    /**
+     * resource_file_format-全量列表
+     *
+     * @author pans
+     * @date  2025/06/28 12:01
+     */
+    @Override
+    public List<ResourceFileFormat> allList(ResourceFileFormatPageParam resourceFileFormatPageParam)
+    {
+        QueryWrapper<ResourceFileFormat> queryWrapper = new QueryWrapper<>();
+        if(ObjectUtil.isNotEmpty(resourceFileFormatPageParam.getSearchKey())){
+            queryWrapper.lambda().like(ResourceFileFormat::getFileExtendName, resourceFileFormatPageParam.getSearchKey());
+        }
+        if(ObjectUtil.isAllNotEmpty(resourceFileFormatPageParam.getSortField(), resourceFileFormatPageParam.getSortOrder())) {
+            CommonSortOrderEnum.validate(resourceFileFormatPageParam.getSortOrder());
+            queryWrapper.orderBy(true, resourceFileFormatPageParam.getSortOrder().equals(CommonSortOrderEnum.ASC.getValue()),
+                    StrUtil.toUnderlineCase(resourceFileFormatPageParam.getSortField()));
+        } else {
+            queryWrapper.lambda().orderByAsc(ResourceFileFormat::getId);
+        }
+        return this.list(queryWrapper);
+    }
+
     @Transactional(rollbackFor = Exception.class)
     @Override
     public void add(ResourceFileFormatAddParam resourceFileFormatAddParam) {