Jelajahi Sumber

添加ID查询条件

xiao547607 5 tahun lalu
induk
melakukan
729f219fd9

+ 1 - 1
common/src/main/resources/mapper/base/PersonInfo.xml

@@ -192,7 +192,7 @@
         <where>
             a.del_flag = 0
             <if test="searchParams.id != null">
-                and a.ID_ like #{searchParams.id}
+                and a.ID_ = #{searchParams.id}
             </if>
             <if test="searchParams.companyId != null">
                 and a.company_id = #{searchParams.companyId}

+ 12 - 0
web/src/main/java/com/jpsoft/smart/modules/base/controller/PersonInfoController.java

@@ -450,6 +450,7 @@ public class PersonInfoController {
     @ApiOperation(value="列表")
     @RequestMapping(value = "pageList",method = RequestMethod.POST)
     @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "用户编号", required = false, paramType = "form", dataType = "String"),
             @ApiImplicitParam(name = "name",value = "姓名", required = false, paramType = "form",dataType = "String"),
             @ApiImplicitParam(name = "idCard",value = "身份证", required = false, paramType = "form",dataType = "String"),
             @ApiImplicitParam(name = "phone",value = "手机号", required = false, paramType = "form",dataType = "String"),
@@ -466,6 +467,7 @@ public class PersonInfoController {
             @ApiImplicitParam(name = "isUploadPhoto",value = "是否上传照片", required = false, paramType = "form",dataType = "String")
     })
     public MessageResult<Map> pageList(
+            @RequestParam(value = "id", defaultValue = "") String id,
             @RequestParam(value="name",defaultValue="") String name,
             @RequestParam(value="idCard",defaultValue="") String idCard,
             @RequestParam(value="phone",defaultValue="") String phone,
@@ -496,6 +498,10 @@ public class PersonInfoController {
         List<Sort> sortList = new ArrayList<>();
         sortList.add(new Sort("a.id_","asc"));
 
+        if (StringUtils.isNotEmpty(id)) {
+            searchParams.put("id", id);
+        }
+
         if (StringUtils.isNotEmpty(name)) {
             String[] names = name.split(",");
                 List nameList = new ArrayList();
@@ -1067,6 +1073,7 @@ public class PersonInfoController {
     @ApiOperation(value="导出人员")
     @PostMapping("exportXls")
     @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "用户编号", required = false, paramType = "form", dataType = "String"),
             @ApiImplicitParam(name = "name",value = "姓名", required = false, paramType = "form",dataType = "String"),
             @ApiImplicitParam(name = "idCard",value = "身份证", required = false, paramType = "form",dataType = "String"),
             @ApiImplicitParam(name = "phone",value = "手机号", required = false, paramType = "form",dataType = "String"),
@@ -1081,6 +1088,7 @@ public class PersonInfoController {
             @ApiImplicitParam(name = "isUploadPhoto",value = "是否上传照片", required = false, paramType = "form",dataType = "String")
     })
     public MessageResult<String> exportXls(
+            @RequestParam(value = "id", defaultValue = "") String id,
             @RequestParam(value="name",defaultValue="") String name,
             @RequestParam(value="idCard",defaultValue="") String idCard,
             @RequestParam(value="phone",defaultValue="") String phone,
@@ -1158,6 +1166,10 @@ public class PersonInfoController {
 //            if (StringUtils.isNotEmpty(name)) {
 //                searchParams.put("name","%" + name + "%");
 //            }
+
+            if (StringUtils.isNotEmpty(id)) {
+                searchParams.put("id",id);
+            }
             if (StringUtils.isNotEmpty(name)) {
                 String[] names = name.split(",");
                 List nameList = new ArrayList();