|
@@ -33,6 +33,19 @@ public class ConfigController {
|
|
|
return configService.getConfigByCode(code);
|
|
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")
|
|
@PostMapping("/add")
|
|
|
@ApiOperation(value = "配置新增")
|
|
@ApiOperation(value = "配置新增")
|
|
|
public Result add(@RequestBody Config config) {
|
|
public Result add(@RequestBody Config config) {
|