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/PoiStoreDOMapper.xml

44 lines
1.9 KiB
XML

<?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.store.mapper.PoiStoreDOMapper">
<select id="selectRegionShop" resultType="com.kiisoo.ic.store.entity.PoiStore">
select t1.id,t1.name,t1.type,t1.code from poi_store t1, poi_store_region t2
where t1.id = t2.store_id and t2.region_id = #{regionId}
</select>
6 years ago
<select id="selectShopMsg" resultType="com.kiisoo.ic.generalize.entity.ShopRegionDO">
6 years ago
select t1.name as shopName,t3.name as regionName
from poi_store t1 left join poi_store_region t2 on t1.id = t2.store_id left join poi_region t3 on t2.region_id = t3.id
where t1.id = #{shopId}
6 years ago
</select>
<select id="selectCompanyStore" resultType="com.kiisoo.ic.generalize.entity.CompanyStoreDO">
select t2.name as companyName,t5.name as shopName
from poi_store_staff t1,
privilage_organizational t2,
privilage_organizational_domain t3,
privilage_domain_entity t4,
poi_store t5
where t2.id = t3.org_id
and t1.store_id = t5.id
and t3.domain_id = t4.domain_id
and t4.type = 3
and t1.store_id = t4.entity_id
and t1.user_id = #{sellerId}
</select>
<select id="selectShopByCompany" resultType="com.kiisoo.ic.store.entity.PoiStore">
select t3.id as shopId,t3.name as shopName,
from privilage_organizational_domain t1,
privilage_domain_entity t2,
poi_store t3
where t1.domain_id = t2.domain_id
and t2.entity_id = t3.id
</select>
<select id="selectSellerByShop" resultType="com.kiisoo.ic.system.entity.PrivilageUserDO">
select t2.id ,t2.name
from poi_store_staff t1,
privilage_user t2
where t1.user_id = t2.id
and t1.store_id = #{shopId}
</select>
</mapper>