Jelajahi Sumber

客户信息 标签搜索 改为And

三七 2 hari lalu
induk
melakukan
d2fbd2392f

+ 3 - 0
fs-service/src/main/java/com/fs/his/mapper/FsDoctorMapper.java

@@ -175,10 +175,13 @@ public interface FsDoctorMapper
     Long selectFsDoctorType2Ids(Integer type);
     @Select("select * from fs_doctor where doctor_id=#{doctorId} for update")
     FsDoctor selectFsDoctorByDoctorIdForUpdate(Long doctorId);
+
     @Select("select * from fs_doctor where doctor_type=2 and  `status`=1 and is_audit=1 and sign_url is not null and audit_type LIKE CONCAT('%', #{type}, '%')  ORDER BY RAND() LIMIT 1")
     FsDoctor selectPackageFsDoctorType2Ids(Integer type);
+
     @Select("select doctor_id from fs_doctor where doctor_type=1 and  `status`=1 and is_audit=1 and is_agreement_prescribe_doctor=1  and sign_url is not null")
     List<Long>  selectFsDoctorDoctorByPackage();
+
     @Select("select doctor_id from fs_doctor where doctor_type=1 and  `status`=1 and is_audit=1 and dept_id=39 and is_follow=1  ORDER BY RAND() LIMIT 1")
     Long selectFollowDoctorDoctorByPackage();
     @Select("select * from fs_doctor where doctor_type=1 and  `status`=1 and is_audit=1 and dept_id=39 ")

+ 5 - 1
fs-service/src/main/java/com/fs/qw/mapper/QwExternalContactMapper.java

@@ -233,7 +233,11 @@ public interface QwExternalContactMapper extends BaseMapper<QwExternalContact> {
             "            <if test=\"description != null  and description != ''\"> and ec.description = #{description}</if>\n" +
 
             "<if test ='tagIds!=null and tagIds.size()!=0 '> " +
-            " and <foreach collection='tagIds'  item='item' index='index'  open='( 1=2 ' separator='' close=')'> or find_in_set(  #{item} , REGEXP_REPLACE ( ec.tag_ids, '[\"\\\\[\\\\]]', '' ) )  </foreach> " +
+            "    and (\n" +
+            "    <foreach collection='tagIds' item='item' index='index' separator=' AND '>\n" +
+            "        find_in_set(#{item}, REGEXP_REPLACE(ec.tag_ids, '[\"\\\\[\\\\]]', ''))\n" +
+            "    </foreach>\n" +
+            "    )"+
             "</if> " +
 
             "            <if test=\"remarkMobiles != null  and remarkMobiles != ''\"> and ec.remark_mobiles like concat( #{remarkMobiles}, '%')</if>\n" +