@标识扩展,后面的extand 表示url参数key
{
"diffTableNo": 0,
"isRESTful": true,
"base": {
"connName": "ConnIdc",
"isRearEnd": true,
"isFrontEnd": true
},
"responseField": {
"cure": {
"dataFromType": "Api",
"njcResult": {
"args": [],
"moduleName": "~/Config/AppNodeJs/idc-plugins/dcim-ring-move/cure/@extand",
"functionName": null
},
"njcArgs": {
"args": [],
"moduleName": "~/Config/AppNodeJs/idc-plugins/dcim-ring-move/cure-query",
"functionName": null
}
}
},
"tables": [
],
//统计时候节点可以不要
"selectSql": {
},
//字段如果没有特殊处理,节点可以不要
"columns": {
}
}
后端代码实现案例
string detailPath = sqlConfig.ResponseFieldTemp?.Mock?.Page;
RequestModuleType rmt = RequestModuleType.Page;
//替换page模板里面关键字
if (!string.IsNullOrEmpty(detailPath))
{
sb.Append(detailPath);
foreach (string key in dictionaryUrl.Keys)
{
if (detailPath.Contains($"{key}"))
{
sb.Replace($"@{key}", dictionaryUrl[key]?.ToString());
}
}
}
文档更新时间: 2021-07-04 08:00 作者:admin