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.
45 lines
1.9 KiB
XML
45 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.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,t1.id as staffId
|
|
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>
|
|
|
|
<select id="selectInfoById" resultType="com.kiisoo.ic.webappmy.vo.StafferInfoVO">
|
|
select t2.id,t2.staff_code as stafferNo,t1.`name`,t3.`name` as shopName,t3.id as storeId
|
|
from privilage_user t1, poi_store_staff t2, poi_store t3
|
|
where t1.id = t2.user_id and t2.`status` = 1 and t2.store_code = t3.`code`
|
|
</select>
|
|
|
|
<select id="selectStaffIdByUserId" resultType="java.lang.Long">
|
|
select id from poi_store_staff where user_id = #{userId}
|
|
limit 1
|
|
</select>
|
|
</mapper>
|