فهرست منبع

团队姓名和工号搜索无效,手机号可以搜索

lipf 4 ماه پیش
والد
کامیت
798ef60d14

+ 1 - 1
tenant/organization/src/main/java/com/jzg/organization/service/impl/SysOrganizationServiceImpl.java

@@ -140,7 +140,7 @@ public class SysOrganizationServiceImpl extends ServiceImpl<SysOrganizationMappe
     /**
      * 获取团队下的人员列表分页
      *
-     * @param sysOrganizationUserLinkQueryVo 查询参数
+     * @param sysOrganizationUserLinkQueryVo 查询参数, 其中的name 可能是姓名,手机号,工号
      * @return Page<SysOrganizationUserLinkVo> 此次分页得到的满足条件的分页数据
      * @author lipf 维护
      * @date 2026年4月10日10:09:12

+ 8 - 8
tenant/organization/src/main/resources/mapper/SysOrganizationMapper.xml

@@ -58,14 +58,14 @@
         left join sys_user ref_su on ref_su.id = ref_suji.user_id
         left join sys_user_jzg_info led_suji on led_suji.id = suji.leader_id
         left join sys_user led_su on led_su.id = led_suji.user_id
-        where 1 = 1
-        <if test="param.id != null and param.id != ''">
-            and so.id = #{param.id}
-        </if>
-        <if test="param.name != null and param.name != ''">
-            and su.username like concat('%',#{param.name},'%')
-        </if>
-
+        <where>
+            <if test="param.id != null and param.id != ''">
+                and so.id = #{param.id}
+            </if>
+            <if test="param.name != null and param.name != ''">
+                and ( su.username like concat('%',#{param.name},'%') or suji.name like concat('%',#{param.name},'%') or su.id like concat('%',#{param.name},'%') )
+            </if>
+        </where>
     </select>
 
 </mapper>