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