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/PrivilageUserShopRelationDO...

34 lines
1.4 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.PoiStoreStaffDOMapper">
<select id="selectAllShopId" resultType="java.lang.Long">
select id
from poi_store where status = 1
</select>
<select id="selectByUserId" resultType="java.lang.Long">
select store_id from poi_store_staff where user_id = #{userId}
</select>
<select id="selectSellersByShopIds" resultType="com.kiisoo.ic.store.bean.PoiStoreStaffDTO">
select
t2.id, t2.name, t2.mobil, t2.email, t2.address, t2.remark, t2.status
from poi_store_staff t1, privilage_user t2
where t1.user_id = t2.id and
<choose>
<when test="shopId != null and shopId.size > 0">
t1.store_id in
<foreach collection="shopId" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</when>
<otherwise>
1 = 0
</otherwise>
</choose>
group by t1.staff_code
</select>
<select id="selectShopManagerByShop" resultType="java.lang.String">
select staff_code from poi_store_staff where store_id = #{shopId} and status = 1 and type = 1
</select>
</mapper>