用户工具

站点工具


api:apijson

issues

"key[]":{"query":"2","page":0,"count":10,"total@":"/[]/total"} // 查询数组,总数或分页
"key{}":[1,2,3]                                    // 匹配选项范围
"key{}":"<=10,length(key)>1..."                    // 匹配条件范围,默认或,id&{}:>1,<10 逻辑与,id!{} not in
"key()":"function(arg0,arg1...)"                   // 远程调用函数
"key@":"key0/key1.../targetKey"                    // 引用赋值
"key$":"%abc%"                                     // 模糊搜索 name LIKE '%m%'
"key?":"^[0-9]+$"                                  // 正则匹配 name REGEXP '^[0-9]+$'
"key+":[1]                                         // 增加/扩展 json_insert(praiseUserIdList,82001)
"key-":888.88                                     // 减少/去除 balance = balance - 100.00
"name:alias"                                      // 新建别名 name as alias
"@column":"id,sex,name"                           // 返回字段
"@group":"userId"                                 // 分组方式,@column需对应
"@having":"max(id)>=100"                          // 聚合函数
"@order":"date-,name+"                            // 排序方式
"@schema":"sys"                                    // 集合空间
"@database":"POSTGRESQL"                           // 跨数据库
"@explain":true                                    // 性能分析,最外层,包含查询结果
"@role":"LOGIN"                                    // 访问角色

"VERIFY": { "money&{}":">0,<=10000" }              //自动验证是否 money>0 & money<=10000
"TYPE": { "balance": "DECIMAL" }                   //自动验证balance类型是否为BigDecimal
"UNIQUE": "phone"                                  //强制phone的值为数据库中没有的
"MUST": "id,name"                                  //强制传id,name两个字段
"REFUSE": "balance"                                //禁止传balance字段
"INSERT": { "@role": "OWNER" }                     //如果没传@role就自动添加
"UPDATE": { "id@": "User/id" }                     //强制放入键值对
查询数组&分页 {User[]:{page:0,count:1,User:{}}}
匹配选项范围 id{}:[1,2,3] // 支持条件范围 >10,<100,between可用连续范围id%:min,max
包含选项范围 contactIdList<>: 38710 //json_contains(contactIdList,38710),contactIdList为JSONArray
判断是否存在 id}{@:{from:Comment,Comment:{id:15}} // WHERE EXISTS(SELECT * FROM Comment WHERE momentId=15)
远程调用函数 Moment:{id:1,isPraised():isContain(praiseUserIdList,userId)} // boolean isContain(JSONObject request, String array, String value)
存储过程 @procedure():getCommentByUserId(id,@limit,@offset),@limit:10,@offset:0 // getCommentByUserId(IN id bigint, IN limit int, IN offset int)
引用赋值 {Moment:{userId:1},User:{id@:/Moment/userId}}
子查询 User:{id@:{from:Comment,Comment:{@column:min(userId)}}} // WHERE id=(SELECT min(userId) FROM Comment)
模糊搜索 name$:%m% // name LIKE '%m%'
正则匹配 name~:^[0-9]+$ // name REGEXP '^[0-9]+$'
连续范围 date%:2017-10-01,2018-10-01 // date BETWEEN '2017-10-01' AND '2018-10-01'
比较运算 id<=:90000 // id<=90000,支持>, <, >=, <=
 join关联查询 join:</ViceTable/key@,MainTable:{},ViceTable:{key@:/MainTable/refKey} // MainTable LEFT JOIN ViceTable ON ViceTable.key=MainTable.refKey
单表增 post {Moment:{content},tag:Moment}
单表改 put {Moment:{id,content},tag:Moment}
单表删 delete {Moment:{id},tag:Moment}
  • 五级行政区划:code,name;type=111主城区,112城乡结合区,121镇中心区,122镇乡结合区,123特殊区域;210乡中心区,220村庄
{"County[]":{"County":{"code$":"5116%"}},"Village[]":{"Village":{"code$":"511623114%"}},"sortVillage()":"pinyinSort(Village[],name)","town":"511623","city":"5116","county":"511623","sortProvince()":"pinyinSort(Province[],name)","Province[]":{"Province":{}},"City":{"code":"5116"},"County":{"code":"511623"},"Province":{"code":"51"},"sortCounty()":"pinyinSort(County[],name)","province":"51","Town":{"code":"511623114"},"sortTown()":"pinyinSort(Town[],name)","City[]":{"City":{"code$":"51%"}},"sortCity()":"pinyinSort(City[],name)","Town[]":{"Town":{"code$":"511623%"}}}
{"Province[]":{"Province":{}},"sort()":"pinyinSort(Province[],name)"}
{"City[]":{"City":{"code$":"51%"}},"sort()":"pinyinSort(City[],name)"}
{"County[]":{"County":{"code$":"5116%"}},"sort()":"pinyinSort(County[],name)"}
{"County":{"code":"511623"}}
{"Town[]":{"Town":{"code$":"511623%"}},"sort()":"pinyinSort(Town[],name)"}
{"Village[]":{"Village":{"code$":"511623114%"}},"sort()":"pinyinSort(Village[],name)"}
{"Village":{"code":"511623114202"}}
POST地址:https://api.xlongwei.com/service/apijson/get,以下分别查询省、市、区、详情
{"District[]":{"District":{"@column":"province,provinceName","@group":"province","@order":"provinceName"}}}
{"District[]":{"District":{"@column":"city,cityName","@group":"city","province":"510000","@order":"cityName"}}}
{"District[]":{"District":{"@column":"county,countyName","city":"510100","@order":"countyName"}}}
{"District":{"county":"510104"}}
  • 单词音标:
POST地址:https://api.xlongwei.com/service/apijson/get
单个单词:{"Ecdict":{"@column":"word,phonetic","word":"hello"}}
多个单词:{"Ecdict[]":{"Ecdict":{"@column":"word,phonetic","word{}":["hello","world"]}}}
api/apijson.txt · 最后更改: 2021/12/17 09:32 由 admin