Commit 3ec7eec8 by 庄冰

aaa

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