兼容+功能
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<?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">
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
from uc_org_user
|
||||
where
|
||||
deleted = 0
|
||||
deleted = FALSE
|
||||
<if test="param.id != null">
|
||||
and id = #{param.id}
|
||||
</if>
|
||||
@@ -33,9 +33,9 @@
|
||||
select
|
||||
CASE WHEN count(*) = 0 THEN 1 ELSE 0 end
|
||||
from uc_org_user
|
||||
where deleted = 0
|
||||
where deleted = FALSE
|
||||
and org_id = #{orgId}
|
||||
and (user_id = #{userId} or administrator = 1)
|
||||
and (user_id = #{userId} or administrator = TRUE)
|
||||
</select>
|
||||
|
||||
<select id="existOrgUser" resultType="boolean">
|
||||
@@ -43,15 +43,15 @@
|
||||
CASE WHEN count(*) > 0 THEN 1 ELSE 0 end
|
||||
from uc_user u
|
||||
where u.type = 1
|
||||
and u.deleted = 0
|
||||
and u.deleted = FALSE
|
||||
and u.phone = #{phone}
|
||||
and exists
|
||||
(select *
|
||||
from uc_org_user ou
|
||||
inner join xs_org o on o.id = ou.org_id
|
||||
where ou.user_id = u.id
|
||||
and ou.deleted = 0
|
||||
and o.enable = 1
|
||||
and ou.deleted = FALSE
|
||||
and o.enable = TRUE
|
||||
)
|
||||
</select>
|
||||
|
||||
@@ -67,12 +67,12 @@
|
||||
FROM
|
||||
xs_org t1
|
||||
INNER JOIN uc_org_user t2 ON t1.id = t2.org_id
|
||||
AND t2.deleted = 0
|
||||
AND t2.deleted = FALSE
|
||||
INNER JOIN uc_user t3 ON t2.user_id = t3.id
|
||||
AND t3.deleted = 0
|
||||
AND t3.deleted = FALSE
|
||||
WHERE
|
||||
t1.deleted = 0
|
||||
and t1.enable = 1
|
||||
t1.deleted = FALSE
|
||||
and t1.enable = TRUE
|
||||
AND t3.id = #{userId}
|
||||
<if test="orgId != null">
|
||||
and t1.id = #{orgId}
|
||||
@@ -103,8 +103,8 @@
|
||||
uc_user u
|
||||
LEFT JOIN uc_org_user ou ON u.id = ou.user_id
|
||||
WHERE
|
||||
u.deleted = 0
|
||||
AND ou.deleted = 0
|
||||
u.deleted = FALSE
|
||||
AND ou.deleted = FALSE
|
||||
<if test="param.userId != null">
|
||||
AND u.id = #{param.userId}
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user