he2802 il y a 3 ans
Parent
commit
4c5985c3ac

+ 1 - 1
zhongzheng-admin/src/main/resources/application-dev.yml

@@ -6,7 +6,7 @@ spring:
         druid:
             # 主库数据源
             master:
-                url: jdbc:mysql://192.168.1.222:3306/zz_edu_saas_pre?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
+                url: jdbc:mysql://192.168.1.222:3306/zz_edu_saas?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
                 username: root
                 password:  zhongzheng2021
             # 从库数据源

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserSubscribeQueryBo.java

@@ -120,4 +120,7 @@ public class UserSubscribeQueryBo extends BaseEntity {
 	/** 导入批次编号 */
 	@ApiModelProperty("导入批次编号")
 	private String importNo;
+
+	@ApiModelProperty("是否合并查询 0单查 1联合查")
+	private Integer searchType;
 }

+ 9 - 2
zhongzheng-system/src/main/resources/mapper/modules/user/UserSubscribeMapper.xml

@@ -104,15 +104,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="canExam != null and canExam == 1 ">
             and us.subscribe_status = 1
         </if>
-        <if test="searchKey != null and searchKey != '' ">
+        <if test="searchKey != null and searchKey != '' and searchType == 0 ">
             and (u.realname like concat('%', #{searchKey}, '%') or u.id_card like concat('%', #{searchKey}, '%'))
         </if>
-        <if test="idCards != null and idCards.size()!=0 ">
+        <if test="idCards != null and idCards.size()!=0 and searchType == 0" >
             AND u.id_card in
             <foreach collection="idCards" item="item" index="index" open="(" close=")" separator=",">
                 #{item}
             </foreach>
         </if>
+        <if test="searchType == 1" >
+            and (u.realname like concat('%', #{searchKey}, '%') or u.id_card like concat('%', #{searchKey}, '%') or
+            u.id_card in
+            <foreach collection="idCards" item="item" index="index" open="(" close=")" separator=",">
+                #{item}
+            </foreach>)
+        </if>
         <if test="userId != null and userId != '' ">
             and us.user_id = #{userId}
         </if>