linxk il y a 1 mois
Parent
commit
6ed0f5dc6a

+ 13 - 0
operating-service/src/main/java/com/txz/operating/controller/ConfigController.java

@@ -33,6 +33,19 @@ public class ConfigController {
         return configService.getConfigByCode(code);
     }
 
+
+    @ApiOperation("根据类型获取下载地址 type=1 安卓  2 ios")
+    @GetMapping(value = "/getUrlByType")
+    public Result getUrlByType(@RequestParam Integer type) {
+        if (type == 1){
+            return configService.getConfigByCode("apk_url");
+        } else if (type == 2){
+            return configService.getConfigByCode("app_url");
+        }
+        return Result.fail(ResultCode.OBJECT_IS_NULL);
+    }
+
+
     @PostMapping("/add")
     @ApiOperation(value = "配置新增")
     public Result add(@RequestBody Config config) {