RuleConditionMapper.xml 1.3 KB

1234567891011121314151617181920212223242526272829
  1. <!DOCTYPE mapper
  2. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  3. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  4. <mapper namespace="com.bosshand.virgo.ringzle.dao.RuleConditionDao">
  5. <resultMap type="com.bosshand.virgo.ringzle.model.RuleCondition" id="ruleConditionResult">
  6. <result column="ruleId" property="ruleId"/>
  7. <result column="propertyName" property="propertyName"/>
  8. <result column="propertyValue" property="propertyValue"/>
  9. <result column="factor" property="factor"/>
  10. <result column="elementIds" property="elementIds"/>
  11. <result column="color" property="color"/>
  12. <result column="lineColor" property="lineColor"/>
  13. <result column="image" property="image"/>
  14. </resultMap>
  15. <insert id="batchSave" parameterType="com.bosshand.virgo.ringzle.model.RuleCondition">
  16. INSERT INTO iot_entity_bim_rule_condition (ruleId,propertyName,propertyValue,factor,elementIds,color,lineColor,image) VALUES
  17. <foreach collection="list" index="index" item="item" separator=",">
  18. (#{item.ruleId},#{item.propertyName},#{item.propertyValue},#{item.factor},#{item.elementIds},#{item.color},#{item.lineColor},#{item.image})
  19. </foreach>
  20. </insert>
  21. <delete id="delete">
  22. delete FROM iot_entity_bim_rule_condition where ruleId=#{ruleId}
  23. </delete>
  24. </mapper>