Browse Source

企业证照查询返回字段增加total字段

sbj 3 months ago
parent
commit
f52ec24975

+ 3 - 1
ghjg-item-datashare-server/src/main/java/com/shanghaichengdi/ghjgitem/controller/CertController.java

@@ -3,6 +3,7 @@ package com.shanghaichengdi.ghjgitem.controller;
 import com.alibaba.fastjson.JSONObject;
 import com.shanghaichengdi.ghjgitem.constant.HttpStatus;
 import com.shanghaichengdi.ghjgitem.service.CommonService;
+import com.shanghaichengdi.ghjgitem.util.CommonTools;
 import com.shanghaichengdi.ghjgitem.vo.ObjectBodyVo;
 import com.shanghaichengdi.ghjgitem.vo.PageVo;
 import com.shanghaichengdi.ghjgitem.vo.VwCertInfoSelfAllVo;
@@ -35,7 +36,8 @@ public class CertController extends CommonController {
     String paramJsonData = getParamJsonData(vo.getData());
     PageVo req = JSONObject.parseObject(paramJsonData, PageVo.class);
     List<VwCertInfoSelfAllVo> voList = commonService.selectCertInfoList(req);
-    ResultRes resultRes = ResultRes.encapsulationResult(voList);
+    ResultRes resultRes = ResultRes.encapsulationResult(req.getPageIndex(),req.getPageSize(),
+            CommonTools.getTotal(voList),voList);
     String jsonString = JSONObject.toJSONString(resultRes);
     String encodedData = resultEncode(jsonString);
     return ReturnMsg.success("获取成功", encodedData);