|
@@ -3,6 +3,9 @@ package com.boman.web.core.service.czrk;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.boman.common.core.utils.DateUtils;
|
|
|
import com.boman.common.core.utils.StringUtils;
|
|
|
+import com.boman.common.core.utils.sql.SqlUtil;
|
|
|
+import com.boman.common.core.web.page.PageDomain;
|
|
|
+import com.boman.common.core.web.page.TableSupport;
|
|
|
import com.boman.domain.Czrk;
|
|
|
import com.boman.domain.CzrkJzdz;
|
|
|
import com.boman.domain.SysUser;
|
|
@@ -10,6 +13,7 @@ import com.boman.web.core.mapper.CzrkJzdzMapper;
|
|
|
import com.boman.web.core.mapper.CzrkMapper;
|
|
|
import com.boman.web.core.utils.AuthUtils;
|
|
|
import com.boman.web.core.utils.CzrkUtils;
|
|
|
+import com.github.pagehelper.PageHelper;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -178,6 +182,7 @@ public class CzrkJzdzServiceImpl implements ICzrkJzdzService {
|
|
|
//当前用户只能看到居住地址在当前的人员
|
|
|
setQueryRole(czrk,sysUser,Czrk.CZ);
|
|
|
long startTimeSql = System.currentTimeMillis();
|
|
|
+ startPage();
|
|
|
List<Czrk> czrks = czrkMapper.listByCzrkJzdz(czrk);
|
|
|
long endTimeSql = System.currentTimeMillis() - startTimeSql;
|
|
|
log.info("执行查询人员信息中常住人员的sql语句时间:" + endTimeSql + "ms");
|
|
@@ -204,4 +209,14 @@ public class CzrkJzdzServiceImpl implements ICzrkJzdzService {
|
|
|
|
|
|
return czrkJzdzMapper.listByCzrkId(czrkId);
|
|
|
}
|
|
|
+
|
|
|
+ private void startPage() {
|
|
|
+ PageDomain pageDomain = TableSupport.buildPageRequest();
|
|
|
+ Integer pageNum = pageDomain.getPageNum();
|
|
|
+ Integer pageSize = pageDomain.getPageSize();
|
|
|
+ if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) {
|
|
|
+ String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
|
|
|
+ PageHelper.startPage(pageNum, pageSize, orderBy);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|