From d5449236ef0b3adafb3e4cc872f50479efa0ce7b Mon Sep 17 00:00:00 2001
From: zhangc <zc@123>
Date: 星期二, 11 三月 2025 16:10:29 +0800
Subject: [PATCH] 配置信息

---
 src/main/java/com/zy/system/controller/HostController.java |   32 ++++++++++++++++----------------
 1 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/main/java/com/zy/system/controller/HostController.java b/src/main/java/com/zy/system/controller/HostController.java
index bad930a..07c1639 100644
--- a/src/main/java/com/zy/system/controller/HostController.java
+++ b/src/main/java/com/zy/system/controller/HostController.java
@@ -29,11 +29,11 @@
 
     @RequestMapping(value = "/host/list/auth")
     @ManagerAuth
-    public R list(@RequestParam(defaultValue = "1")Integer curr,
-                  @RequestParam(defaultValue = "10")Integer limit,
-                  @RequestParam(required = false)String orderByField,
-                  @RequestParam(required = false)String orderByType,
-                  @RequestParam Map<String, Object> param){
+    public R list(@RequestParam(defaultValue = "1") Integer curr,
+                  @RequestParam(defaultValue = "10") Integer limit,
+                  @RequestParam(required = false) String orderByField,
+                  @RequestParam(required = false) String orderByType,
+                  @RequestParam Map<String, Object> param) {
         excludeTrash(param);
         EntityWrapper<Host> wrapper = new EntityWrapper<>();
         convert(param, wrapper);
@@ -41,8 +41,8 @@
         return R.ok(hostService.selectPage(new Page<>(curr, limit), wrapper));
     }
 
-    private void convert(Map<String, Object> map, EntityWrapper wrapper){
-        for (Map.Entry<String, Object> entry : map.entrySet()){
+    private void convert(Map<String, Object> map, EntityWrapper wrapper) {
+        for (Map.Entry<String, Object> entry : map.entrySet()) {
             if (entry.getKey().endsWith(">")) {
                 wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue())));
             } else if (entry.getKey().endsWith("<")) {
@@ -56,10 +56,10 @@
     @RequestMapping(value = "/host/edit/auth")
     @ManagerAuth
     public R edit(Host host) {
-        if (Cools.isEmpty(host)){
+        if (Cools.isEmpty(host)) {
             return R.error();
         }
-        if (null == host.getId()){
+        if (null == host.getId()) {
             hostService.insert(host);
         } else {
             hostService.updateById(host);
@@ -74,10 +74,10 @@
         return R.ok();
     }
 
-	@RequestMapping(value = "/host/update/auth")
+    @RequestMapping(value = "/host/update/auth")
     @ManagerAuth
-    public R update(Host host){
-        if (Cools.isEmpty(host) || null==host.getId()){
+    public R update(Host host) {
+        if (Cools.isEmpty(host) || null == host.getId()) {
             return R.error();
         }
         hostService.updateById(host);
@@ -86,8 +86,8 @@
 
     @RequestMapping(value = "/host/delete/auth")
     @ManagerAuth
-    public R delete(Integer[] ids){
-        if (Cools.isEmpty(ids)){
+    public R delete(Integer[] ids) {
+        if (Cools.isEmpty(ids)) {
             return R.error();
         }
         hostService.deleteBatchIds(Arrays.asList(ids));
@@ -96,7 +96,7 @@
 
     @RequestMapping(value = "/host/export/auth")
     @ManagerAuth
-    public R export(@RequestBody JSONObject param){
+    public R export(@RequestBody JSONObject param) {
         List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
         EntityWrapper<Host> wrapper = new EntityWrapper<>();
         Map<String, Object> map = excludeTrash(param.getJSONObject("host"));
@@ -112,7 +112,7 @@
         wrapper.like("name", condition);
         Page<Host> page = hostService.selectPage(new Page<>(0, 10), wrapper);
         List<Map<String, Object>> result = new ArrayList<>();
-        for (Host host : page.getRecords()){
+        for (Host host : page.getRecords()) {
             Map<String, Object> map = new HashMap<>();
             map.put("id", host.getId());
             map.put("value", host.getName());

--
Gitblit v1.9.1