12345678910111213141516171819202122232425262728 |
- <!DOCTYPE mapper
- PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.bosshand.virgo.ringzle.dao.SensorStainingRulesConditionDao">
- <resultMap type="com.bosshand.virgo.ringzle.model.SensorStainingRulesCondition" id="sensorStainingRulesConditionResult">
- <id column="id" property="id"/>
- <result column="sensorStainingRulesId" property="sensorStainingRulesId"/>
- <result column="sensorId" property="sensorId"/>
- <result column="sensorPhysicalQuantityId" property="sensorPhysicalQuantityId"/>
- <result column="sensorPhysicalQuantityName" property="sensorPhysicalQuantityName"/>
- <result column="sensorPhysicalQuantityValue" property="sensorPhysicalQuantityValue"/>
- </resultMap>
- <insert id="save" parameterType="com.bosshand.virgo.ringzle.model.SensorStainingRulesCondition" useGeneratedKeys="true" keyProperty="id">
- INSERT INTO sensor_staining_rules_condition (sensorStainingRulesId,sensorId,sensorPhysicalQuantityId,sensorPhysicalQuantityName,sensorPhysicalQuantityValue)
- VALUES (#{sensorStainingRulesId},#{sensorId},#{sensorPhysicalQuantityId},#{sensorPhysicalQuantityName},#{sensorPhysicalQuantityValue})
- </insert>
- <delete id="delete">
- delete FROM sensor_staining_rules_condition where sensorStainingRulesId=#{sensorStainingRulesId}
- </delete>
- <select id="getBySensorId" resultMap="sensorStainingRulesConditionResult">
- select * FROM sensor_staining_rules_condition where sensorId =#{sensorId} and sensorPhysicalQuantityId =#{sensorPhysicalQuantityId}
- </select>
- </mapper>
|