Commit c2ab6ae7 by 王悦

add 分页

parent b0889fc9
......@@ -540,15 +540,9 @@ class UtilsNeedService extends AppServiceBase {
// if (!pobj.actionBody.userFeedBack) {
// return system.getResult(null, "actionBody.userFeedBack can not be empty,100494");
// }
let res = await this.aliclient.reqbyget({
action: "QueryTradeIntentionUserList", reqbody: {
Begin: pobj.actionBody.Begin ? pobj.actionBody.Begin : "",
End: pobj.actionBody.End ? pobj.actionBody.End : "",
}, apiVersion: "2019-05-08"
});
if (res.status == 0){
pobj.actionBody.data = [];
await this.queryByAli(pobj,1);
pobj.actionType = "getUnCreated";
pobj.actionBody.data = res.data.Data;
let reqUrl = this.centerOrderUrl + "action/need/springBoard";
let result = await this.restPostUrl(pobj, reqUrl);
if (result.status == 0) {
......@@ -567,10 +561,24 @@ class UtilsNeedService extends AppServiceBase {
}else {
return system.getResultFail(result.status,result.msg);
}
}
return system.getResultFail(res.status,res.msg);
}
async queryByAli(pobj,page){
let res = await this.aliclient.reqbyget({
action: "QueryTradeIntentionUserList", reqbody: {
Begin: pobj.actionBody.Begin ? pobj.actionBody.Begin : "",
End: pobj.actionBody.End ? pobj.actionBody.End : "",
PageNum: page,
PageSize: 10,
}, apiVersion: "2019-05-08"
});
if (res.status == 0) {
pobj.actionBody.data.push(...res.data.Data);
if (page < res.data.TotalPageNum){
await this.queryByAli(pobj,page+1)
}
}
}
async testsymq(pobj) {
var a = null;
try {
......
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