This commit is contained in:
oneao committed 2025-06-30 17:29:28 +08:00
1 parent 9d7bf97823
commit 7c64e29ffb
16 files changed
+784 -35

No files matched your search

+2 -2
View File
@@ -13,8 +13,8 @@
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
</dependencies>
@@ -1,53 +0,0 @@
package com.crane.common;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.Map;
/**
* 通用数据接口
*/
@RestController
@RequestMapping("/api/data")
public class DataController {
/**
* 查询数据接口
* @param table 表名
* @param filters 查询过滤条件(JSON字符串)
* @return 查询结果
*/
@GetMapping("/load")
public Map<String, Object> loadData(
@RequestParam String table,
@RequestParam(required = false) String filters
) {
Map<String, Object> result = new HashMap<>();
result.put("code", 0);
result.put("data", "模拟查询结果");
return result;
}
/**
* 保存数据接口
* @param table 表名
* @param data 要保存的数据(键值对)
* @return 保存结果
*/
@PostMapping("/save")
public Map<String, Object> saveData(
@RequestParam String table,
@RequestBody Map<String, Object> data
) {
Map<String, Object> result = new HashMap<>();
result.put("code", 0);
result.put("msg", "保存成功");
return result;
}
public void test(){
System.out.println("test");
}
}
@@ -0,0 +1,2 @@
logging:
module-name: common模块