IotWarnindicatorMapper.xml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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.yunfeiyun.agmp.iotm.web.mapper.IotWarnindicatorMapper">
  6. <resultMap type="IotWarnindicator" id="IotWarnindicatorResult">
  7. <result property="id" column="id" />
  8. <result property="wiBid" column="wiBid" />
  9. <result property="wcBid" column="wcBid" />
  10. <result property="wdBid" column="wdBid" />
  11. <result property="wiExpression" column="wiExpression" />
  12. <result property="wiValue" column="wiValue" />
  13. <result property="wiCreator" column="wiCreator" />
  14. <result property="wiCreateddate" column="wiCreateddate" />
  15. <result property="wiModifieddate" column="wiModifieddate" />
  16. <result property="wiModifier" column="wiModifier" />
  17. <result property="tid" column="tid" />
  18. </resultMap>
  19. <sql id="selectIotWarnindicatorVo">
  20. select id, wiBid, wcBid, wdBid, wiExpression, wiValue, wiCreator, wiCreateddate, wiModifieddate, wiModifier, tid from IotWarnindicator
  21. </sql>
  22. <select id="selectIotWarnindicatorList" parameterType="IotWarnindicator" resultMap="IotWarnindicatorResult">
  23. <include refid="selectIotWarnindicatorVo"/>
  24. <where>
  25. <if test="wiBid != null and wiBid != ''"> and wiBid = #{wiBid}</if>
  26. <if test="wcBid != null and wcBid != ''"> and wcBid = #{wcBid}</if>
  27. <if test="wdBid != null and wdBid != ''"> and wdBid = #{wdBid}</if>
  28. <if test="wiExpression != null and wiExpression != ''"> and wiExpression = #{wiExpression}</if>
  29. <if test="wiValue != null and wiValue != ''"> and wiValue = #{wiValue}</if>
  30. <if test="wiCreator != null and wiCreator != ''"> and wiCreator = #{wiCreator}</if>
  31. <if test="wiCreateddate != null and wiCreateddate != ''"> and wiCreateddate = #{wiCreateddate}</if>
  32. <if test="wiModifieddate != null and wiModifieddate != ''"> and wiModifieddate = #{wiModifieddate}</if>
  33. <if test="wiModifier != null and wiModifier != ''"> and wiModifier = #{wiModifier}</if>
  34. <if test="tid != null and tid != ''"> and tid = #{tid}</if>
  35. </where>
  36. </select>
  37. <select id="selectIotWarnindicatorByWiBid" parameterType="Long" resultMap="IotWarnindicatorResult">
  38. <include refid="selectIotWarnindicatorVo"/>
  39. where id = #{id} and tid = #{tid}
  40. </select>
  41. <insert id="insertIotWarnindicator" parameterType="IotWarnindicator" useGeneratedKeys="true" keyProperty="id">
  42. insert into IotWarnindicator
  43. <trim prefix="(" suffix=")" suffixOverrides=",">
  44. <if test="wiBid != null">wiBid,</if>
  45. <if test="wcBid != null">wcBid,</if>
  46. <if test="wdBid != null">wdBid,</if>
  47. <if test="wiExpression != null">wiExpression,</if>
  48. <if test="wiValue != null">wiValue,</if>
  49. <if test="wiCreator != null">wiCreator,</if>
  50. <if test="wiCreateddate != null">wiCreateddate,</if>
  51. <if test="wiModifieddate != null">wiModifieddate,</if>
  52. <if test="wiModifier != null">wiModifier,</if>
  53. <if test="tid != null and tid != ''">tid,</if>
  54. </trim>
  55. <trim prefix="values (" suffix=")" suffixOverrides=",">
  56. <if test="wiBid != null">#{wiBid},</if>
  57. <if test="wcBid != null">#{wcBid},</if>
  58. <if test="wdBid != null">#{wdBid},</if>
  59. <if test="wiExpression != null">#{wiExpression},</if>
  60. <if test="wiValue != null">#{wiValue},</if>
  61. <if test="wiCreator != null">#{wiCreator},</if>
  62. <if test="wiCreateddate != null">#{wiCreateddate},</if>
  63. <if test="wiModifieddate != null">#{wiModifieddate},</if>
  64. <if test="wiModifier != null">#{wiModifier},</if>
  65. <if test="tid != null and tid != ''">#{tid},</if>
  66. </trim>
  67. </insert>
  68. <update id="updateIotWarnindicator" parameterType="IotWarnindicator">
  69. update IotWarnindicator
  70. <trim prefix="SET" suffixOverrides=",">
  71. <if test="wiBid != null">wiBid = #{wiBid},</if>
  72. <if test="wcBid != null">wcBid = #{wcBid},</if>
  73. <if test="wdBid != null">wdBid = #{wdBid},</if>
  74. <if test="wiExpression != null">wiExpression = #{wiExpression},</if>
  75. <if test="wiValue != null">wiValue = #{wiValue},</if>
  76. <if test="wiCreator != null">wiCreator = #{wiCreator},</if>
  77. <if test="wiCreateddate != null">wiCreateddate = #{wiCreateddate},</if>
  78. <if test="wiModifieddate != null">wiModifieddate = #{wiModifieddate},</if>
  79. <if test="wiModifier != null">wiModifier = #{wiModifier},</if>
  80. <if test="tid != null and tid != ''">tid = #{tid},</if>
  81. </trim>
  82. where id = #{id}
  83. </update>
  84. <delete id="deleteIotWarnindicatorByWiBid" parameterType="Long">
  85. delete from IotWarnindicator where id = #{id} and tid = #{tid}
  86. </delete>
  87. <delete id="deleteIotWarnindicatorByWiBids" parameterType="String">
  88. delete from IotWarnindicator where tid = #{tid} and id in
  89. <foreach item="id" collection="array" open="(" separator="," close=")">
  90. #{id}
  91. </foreach>
  92. </delete>
  93. </mapper>