|
|
@@ -0,0 +1,58 @@
|
|
|
+package com.jzg.organization.controller;
|
|
|
+
|
|
|
+
|
|
|
+import com.jzg.commons.core.page.HttpResult;
|
|
|
+import com.jzg.commons.entity.po.SysAppManage;
|
|
|
+import com.jzg.commons.entity.vo.SysAppManageVo;
|
|
|
+import com.jzg.organization.service.SysAppManageService;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import java.util.Objects;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 应用管理
|
|
|
+ * @author quchen
|
|
|
+ * @date 2025/6/19 9:54
|
|
|
+ */
|
|
|
+
|
|
|
+@RestController
|
|
|
+@RequestMapping("/appManage")
|
|
|
+public class SysAppManageController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private SysAppManageService sysAppManageService;
|
|
|
+
|
|
|
+
|
|
|
+ @PostMapping("/queryAppList")
|
|
|
+ public HttpResult queryAppList(@RequestBody SysAppManageVo sysAppManageVo) {
|
|
|
+ return HttpResult.ok(sysAppManageService.queryAppList(sysAppManageVo));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @PostMapping("/save")
|
|
|
+ public HttpResult save( @RequestBody SysAppManage sysAppManage) {
|
|
|
+ if (Objects.isNull(sysAppManage.getAppId())){
|
|
|
+ return HttpResult.error("应用ID不能为空");
|
|
|
+ }
|
|
|
+ boolean save = sysAppManageService.save(sysAppManage);
|
|
|
+ return save ? HttpResult.ok("保存成功") : HttpResult.error("保存失败");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @PostMapping("/update")
|
|
|
+ public HttpResult update(@RequestBody SysAppManage sysAppManage) {
|
|
|
+ if (Objects.isNull(sysAppManage.getId())){
|
|
|
+ return HttpResult.error("ID不能为空");
|
|
|
+ }
|
|
|
+ boolean b = sysAppManageService.updateById(sysAppManage);
|
|
|
+ return b ? HttpResult.ok("更新成功") :HttpResult.error("更新失败");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @GetMapping("/deleteById")
|
|
|
+ public HttpResult deleteById(@RequestParam String id) {
|
|
|
+ return sysAppManageService.deleteById(id);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|