This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
# 通用列表查询方法
请求参数:
```json
{
"method":"xxx/xxx/list",
"params":{
"page":1,
"limit":10,
"field":[
"id","name"
],
"and":{
"id":["1","2"],
"name":["name1","name2"]
},
"or":{
"id":["1","2"],
"name":["name1","name2"]
},
"like":{
"id":["1","2"],
"name":["name1","name2"]
},
"orderby":[
{"id":"asc"},
{"name":"desc"},
{"created_at":"desc"}
],
"where":[{
"field":"job_id",
"operator":"=",
"value":"2"
},{
"field":"departments",
"operator":"find_in_set",
"value":[1,2]
},]
}
}
```
参数说明:
- page: 分页记录,默认不填为1,page不能小于1(小于1的数均会改写成1)
- limit: 每页显示的记录数,默认不填为10,当limit小于0时 会返回所有数据记录
- field: 自定义需要查询的字段,不填默认返回所有记录
- and: 与运算条件。示例中会生成如下sql查询语句: select ..... where id in(1,2) and name in ("name1","name2")
- or: 或运算条件。示例中会生成如下sql查询语句: select ..... where id in(1,2) or name in ("name1","name2")