feat:门店人员
This commit is contained in:
@@ -124,4 +124,26 @@
|
||||
from store_${enterpriseId} where is_delete = 'effective' order by id asc
|
||||
</select>
|
||||
|
||||
<select id="getStoreAreaList" resultType="com.cool.store.dto.store.StoreAreaDTO">
|
||||
select
|
||||
a.store_name as storeName,
|
||||
a.store_id as storeId,
|
||||
a.region_path as regionPath,
|
||||
a.region_id as regionId,
|
||||
a.region_id as areaId,
|
||||
a.store_status as storeStatus
|
||||
FROM store_${enterpriseId} a
|
||||
<where>
|
||||
a.is_delete='effective'
|
||||
<if test="storeIds!=null and storeIds.size>0">
|
||||
<foreach collection="storeIds" item="storeId" index="index" separator="," open="and a.store_id in("
|
||||
close=")">
|
||||
#{storeId}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -376,4 +376,30 @@
|
||||
|
||||
</select>
|
||||
|
||||
<select id="userAndPositionList" resultType="com.cool.store.dto.store.StoreUserDTO">
|
||||
SELECT
|
||||
eu.user_id userId,
|
||||
eu.`name` userName,
|
||||
IFNULL(eu.avatar, eu.face_url) avatar,
|
||||
eu.mobile,
|
||||
sr.id positionId,
|
||||
sr.role_name positionName
|
||||
from enterprise_user_${enterpriseId} eu
|
||||
left join enterprise_user_role_${enterpriseId} eur USING(user_id)
|
||||
left join sys_role_${enterpriseId} sr on eur.role_id = sr.id
|
||||
where eu.user_id in
|
||||
<foreach collection="userIdList" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
<if test="userName != null and userName != '' ">
|
||||
and eu.name like concat('%', #{userName}, '%')
|
||||
</if>
|
||||
and eu.active = true
|
||||
-- and sr.source = 'create'
|
||||
<if test="positionType != null and positionType != '' ">
|
||||
and sr.position_type = #{positionType}
|
||||
</if>
|
||||
and eu.user_status = '1'
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user