You can not 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.4 KiB
45 lines
1.4 KiB
|
7 months 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.dongjian.dashboard.back.dao.ex.NotificationTeamsMapperExt">
|
||
|
|
|
||
|
|
|
||
|
|
<select id="checkExist" resultType="java.lang.Integer">
|
||
|
|
SELECT
|
||
|
|
COUNT(1)
|
||
|
|
FROM
|
||
|
|
notification_teams
|
||
|
|
WHERE
|
||
|
|
flag != 1 AND identity = #{identity}
|
||
|
|
<if test="companyId != null">
|
||
|
|
AND company_id = #{companyId}
|
||
|
|
</if>
|
||
|
|
<if test="teamsId != null">
|
||
|
|
AND id != #{teamsId}
|
||
|
|
</if>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
|
||
|
|
<select id="getListPage" resultType="com.dongjian.dashboard.back.vo.notificationconfig.TeamsPageVO">
|
||
|
|
SELECT
|
||
|
|
nt.id teamsId,
|
||
|
|
nt.company_id,
|
||
|
|
nt.identity,
|
||
|
|
nt.webhook,
|
||
|
|
nt.remark,
|
||
|
|
nt.created_by,
|
||
|
|
nt.created_at
|
||
|
|
FROM
|
||
|
|
notification_teams nt
|
||
|
|
WHERE
|
||
|
|
nt.flag != 1
|
||
|
|
AND nt.company_id IN <foreach collection="companyIdList" item="item" open="(" separator="," close=")">#{item}</foreach>
|
||
|
|
<if test="teamsIdList != null">
|
||
|
|
AND nt.id IN <foreach collection="teamsIdList" item="item" open="(" separator="," close=")">#{item}</foreach>
|
||
|
|
</if>
|
||
|
|
<if test="identity != null">
|
||
|
|
AND nt.identity LIKE CONCAT('%',#{identity},'%')
|
||
|
|
</if>
|
||
|
|
ORDER BY created_at DESC
|
||
|
|
</select>
|
||
|
|
|
||
|
|
</mapper>
|