物管理后端
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.

44 lines
1.9 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.thing.alarm.alarm.mapper.AlarmRuleSettingMapper">
  4. <resultMap type="com.thing.alarm.alarm.entity.AlarmRuleSettingEntity" id="alarmRuleSettingMap">
  5. <result property="id" column="id"/>
  6. <result property="settingType" column="setting_type"/>
  7. <result property="settingIds" column="setting_ids"/>
  8. <result property="actionType" column="action_type"/>
  9. <result property="actionId" column="action_id"/>
  10. <result property="tenantCode" column="tenant_code"/>
  11. <result property="companyId" column="company_id"/>
  12. <result property="deptId" column="dept_id"/>
  13. <result property="creator" column="creator"/>
  14. <result property="createDate" column="create_date"/>
  15. <result property="updater" column="updater"/>
  16. <result property="updateDate" column="update_date"/>
  17. </resultMap>
  18. <select id="getAlarmRuleSettingPageList" resultType="com.thing.alarm.alarm.dto.AlarmRuleActionPageDTO">
  19. select
  20. ars.id,
  21. ars.action_type as actionType,
  22. mps.receivers as receivers,
  23. mps.name as pushName,
  24. su.real_name as creator,
  25. ars.create_date
  26. from alarm_rule_setting ars
  27. left join msg_push_setting mps on mps.id = ars.action_id
  28. left join sys_user su on su.id = ars.creator
  29. <where>
  30. <if test="pushId != null">
  31. and mps.id = #{pushId}
  32. </if>
  33. <if test="actionIdList != null">
  34. AND ars.action_id IN
  35. <foreach item="actionId" collection="actionIdList" open="(" separator="," close=")">
  36. #{actionId}
  37. </foreach>
  38. </if>
  39. </where>
  40. </select>
  41. </mapper>