|
|
@@ -1,6 +1,6 @@
|
|
|
package cn.reghao.autodop.dmaster.app.controller.crud;
|
|
|
|
|
|
-import cn.reghao.autodop.common.result.WebResult;
|
|
|
+import cn.reghao.autodop.dmaster.utils.WebBody;
|
|
|
import cn.reghao.autodop.dmaster.app.entity.config.build.BuildDir;
|
|
|
import cn.reghao.autodop.dmaster.app.db.config.BuildDirCrudService;
|
|
|
import cn.reghao.autodop.dmaster.common.db.PageList;
|
|
|
@@ -46,14 +46,14 @@ public class BuildConfigController {
|
|
|
@GetMapping("/dir")
|
|
|
public ResponseEntity<String> getBuildDirByPage(@RequestParam("page") int page, @RequestParam("size") int size) {
|
|
|
PageList<BuildDir> pageList = buildDirCrudService.getByPage(page, size, "");
|
|
|
- return ResponseEntity.ok().body(WebResult.success(pageList));
|
|
|
+ return ResponseEntity.ok().body(WebBody.success(pageList));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "修改构建目录配置")
|
|
|
@PutMapping("/dir")
|
|
|
public ResponseEntity<String> modifyBuildDir(@RequestBody String json) throws Exception {
|
|
|
BuildDir buildDir = JsonConverter.jsonToObject(json, BuildDir.class);
|
|
|
- return ResponseEntity.ok().body(WebResult.success("ok"));
|
|
|
+ return ResponseEntity.ok().body(WebBody.success("ok"));
|
|
|
}
|
|
|
|
|
|
/* 仓库认证配置 */
|
|
|
@@ -62,7 +62,7 @@ public class BuildConfigController {
|
|
|
public ResponseEntity<String> addRepoConfig(@RequestBody String json) throws Exception {
|
|
|
RepoAuthConfig repoAuthConfig = JsonConverter.jsonToObject(json, RepoAuthConfig.class);
|
|
|
repoAuthConfigCrudService.insert(repoAuthConfig);
|
|
|
- return ResponseEntity.ok().body(WebResult.success("ok"));
|
|
|
+ return ResponseEntity.ok().body(WebBody.success("ok"));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "修改仓库认证配置")
|
|
|
@@ -70,21 +70,21 @@ public class BuildConfigController {
|
|
|
public ResponseEntity<String> modifyRepoConfig(@RequestBody String json) throws Exception {
|
|
|
RepoAuthConfig repoAuthConfig = JsonConverter.jsonToObject(json, RepoAuthConfig.class);
|
|
|
repoAuthConfigCrudService.insert(repoAuthConfig);
|
|
|
- return ResponseEntity.ok().body(WebResult.success("ok"));
|
|
|
+ return ResponseEntity.ok().body(WebBody.success("ok"));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "删除仓库认证配置")
|
|
|
@DeleteMapping("/repo/{uniqueKey}")
|
|
|
public ResponseEntity<String> deleteRepoConfig(@PathVariable("uniqueKey") String uniqueKey) throws Exception {
|
|
|
repoAuthConfigCrudService.delete(uniqueKey);
|
|
|
- return ResponseEntity.ok().body(WebResult.success("ok"));
|
|
|
+ return ResponseEntity.ok().body(WebBody.success("ok"));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "分页获取仓库认证配置")
|
|
|
@GetMapping("/repo")
|
|
|
public ResponseEntity<String> getRepoConfigByPage(@RequestParam("page") int page, @RequestParam("size") int size) {
|
|
|
PageList<RepoAuthConfig> pageList = repoAuthConfigCrudService.getByPage(page, size, "");
|
|
|
- return ResponseEntity.ok().body(WebResult.success(pageList));
|
|
|
+ return ResponseEntity.ok().body(WebBody.success(pageList));
|
|
|
}
|
|
|
|
|
|
/* 应用编译配置 */
|
|
|
@@ -93,7 +93,7 @@ public class BuildConfigController {
|
|
|
public ResponseEntity<String> addCompileConfig(@RequestBody String json) throws Exception {
|
|
|
CompilerConfig compilerConfig = JsonConverter.jsonToObject(json, CompilerConfig.class);
|
|
|
compilerConfigCrudService.insert(compilerConfig);
|
|
|
- return ResponseEntity.ok().body(WebResult.success("ok"));
|
|
|
+ return ResponseEntity.ok().body(WebBody.success("ok"));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "修改应用编译配置")
|
|
|
@@ -101,21 +101,21 @@ public class BuildConfigController {
|
|
|
public ResponseEntity<String> modifyCompileConfig(@RequestBody String json) throws Exception {
|
|
|
CompilerConfig compilerConfig = JsonConverter.jsonToObject(json, CompilerConfig.class);
|
|
|
compilerConfigCrudService.insert(compilerConfig);
|
|
|
- return ResponseEntity.ok().body(WebResult.success("ok"));
|
|
|
+ return ResponseEntity.ok().body(WebBody.success("ok"));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "删除应用编译配置")
|
|
|
@DeleteMapping("/compiler/{uniqueKey}")
|
|
|
public ResponseEntity<String> deleteCompileConfig(@PathVariable("uniqueKey") String uniqueKey) throws Exception {
|
|
|
compilerConfigCrudService.delete(uniqueKey);
|
|
|
- return ResponseEntity.ok().body(WebResult.success("ok"));
|
|
|
+ return ResponseEntity.ok().body(WebBody.success("ok"));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "分页获取应用编译配置")
|
|
|
@GetMapping("/compiler")
|
|
|
public ResponseEntity<String> getCompileConfigByPage(@RequestParam("page") int page, @RequestParam("size") int size) {
|
|
|
PageList<CompilerConfig> pageList = compilerConfigCrudService.getByPage(page, size, "");
|
|
|
- return ResponseEntity.ok().body(WebResult.success(pageList));
|
|
|
+ return ResponseEntity.ok().body(WebBody.success(pageList));
|
|
|
}
|
|
|
|
|
|
/* 应用打包配置 */
|
|
|
@@ -124,7 +124,7 @@ public class BuildConfigController {
|
|
|
public ResponseEntity<String> addPackConfig(@RequestBody String json) throws Exception {
|
|
|
PackerConfig packerConfig = JsonConverter.jsonToObject(json, PackerConfig.class);
|
|
|
packerConfigCrudService.insert(packerConfig);
|
|
|
- return ResponseEntity.ok().body(WebResult.success("ok"));
|
|
|
+ return ResponseEntity.ok().body(WebBody.success("ok"));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "修改应用打包配置")
|
|
|
@@ -132,20 +132,20 @@ public class BuildConfigController {
|
|
|
public ResponseEntity<String> modifyPackConfig(@RequestBody String json) throws Exception {
|
|
|
PackerConfig packerConfig = JsonConverter.jsonToObject(json, PackerConfig.class);
|
|
|
packerConfigCrudService.insert(packerConfig);
|
|
|
- return ResponseEntity.ok().body(WebResult.success("ok"));
|
|
|
+ return ResponseEntity.ok().body(WebBody.success("ok"));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "删除应用打包配置")
|
|
|
@DeleteMapping("/packer/{uniqueKey}")
|
|
|
public ResponseEntity<String> deletePackConfig(@PathVariable("uniqueKey") String uniqueKey) throws Exception {
|
|
|
packerConfigCrudService.delete(uniqueKey);
|
|
|
- return ResponseEntity.ok().body(WebResult.success("ok"));
|
|
|
+ return ResponseEntity.ok().body(WebBody.success("ok"));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "分页获取应用打包配置")
|
|
|
@GetMapping("/packer")
|
|
|
public ResponseEntity<String> getPackConfigByPage(@RequestParam("page") int page, @RequestParam("size") int size) {
|
|
|
PageList<PackerConfig> pageList = packerConfigCrudService.getByPage(page, size, "");
|
|
|
- return ResponseEntity.ok().body(WebResult.success(pageList));
|
|
|
+ return ResponseEntity.ok().body(WebBody.success(pageList));
|
|
|
}
|
|
|
}
|