|
|
@ -6,15 +6,17 @@
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectShopIdByRetail" resultType="com.kiisoo.ic.generalize.entity.CompanyStoreDO">
|
|
|
|
<select id="selectShopIdByRetail" resultType="com.kiisoo.ic.generalize.entity.CompanyStoreDO">
|
|
|
|
select t3.entity_id as shopId,t1.parent_id as orgId
|
|
|
|
select t3.entity_id as shopId,t1.id as orgId,t1.parent_id as parentId
|
|
|
|
from privilage_organizational t1,
|
|
|
|
from privilage_organizational t,
|
|
|
|
|
|
|
|
privilage_organizational t1,
|
|
|
|
privilage_organizational_domain t2,
|
|
|
|
privilage_organizational_domain t2,
|
|
|
|
privilage_domain_entity t3
|
|
|
|
privilage_domain_entity t3
|
|
|
|
where t1.id = t2.org_id
|
|
|
|
where t1.id = t2.org_id
|
|
|
|
|
|
|
|
and t.id = t1.parent_id
|
|
|
|
and t2.domain_id = t3.domain_id
|
|
|
|
and t2.domain_id = t3.domain_id
|
|
|
|
and t3.type = 3
|
|
|
|
and t3.type = 3
|
|
|
|
<if test="orgId != null">
|
|
|
|
<if test="orgId != null">
|
|
|
|
and t1.id = #{orgId}
|
|
|
|
and t.id = #{orgId}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="shopId != null">
|
|
|
|
<if test="shopId != null">
|
|
|
|
and t3.entity_id = #{shopId}
|
|
|
|
and t3.entity_id = #{shopId}
|
|
|
|