You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bsdgy-server/src/main/resources/mapper/RetailCompanyMapper.xml

41 lines
1.4 KiB
XML

6 years ago
<?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.kiisoo.ic.generalize.mapper.RetailCompanyMapper">
6 years ago
<select id="selectShopIdByRetail" resultType="com.kiisoo.ic.generalize.entity.CompanyStoreDO">
select t3.entity_id as shopId,t1.name as companyName
6 years ago
from privilage_organizational t1,
privilage_organizational_domain t2,
privilage_domain_entity t3
where t1.id = t2.org_id
and t2.domain_id = t3.domain_id
and t3.type = 3
<if test="orgId != null">
and t1.id = #{orgId}
</if>
<if test="shopId != null">
and t3.entity_id = #{shopId}
</if>
</select>
<select id="selectSellerIdsByShop" resultType="java.lang.Long">
6 years ago
select t4.user_id
6 years ago
from privilage_organizational t1,
6 years ago
privilage_organizational_domain t2,
privilage_domain_entity t3,
poi_store_staff t4
6 years ago
where t1.id = t2.org_id
6 years ago
and t2.domain_id = t3.domain_id
and t3.entity_id = t4.store_id
and t3.type = 3
6 years ago
<if test="orgId != null">
and t1.id = #{orgId}
</if>
<if test="shopId != null">
6 years ago
and t4.store_id = #{shopId}
6 years ago
</if>
6 years ago
<if test="sellerId != null">
and t4.user_id = #{sellerId}
6 years ago
</if>
</select>
</mapper>