You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.3 KiB
39 lines
1.3 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.acupuncture.system.persist.dao.AdminTenantDao">
|
|
<select id="query" resultType="com.acupuncture.system.domain.vo.AdminTenantsVo$Result"
|
|
parameterType="com.acupuncture.system.domain.dto.AdminTenantsDto$Query">
|
|
SELECT
|
|
t.id,
|
|
t.code,
|
|
t.name,
|
|
t.leader,
|
|
t.contact_phone as contactPhone,
|
|
t.data_source_id as dataSourceId,
|
|
t.status,
|
|
u.type,
|
|
t.create_by as createBy,
|
|
t.create_time as createTime,
|
|
t.remark,
|
|
u.data_source_key as dataSourceKey
|
|
FROM
|
|
dms_tenant t
|
|
left join
|
|
ums_data_source u
|
|
on t.data_source_id = u.id
|
|
<where>
|
|
t.del_flag = 0
|
|
<if test="dto.name != null and dto.name != ''">
|
|
AND t.name like concat('%', #{dto.name}, '%')
|
|
</if>
|
|
<if test="userId != null and userId != 1 and tenantId != null">
|
|
and t.id = #{tenantId}
|
|
</if>
|
|
<if test="tenantId != null and userId != 1">
|
|
and t.id = #{tenantId}
|
|
</if>
|
|
</where>
|
|
order by u.id desc, t.create_time desc
|
|
</select>
|
|
|
|
</mapper>
|
|
|