magic-boot/data/magic-api/api/系统管理/配置中心/保存.ms

222 lines
5.4 KiB
Plaintext
Raw Normal View History

2022-05-21 18:17:16 +08:00
{
"properties" : { },
"id" : "ad9bf694f8834e50a7ef35ddb543e06d",
"script" : null,
"groupId" : "0295f2b4af9145f5a0ea29fa4b797214",
"name" : "保存",
"createTime" : null,
2023-03-25 16:42:15 +08:00
"updateTime" : 1679725946724,
2022-05-21 18:17:16 +08:00
"lock" : null,
"createBy" : null,
"updateBy" : null,
"path" : "/save",
"method" : "POST",
"parameters" : [ {
"name" : "configureType",
"value" : "1",
"description" : null,
"required" : false,
"dataType" : "String",
"type" : null,
"defaultValue" : null,
"validateType" : null,
"error" : null,
"expression" : null,
"children" : null
}, {
"name" : "configureName",
"value" : "2",
"description" : null,
"required" : false,
"dataType" : "String",
"type" : null,
"defaultValue" : null,
"validateType" : null,
"error" : null,
"expression" : null,
"children" : null
}, {
"name" : "configureValue",
"value" : "3",
"description" : null,
"required" : false,
"dataType" : "String",
"type" : null,
"defaultValue" : null,
"validateType" : null,
"error" : null,
"expression" : null,
"children" : null
}, {
"name" : "configureCondition",
"value" : "2",
"description" : null,
"required" : false,
"dataType" : "String",
"type" : null,
"defaultValue" : null,
"validateType" : null,
"error" : null,
"expression" : null,
"children" : null
}, {
"name" : "configureDescRibe",
"value" : "24",
"description" : null,
"required" : false,
"dataType" : "String",
"type" : null,
"defaultValue" : null,
"validateType" : null,
"error" : null,
"expression" : null,
"children" : null
}, {
"name" : "remarks",
"value" : "12",
"description" : null,
"required" : false,
"dataType" : "String",
"type" : null,
"defaultValue" : null,
"validateType" : null,
"error" : null,
"expression" : null,
"children" : null
}, {
"name" : "configureKey",
"value" : "32323",
"description" : null,
"required" : false,
"dataType" : "String",
"type" : null,
"defaultValue" : null,
"validateType" : null,
"error" : null,
"expression" : null,
"children" : null
} ],
"options" : [ {
"name" : "permission",
"value" : "configure:save",
2022-05-21 18:17:16 +08:00
"description" : "允许拥有该权限的访问",
"required" : false,
"dataType" : "String",
"type" : null,
"defaultValue" : null,
"validateType" : null,
"error" : null,
"expression" : null,
"children" : null
}, {
"name" : "wrap_request_parameter",
"value" : "data",
"description" : "包装请求参数到一个变量中",
"required" : false,
"dataType" : "String",
"type" : null,
"defaultValue" : null,
"validateType" : null,
"error" : null,
"expression" : null,
"children" : null
} ],
"requestBody" : "",
"headers" : [ {
"name" : "token",
"value" : "75812f57-129d-4714-a615-571142631484",
"description" : null,
"required" : true,
"dataType" : "String",
"type" : null,
"defaultValue" : null,
"validateType" : null,
"error" : null,
"expression" : null,
"children" : null
} ],
"paths" : [ ],
"responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": \"a500d23dd1274b4086d55a01a768caec\",\n \"timestamp\": 1653119020859,\n \"executeTime\": 1729\n}",
"description" : null,
"requestBodyDefinition" : null,
"responseBodyDefinition" : {
"name" : "",
"value" : "",
"description" : "",
"required" : false,
"dataType" : "Object",
"type" : null,
"defaultValue" : null,
"validateType" : "",
"error" : "",
"expression" : "",
"children" : [ {
"name" : "code",
"value" : "200",
"description" : "",
"required" : false,
"dataType" : "Integer",
"type" : null,
"defaultValue" : null,
"validateType" : "",
"error" : "",
"expression" : "",
"children" : [ ]
}, {
"name" : "message",
"value" : "success",
"description" : "",
"required" : false,
"dataType" : "String",
"type" : null,
"defaultValue" : null,
"validateType" : "",
"error" : "",
"expression" : "",
"children" : [ ]
}, {
"name" : "data",
"value" : "a500d23dd1274b4086d55a01a768caec",
"description" : "",
"required" : false,
"dataType" : "Object",
"type" : null,
"defaultValue" : null,
"validateType" : "",
"error" : "",
"expression" : "",
"children" : [ ]
}, {
"name" : "timestamp",
"value" : "1653119020859",
"description" : "",
"required" : false,
"dataType" : "Long",
"type" : null,
"defaultValue" : null,
"validateType" : "",
"error" : "",
"expression" : "",
"children" : [ ]
}, {
"name" : "executeTime",
"value" : "1729",
"description" : "",
"required" : false,
"dataType" : "Object",
"type" : null,
"defaultValue" : null,
"validateType" : "",
"error" : "",
"expression" : "",
"children" : [ ]
} ]
}
}
================================
import org.ssssssss.magicapi.modules.db.cache.SqlCache
SqlCache.delete(`configure:${configureKey}${configureCondition}`)
SqlCache.delete(`configure:${configureKey}`)
2023-03-25 16:42:15 +08:00
return db.table('sys_configure').primary('id').withBlank().saveOrUpdate(data)