优化--超级管理员也可以查找到公司信息

上级 6b260e63
...@@ -160,9 +160,14 @@ ...@@ -160,9 +160,14 @@
SELECT ci.id, ci.company_type, ci.company_name, ci.full_name, ci.province, ci.city, ci.district, ci.address, ci.company_user_name,cbu.back_user_account_id, SELECT ci.id, ci.company_type, ci.company_name, ci.full_name, ci.province, ci.city, ci.district, ci.address, ci.company_user_name,cbu.back_user_account_id,
ci.phone_num, ci.remark, ci.create_time,ci.brand_logo, ci.brand_name, ci.license_img, ci.credit_code, ci.content, ci.score,ci.lon,ci.lat, ci.back_img,cm.user_account_id,ut.cooperation_tag_id ci.phone_num, ci.remark, ci.create_time,ci.brand_logo, ci.brand_name, ci.license_img, ci.credit_code, ci.content, ci.score,ci.lon,ci.lat, ci.back_img,cm.user_account_id,ut.cooperation_tag_id
FROM company_back_user cbu INNER JOIN company_info ci ON ci.id = cbu.company_info_id FROM company_back_user cbu INNER JOIN company_info ci ON ci.id = cbu.company_info_id
inner join company_member cm on cm.company_info_id = ci.id left join company_member cm on cm.company_info_id = ci.id
left outer join user_tag ut on ut.user_account_id = cm.user_account_id left outer join user_tag ut on ut.user_account_id = cm.user_account_id
WHERE cbu.back_user_account_id = #{backUserAccountId} and ci.is_deleted = 0 and cm.is_leader = 1 limit 1 WHERE cbu.back_user_account_id = #{backUserAccountId} and ci.is_deleted = 0
-- 超级管理员后台id是1没有绑定用户
<if test="baUserAccountId != 1">
and cm.is_leader = 1
</if>
limit 1
</select> </select>
<select id="countCompanyBackUser" resultType="java.lang.Integer"> <select id="countCompanyBackUser" resultType="java.lang.Integer">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论