|
|
|
@ -1100,30 +1100,74 @@ |
|
|
|
|
<select id="selectOrganizationInfo" resultType="com.huoran.users.entity.res.OrganizationInfo"> |
|
|
|
|
SELECT |
|
|
|
|
CASE |
|
|
|
|
WHEN |
|
|
|
|
ec.audit_status = 2 THEN |
|
|
|
|
ec.company_name ELSE tc.classification_name |
|
|
|
|
WHEN he_parent.audit_status = 2 THEN |
|
|
|
|
ec.company_name |
|
|
|
|
ELSE |
|
|
|
|
CASE |
|
|
|
|
WHEN tc.is_team = 0 THEN |
|
|
|
|
tc_parent.classification_name |
|
|
|
|
ELSE |
|
|
|
|
tc.classification_name |
|
|
|
|
END |
|
|
|
|
END AS organizationName, |
|
|
|
|
ec.platform_source AS platform_id, |
|
|
|
|
ec.credit_code, |
|
|
|
|
|
|
|
|
|
CASE |
|
|
|
|
WHEN tc.is_team = 0 THEN |
|
|
|
|
he_parent.credit_code |
|
|
|
|
ELSE |
|
|
|
|
ec.credit_code |
|
|
|
|
END as credit_code, |
|
|
|
|
|
|
|
|
|
CASE |
|
|
|
|
WHEN tc.is_team = 0 THEN |
|
|
|
|
CASE |
|
|
|
|
WHEN he_parent.audit_status = 2 THEN |
|
|
|
|
'已认证' ELSE '未认证或审核中' |
|
|
|
|
END |
|
|
|
|
ELSE |
|
|
|
|
CASE |
|
|
|
|
WHEN ec.audit_status = 2 THEN |
|
|
|
|
'已认证' ELSE '未认证或审核中' |
|
|
|
|
END AS authentication, |
|
|
|
|
END |
|
|
|
|
END |
|
|
|
|
AS authentication, |
|
|
|
|
pt.classification_id AS teamId, |
|
|
|
|
ta.account_id, |
|
|
|
|
tc.is_enable, |
|
|
|
|
ec.audit_status, |
|
|
|
|
ta.manage_id |
|
|
|
|
CASE |
|
|
|
|
WHEN tc.is_team = 0 THEN |
|
|
|
|
he_parent.audit_status |
|
|
|
|
ELSE |
|
|
|
|
ec.audit_status |
|
|
|
|
END as audit_status, |
|
|
|
|
ta.manage_id ,tc.is_team,tc.parent_id |
|
|
|
|
FROM |
|
|
|
|
hr_user_account hu |
|
|
|
|
left JOIN hr_enterprise_certification ec ON hu.app_open_id = ec.open_id |
|
|
|
|
LEFT JOIN hr_enterprise_certification ec ON hu.app_open_id = ec.open_id |
|
|
|
|
AND ec.platform_source = hu.platform_id |
|
|
|
|
INNER JOIN k_platform_team_account ta ON ta.account_id = hu.id |
|
|
|
|
INNER JOIN k_platform_team pt ON ta.manage_id = pt.manage_id |
|
|
|
|
INNER JOIN k_platform_team_classification tc ON tc.id = pt.classification_id and tc.is_del = 0 |
|
|
|
|
INNER JOIN k_platform_team_classification tc ON tc.id = pt.classification_id |
|
|
|
|
AND tc.is_del = 0 |
|
|
|
|
LEFT JOIN k_platform_team_classification tc_parent ON tc.parent_id = tc_parent.id |
|
|
|
|
LEFT JOIN hr_enterprise_certification he_parent ON hu.app_open_id = he_parent.open_id AND tc_parent.id = pt.classification_id |
|
|
|
|
WHERE |
|
|
|
|
hu.app_open_id = #{openId} |
|
|
|
|
AND hu.is_del = 0 |
|
|
|
|
</select> |
|
|
|
|
<select id="selectTeamByOpenId" resultType="java.lang.Integer"> |
|
|
|
|
SELECT |
|
|
|
|
SUM(is_team) team |
|
|
|
|
FROM |
|
|
|
|
hr_user_account a |
|
|
|
|
join k_platform_team_account ta on a.id = ta.account_id |
|
|
|
|
join k_platform_team pt on pt.manage_id = ta.manage_id |
|
|
|
|
join k_platform_team_classification tc on tc.id = pt.classification_id |
|
|
|
|
WHERE |
|
|
|
|
hu.app_open_id = #{openId} and hu.is_del = 0 |
|
|
|
|
a.app_open_id = #{id} |
|
|
|
|
AND a.is_del = 0 |
|
|
|
|
AND a.platform_id !=7 |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<update id="unbindMobilePhone" parameterType="java.lang.Integer"> |
|
|
|
|