Commit 3ec7eec8 by 庄冰

aaa

parent ac9a9a9f
......@@ -38,7 +38,7 @@ class Templateconfig extends APIBase {
opResult = system.getResultSuccess("测试接口");
break;
case "getImgList": // 查询图片
opResult = await this.imginfoSve.findAndCountAll(pobj.actionBody);
opResult = await this.imginfoSve.getImgList(pobj.actionBody);
break;
case "createImginfo": // 添加图片
opResult = await this.imginfoSve.create(pobj.actionBody);
......
......@@ -5,7 +5,10 @@ class ImginfoService extends ServiceBase {
constructor() {
super("configmag", ServiceBase.getDaoName(ImginfoService));
}
async getImgList(obj){
var res = await this.dao.findAndCountAll(obj);
return system.getResultSuccess(res);
}
async create(pobj){
var code = await this.getBusUid("img");
pobj.code = code;
......
......@@ -283,42 +283,46 @@
"pageSize": 2
}
}
}}
}
```
#### 返回结果
```javascript
{
"results": {
"count": 5,
"rows": [
{
"id": 38,
"code": "IMG202008101530vc4Sw",
"name": "test",
"company_id": 10,
"pic_url": "https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_167715970446417352020101530417351920-1103.jpg",
"created_at": "2020-08-10T07:30:43.000Z",
"updated_at": "2020-08-10T07:30:43.000Z",
"deleted_at": null,
"version": 0
},
{
"id": 37,
"code": "IMG202008101501DQhko",
"name": "1",
"company_id": 10,
"pic_url": "",
"created_at": "2020-08-10T07:01:59.000Z",
"updated_at": "2020-08-10T07:01:59.000Z",
"deleted_at": null,
"version": 0
}
]
"status": 0,
"msg": "success",
"data": {
"results": {
"count": 6,
"rows": [
{
"id": 87,
"code": "IMG202008111003ltqKE",
"name": "123",
"company_id": 10,
"pic_url": "https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_1477159711138453920201110345396.png",
"created_at": "2020-08-11T02:03:17.000Z",
"updated_at": "2020-08-11T02:03:17.000Z",
"deleted_at": null,
"version": 0
},
{
"id": 86,
"code": "IMG202008110930yQail",
"name": "asd",
"company_id": 10,
"pic_url": "https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_3437159710937925020201192939250small.jpg",
"created_at": "2020-08-11T01:30:32.000Z",
"updated_at": "2020-08-11T01:30:32.000Z",
"deleted_at": null,
"version": 0
}
]
},
"aggresult": {}
},
"aggresult": {},
"requestId": "600d1778c2b64f7aae959e0214d360d1"
"requestId": "760d29df6d594a9984e1d660bdcdc997"
}
```
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment