多租户与景区关系

This commit is contained in:
2025-09-29 19:29:41 +08:00
parent 4c154ec746
commit dbd4d4d198
37 changed files with 997 additions and 267 deletions
@@ -2,12 +2,18 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.central.user.mapper.SysUserMapper">
<sql id="where">
<where>
t.is_del=0
<if test="u.id != null and u.id != ''">
and t.id like concat('%', #{u.id}, '%')
</if>
<sql id="where">
<where>
t.is_del=0
<if test="u.tenantIds != null and u.tenantIds.size > 0">
and t.company in
<foreach collection="u.tenantIds" item="tid" open="(" separator="," close=")">
#{tid}
</foreach>
</if>
<if test="u.id != null and u.id != ''">
and t.id like concat('%', #{u.id}, '%')
</if>
<if test="u.username != null and u.username != ''">
and t.username like concat('%', #{u.username}, '%')
</if>
@@ -40,4 +46,4 @@
<include refid="where" />
order by t.id desc
</select>
</mapper>
</mapper>