Parcourir la source

最近14天曲线图接口

yanliming il y a 5 ans
Parent
commit
727b6d3d6a

+ 6 - 4
web/src/main/java/com/jpsoft/smart/modules/mobile/controller/IndividualLogApiController.java

@@ -1,11 +1,13 @@
 package com.jpsoft.smart.modules.mobile.controller;
 
+import com.github.pagehelper.Page;
 import com.jpsoft.smart.modules.base.entity.PersonDeviceFilterLog;
 import com.jpsoft.smart.modules.base.entity.PersonInfo;
 import com.jpsoft.smart.modules.base.service.PersonDeviceFilterLogService;
 import com.jpsoft.smart.modules.base.service.PersonInfoService;
 import com.jpsoft.smart.modules.common.dto.MessageResult;
 import com.jpsoft.smart.modules.common.dto.Sort;
+import com.jpsoft.smart.modules.common.utils.PojoUtils;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
@@ -32,12 +34,12 @@ public class IndividualLogApiController {
             @ApiImplicitParam(name="token",value = "令牌",required = true,paramType = "form"),
             @ApiImplicitParam(name="subject",value = "目标(不传)",paramType = "form")
     })
-    public MessageResult<List<PersonInfo>> healthyPersonList(
+    public MessageResult<Map> healthyPersonList(
             String token,
             @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
             @RequestParam(value="pageSize",defaultValue="20") int pageSize,
             @RequestAttribute String subject){
-        MessageResult<List<PersonInfo>> messageResult = new MessageResult<>();
+        MessageResult<Map> messageResult = new MessageResult<>();
 
         try{
             PersonInfo admin = personInfoService.get(Long.valueOf(subject));
@@ -51,10 +53,10 @@ public class IndividualLogApiController {
 
             searchParams.put("companyId",companyId);
 
-            List<PersonInfo> personInfoList = personInfoService.pageSearch(searchParams,pageIndex,pageSize,false,sortList);
+            Page<PersonInfo> page = personInfoService.pageSearch(searchParams,pageIndex,pageSize,false,sortList);
 
             messageResult.setResult(true);
-            messageResult.setData(personInfoList);
+            messageResult.setData(PojoUtils.pageWrapper(page));
         }
         catch (Exception ex){
             messageResult.setResult(false);