This commit is contained in:
oneao committed 2026-03-23 17:29:20 +08:00
1 parent 62550b8182
commit 3e172a1d53
26 files changed
+4820 -413

No files matched your search

@@ -3,6 +3,7 @@ package cn.g3soft.controller;
import cn.g3soft.utils.DbUtils;
import cn.g3soft.utils.Result;
import cn.g3soft.utils.ValidationUtils;
import cn.g3soft.utils.uniqueId.idgen.UniqueId;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -164,4 +165,9 @@ public class DataListController {
return Result.ok(list.get(0));
}
@PostMapping("/getUniqueId")
public Result<Long> getUniqueId(){
return Result.ok(UniqueId.nextId());
}
}
@@ -192,13 +192,13 @@ public class DataSaveController {
return Result.ok();
}
@PostMapping("/deleteModule")
@PostMapping("/deleteObject")
@Transactional(rollbackFor = Exception.class)
public Result<Map<String, Integer>> deleteModule(@RequestBody Map<String, Object> params) {
ValidationUtils.checkRequiredFields(params, "moduleId", "Id");
ValidationUtils.checkRequiredFields(params, "moduleId", "id");
String moduleId = params.get("moduleId").toString();
String id = params.get("Id").toString();
String id = params.get("id").toString();
Map<String, Integer> operationCounts = new LinkedHashMap<>();
operationCounts.put("total", 0);
@@ -21,13 +21,13 @@ public class FileController {
@PostMapping("/getAliyunKey")
public Result<Map<String,Object>> getAliyunKey(@RequestBody Map<String, Object> params) {
ValidationUtils.checkRequiredFields(params, "bucket");
ValidationUtils.checkRequiredFields(params, "bucketName");
String bucket = (String) params.get("bucket");
String bucketName = (String) params.get("bucketName");
String orgId = UserContext.get().getOrgId();
String requestUrl = "http://g3oss.g3soft.cn:8082/upload?orgid=" + orgId + "&bucket=" + bucket;
String requestUrl = "http://g3oss.g3soft.cn:8082/upload?orgid=" + orgId + "&bucket=" + bucketName;
String reqResult = HttpUtils.sendGet(requestUrl);
Map<String, Object> objectMap = JsonUtils.toMap(reqResult);
@@ -37,19 +37,22 @@ public class FileController {
@PostMapping("/insert")
@Transactional(rollbackFor = Exception.class)
public Result<Void> insertFile(@RequestBody Map<String,Object> params) {
public Result<Long> insertFile(@RequestBody Map<String,Object> params) {
ValidationUtils.checkRequiredFields(params, "father", "mx_xh", "mx_filename", "mx_filesize", "mx_mapfilename", "mx_moduleid");
String userId = UserContext.get().getUserId();
params.put("subid", UniqueId.nextId());
long nextId = UniqueId.nextId();
params.put("subid", nextId);
params.put("mx_inputuser_id",userId);
params.put("mx_inputdatetime", TimeUtils.getDateTime());
dbUtils.insert("bf_file","subid",params);
return Result.ok();
return Result.ok(nextId);
}
@PostMapping("/delete")
@Transactional(rollbackFor = Exception.class)
public Result<Void> deleteFile(@RequestBody Map<String, Object> params) {