Quellcode durchsuchen

查询条件修改

xiao547607 vor 4 Jahren
Ursprung
Commit
d737343d8c

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

@@ -135,6 +135,9 @@
 			<if test="searchParams.id != null">
 				and a.ID_ like #{searchParams.id}
 			</if>
+			<if test="searchParams.companyId != null">
+				and a.company_id = #{searchParams.companyId}
+			</if>
 			<if test="searchParams.companyName != null">
 				and b.company_name like #{searchParams.companyName}
 			</if>

+ 6 - 0
web/src/main/java/com/jpsoft/enterprise/modules/base/controller/PersonInfoController.java

@@ -225,6 +225,7 @@ public class PersonInfoController {
     @RequestMapping(value = "pageList",method = RequestMethod.POST)
     public MessageResult<Map> pageList(
             String id,
+            @RequestParam(value="companyId",defaultValue="") String companyId,
             @RequestParam(value="companyName",defaultValue="") String companyName,
             @RequestParam(value="registerType",defaultValue="") String registerType,
             @RequestParam(value="personName",defaultValue="") String personName,
@@ -249,6 +250,11 @@ public class PersonInfoController {
             searchParams.put("id","%" + id + "%");
         }
 
+
+        if (StringUtils.isNotEmpty(companyId)) {
+            searchParams.put("companyId",companyId);
+        }
+
         if (StringUtils.isNotEmpty(companyName)) {
             searchParams.put("companyName","%" + companyName + "%");
         }