PerformanceMonitorModelMapper.xml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.phm.manage.mapper.PerformanceMonitorModelMapper">
  6. <resultMap type="PerformanceMonitorModel" id="PerformanceMonitorModelResult">
  7. <result property="id" column="id"/>
  8. <result property="object" column="object"/>
  9. <result property="parameter" column="parameter"/>
  10. <result property="stateCondition" column="state_condition"/>
  11. <result property="valueMethod" column="value_method"/>
  12. <result property="alarmValue" column="alarm_value"/>
  13. <result property="thresholdValue" column="threshold_value"/>
  14. <result property="isDelete" column="is_delete"/>
  15. <result property="createBy" column="create_by"/>
  16. <result property="createTime" column="create_time"/>
  17. <result property="updateBy" column="update_by"/>
  18. <result property="updateTime" column="update_time"/>
  19. </resultMap>
  20. <sql id="selectPerformanceMonitorModelVo">
  21. select id,
  22. object,
  23. parameter,
  24. state_condition,
  25. value_method,
  26. alarm_value,
  27. threshold_value,
  28. is_delete,
  29. create_by,
  30. create_time,
  31. update_by,
  32. update_time
  33. from PHM.PHM_PERFORMANCE_MONITOR_MODEL
  34. </sql>
  35. <select id="selectPerformanceMonitorModelList" parameterType="PerformanceMonitorModel"
  36. resultMap="PerformanceMonitorModelResult">
  37. <include refid="selectPerformanceMonitorModelVo"/>
  38. <where>
  39. <if test="object != null and object != ''">and object = #{object}</if>
  40. <if test="parameter != null and parameter != ''">and parameter = #{parameter}</if>
  41. <if test="stateCondition != null and stateCondition != ''">and state_condition = #{stateCondition}</if>
  42. <if test="valueMethod != null and valueMethod != ''">and value_method = #{valueMethod}</if>
  43. <if test="alarmValue != null and alarmValue != ''">and alarm_value = #{alarmValue}</if>
  44. <if test="thresholdValue != null and thresholdValue != ''">and threshold_value = #{thresholdValue}</if>
  45. <if test="isDelete != null ">and is_delete = #{isDelete}</if>
  46. <if test="createBy != null and createBy != ''">and create_by = #{createBy}</if>
  47. <if test="createTime != null ">and create_time = #{createTime}</if>
  48. <if test="updateBy != null and updateBy != ''">and update_by = #{updateBy}</if>
  49. <if test="updateTime != null ">and update_time = #{updateTime}</if>
  50. </where>
  51. </select>
  52. <select id="selectPerformanceMonitorModelById" parameterType="Long" resultMap="PerformanceMonitorModelResult">
  53. <include refid="selectPerformanceMonitorModelVo"/>
  54. where id = #{id}
  55. </select>
  56. <insert id="insertPerformanceMonitorModel" parameterType="PerformanceMonitorModel">
  57. insert into PHM.PHM_PERFORMANCE_MONITOR_MODEL
  58. <trim prefix="(" suffix=")" suffixOverrides=",">
  59. <if test="id != null">id,</if>
  60. <if test="object != null">object,</if>
  61. <if test="parameter != null">parameter,</if>
  62. <if test="stateCondition != null">state_condition,</if>
  63. <if test="valueMethod != null">value_method,</if>
  64. <if test="alarmValue != null">alarm_value,</if>
  65. <if test="thresholdValue != null">threshold_value,</if>
  66. <if test="isDelete != null">is_delete,</if>
  67. <if test="createBy != null">create_by,</if>
  68. <if test="createTime != null">create_time,</if>
  69. <if test="updateBy != null">update_by,</if>
  70. <if test="updateTime != null">update_time,</if>
  71. </trim>
  72. <trim prefix="values (" suffix=")" suffixOverrides=",">
  73. <if test="id != null">#{id},</if>
  74. <if test="object != null">#{object},</if>
  75. <if test="parameter != null">#{parameter},</if>
  76. <if test="stateCondition != null">#{stateCondition},</if>
  77. <if test="valueMethod != null">#{valueMethod},</if>
  78. <if test="alarmValue != null">#{alarmValue},</if>
  79. <if test="thresholdValue != null">#{thresholdValue},</if>
  80. <if test="isDelete != null">#{isDelete},</if>
  81. <if test="createBy != null">#{createBy},</if>
  82. <if test="createTime != null">#{createTime},</if>
  83. <if test="updateBy != null">#{updateBy},</if>
  84. <if test="updateTime != null">#{updateTime},</if>
  85. </trim>
  86. </insert>
  87. <update id="updatePerformanceMonitorModel" parameterType="PerformanceMonitorModel">
  88. update PHM.PHM_PERFORMANCE_MONITOR_MODEL
  89. <trim prefix="SET" suffixOverrides=",">
  90. <if test="object != null">object = #{object},</if>
  91. <if test="parameter != null">parameter = #{parameter},</if>
  92. <if test="stateCondition != null">state_condition = #{stateCondition},</if>
  93. <if test="valueMethod != null">value_method = #{valueMethod},</if>
  94. <if test="alarmValue != null">alarm_value = #{alarmValue},</if>
  95. <if test="thresholdValue != null">threshold_value = #{thresholdValue},</if>
  96. <if test="isDelete != null">is_delete = #{isDelete},</if>
  97. <if test="createBy != null">create_by = #{createBy},</if>
  98. <if test="createTime != null">create_time = #{createTime},</if>
  99. <if test="updateBy != null">update_by = #{updateBy},</if>
  100. <if test="updateTime != null">update_time = #{updateTime},</if>
  101. </trim>
  102. where id = #{id}
  103. </update>
  104. <delete id="deletePerformanceMonitorModelById" parameterType="Long">
  105. delete
  106. from PHM.PHM_PERFORMANCE_MONITOR_MODEL
  107. where id = #{id}
  108. </delete>
  109. <delete id="deletePerformanceMonitorModelByIds" parameterType="String">
  110. delete from PHM.PHM_PERFORMANCE_MONITOR_MODEL where id in
  111. <foreach item="id" collection="array" open="(" separator="," close=")">
  112. #{id}
  113. </foreach>
  114. </delete>
  115. </mapper>