针灸质控中心平台
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.

54 lines
1.6 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.DmsUserDao">
<select id="selectUserByUserName" resultType="com.acupuncture.system.domain.vo.DmsLoginUserVo$DmsUserVo">
select
id,
tenant_id as tenantId,
user_name as userName,
password,
nick_name as nickName,
email,
phonenumber,
sex,
status
from
dms_user
where
user_name = #{userName}
</select>
<select id="queryLoginUserDataScore" resultType="com.acupuncture.system.domain.vo.DmsLoginUserVo$DataScoreVo">
select
d.id as dmsUserId,
d.user_name as dmsUsername,
d.nick_name as dmsUserNickName,
s.id as scoreId,
s.data_source_key as dataSourceKey,
s.hospital_id as hospitalId,
s.url,
s.username,
s.password,
t.id as tenantId,
d.del_flag as delFlag
from
dms_user d
left join
dms_tenant t
on
d.tenant_id = t.id
left join
ums_data_source s
on
d.tenant_id = t.id
<where>
<if test="userName != null and userName != ''">
and d.user_name = #{userName}
</if>
and s.del_flag = 0
and t.del_flag = 0
</where>
</select>
</mapper>