1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
- <mapper namespace="com.css.simulation.resource.scene.mapper.SceneAccidentMapper" >
- <insert id="saveSceneAccident" parameterType="api.common.pojo.po.scene.SceneAccidentPO">
- insert into simulation.scene_accident
- (accident_id,scene_name,self_driving,target_driving,
- self_reaction,conflict_behavior,conflict_type,
- create_user_id,create_time,modify_user_id,modify_time,
- is_deleted,share,video_preview,video_address,osgb_address,xml_address,xodr_address,
- json_address)
- values (#{accidentId,jdbcType=VARCHAR},#{sceneName,jdbcType=VARCHAR},#{selfDriving,jdbcType=VARCHAR}, #{targetDriving,jdbcType=VARCHAR},
- #{selfReaction,jdbcType=VARCHAR}, #{conflictBehavior,jdbcType=VARCHAR},#{conflictType,jdbcType=VARCHAR},
- #{createUserId,jdbcType=VARCHAR},#{createTime},#{modifyUserId,jdbcType=VARCHAR},#{modifyTime},
- #{isDeleted,jdbcType=VARCHAR}, #{share,jdbcType=VARCHAR},#{videoPreview,jdbcType=VARCHAR},#{videoAddress,jdbcType=VARCHAR},#{osgbAddress,jdbcType=VARCHAR},
- #{xmlAddress,jdbcType=VARCHAR}, #{xodrAddress,jdbcType=VARCHAR},#{jsonAddress,jdbcType=VARCHAR})
- </insert>
- <select id="querySceneAccidentList" parameterType="api.common.pojo.param.scene.SceneAccidentParam" resultType="api.common.pojo.po.scene.SceneAccidentPO">
- select
- accident_id,scene_name,self_driving,target_driving,
- self_reaction,conflict_behavior,conflict_type,
- create_user_id,create_time,modify_user_id,modify_time,
- is_deleted,share,video_address,video_preview,osgb_address,xml_address,xodr_address,
- json_address
- from simulation.scene_accident
- <where>
- is_deleted = '0'
- <if test="sceneName != null and sceneName != ''">
- and scene_name like CONCAT('%',#{sceneName,jdbcType=VARCHAR},'%')
- </if>
- <if test="selfDriving != null and selfDriving.length != 0 ">
- and self_driving in
- <foreach collection="selfDriving" item="item" index="index"
- separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- <if test="targetDriving != null and targetDriving.length != 0">
- and target_driving in
- <foreach collection="targetDriving" item="item" index="index"
- separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- <if test="selfReaction != null and selfReaction.length != 0">
- and self_reaction in
- <foreach collection="selfReaction" item="item" index="index"
- separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- <if test="conflictBehavior != null and conflictBehavior.length != 0">
- and conflict_behavior in
- <foreach collection="conflictBehavior" item="item" index="index"
- separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- <if test="conflictType != null and conflictType.length != 0">
- and conflict_type in
- <foreach collection="conflictType" item="item" index="index"
- separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- order by create_time desc
- </where>
- </select>
- </mapper>
|