Bläddra i källkod

获取app更新的时候,下载下来是release.apk

根据ID获取诊断报告H5提示不存在,但是列表已经获取到了这条
bmmx 1 år sedan
förälder
incheckning
b8c766836a
1 ändrade filer med 13 tillägg och 1 borttagningar
  1. 13 1
      src/main/java/com/om/controller/admin/AppsController.java

+ 13 - 1
src/main/java/com/om/controller/admin/AppsController.java

@@ -15,6 +15,8 @@ import org.springframework.web.bind.annotation.*;
 
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * <p>
@@ -34,7 +36,17 @@ public class AppsController {
     @ApiOperation("根据ID删除应用软件接口")
     @DeleteMapping("/delete/{id}")
     public Result<Object> delete(@PathVariable(name = "id") Integer id) {
-        return Result.succ(appsService.removeById(id));
+        List<Integer> descIds = appsDescService.lambdaQuery()
+                .eq(AppsDesc::getAppId, id)
+                .list().stream().map(c -> c.getId()).collect(Collectors.toList());
+        appsDescService.removeByIds(descIds);
+        List<Integer> clientIds = appsClientsService.lambdaQuery()
+                .eq(AppsClients::getAppId, id)
+                .list().stream().map(c -> c.getId()).collect(Collectors.toList());
+        appsClientsService.removeByIds(clientIds);
+
+        appsService.removeById(id);
+        return Result.ok();
     }
 
     public AppsController(IAppsService appsService, IAppsDescService appsDescService, IAppsClientsService appsClientsService) {