insert into psdc_scene(scene_name,scene_code,user_id,device_id,device_sn,scene_context,scene_key,scene_value)
values (#{sceneName},#{sceneCode},#{userId},#{deviceId},#{deviceSn},#{sceneContext},#{sceneKey},#{sceneValue})
Insert into psdc_scene(scene_name,scene_code,user_id,device_id,device_sn,scene_context,scene_key,scene_value,scene_remark, create_by, create_time)
Values
(#{entity.sceneName}, #{entity.sceneCode},#{entity.userId}, #{entity.deviceId}, #{entity.deviceSn}, #{entity.sceneContext}, #{entity.sceneKey}, #{entity.sceneValue},#{entity.sceneRemark},#{entity.createBy},#{entity.createTime})
Update psdc_scene
`scene_name`= #{item.sceneName},
`scene_context` = #{item.sceneContext},
`scene_value` = ${item.sceneValue},
scene_remark = #{item.sceneRemark},
And scene_code = ${item.sceneCode}
And user_id = ${item.userId}
And device_id = ${item.deviceId}
And scene_key = #{item.sceneKey}
Update psdc_scene
scene_name = #{sceneName},
device_sn = #{deviceSn},
scene_context = #{sceneContext},
scene_key = #{sceneKey},
scene_value = #{sceneValue},
scene_id = #{sceneId}
And scene_code = #{sceneCode}
delete from psdc_scene where scene_id = #{sceneId}
Delete From psdc_scene Where scene_code = #{sceneCode}