Explorar el Código

fix resource/list find by type

guozhaoshun hace 6 años
padre
commit
925d3e0715

+ 2 - 1
rankin-resource-service/src/main/java/cn/rankin/resourceservice/controller/ResourceController.java

@@ -49,10 +49,11 @@ public class ResourceController {
         }
 
         Integer type = resourceSearchDTO.getType();
-        if (type.intValue() == ResourceType.IMG) {
+        if (type.intValue() == ResourceType.IMG || type.intValue() == ResourceType.AUDIO) {
             // 图片本地取
             Resource resource = new Resource();
 
+            resource.setType(type);
             String code = resourceSearchDTO.getCode();
             if (!StringUtils.isEmpty(code)) {
                 resource.setCode("%" + code.trim() + "%");