From 5a3bea30dcb2e948560d06e14f6c526d38350c29 Mon Sep 17 00:00:00 2001 From: yuanye Date: Thu, 11 Mar 2021 18:00:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=A8=E6=88=B7=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=9F=A5=E8=AF=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bweb/controller/HighUserController.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighUserController.java b/hai-bweb/src/main/java/com/bweb/controller/HighUserController.java index d78c5791..4f1f8d7c 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighUserController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighUserController.java @@ -5,6 +5,7 @@ import com.github.pagehelper.PageInfo; import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; +import com.hai.common.utils.DateUtil; import com.hai.common.utils.ResponseMsgUtil; import com.hai.entity.HighUser; import com.hai.model.ResponseData; @@ -43,9 +44,9 @@ public class HighUserController { public ResponseData getPagePosition( @RequestParam(value = "name", required = false) String name, @RequestParam(value = "phone", required = false) String phone, - @RequestParam(value = "status", required = false) String status, - @RequestParam(value = "regTimeStart", required = false) String regTimeStart, - @RequestParam(value = "regTimeEnd", required = false) String regTimeEnd, + @RequestParam(value = "status", required = false) Integer status, + @RequestParam(value = "regTimeStart", required = false) Date regTimeStart, + @RequestParam(value = "regTimeEnd", required = false) Date regTimeEnd, @RequestParam(name = "pageNum", required = true) Integer pageNum, @RequestParam(name = "pageSize", required = true) Integer pageSize ) { @@ -59,14 +60,14 @@ public class HighUserController { if (StringUtils.isNotBlank(phone)) { map.put("phone", phone); } - if (StringUtils.isNotBlank(status)) { - map.put("status", status); + if (status != null) { + map.put("status", Integer.toString(status)); } - if (StringUtils.isNotBlank(regTimeStart)) { - map.put("regTimeStart", regTimeStart); + if (regTimeStart != null) { + map.put("regTimeStart", DateUtil.date2String(regTimeStart,DateUtil.ymd_HM)); } - if (StringUtils.isNotBlank(regTimeEnd)) { - map.put("regTimeEnd", regTimeEnd); + if (regTimeEnd != null) { + map.put("regTimeEnd", DateUtil.date2String(regTimeEnd,DateUtil.ymd_HM)); } PageHelper.startPage(pageNum, pageSize);