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.StandardsRegulationsMapper" >
- <insert id="saveStandardsRegulations" parameterType="api.common.pojo.po.scene.StandardsRegulationsPO">
- insert into simulation.scene_standards_regulations
- (regulations_id,scene_name,regulation_type,standard_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 (#{regulationsId,jdbcType=VARCHAR},#{sceneName,jdbcType=VARCHAR},#{regulationType,jdbcType=VARCHAR}, #{standardType,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="queryStandardsRegulationsList" parameterType="api.common.pojo.param.scene.StandardsRegulationsParam" resultType="api.common.pojo.po.scene.StandardsRegulationsPO">
- select
- regulations_id,scene_name,regulation_type,standard_type,
- create_user_id,create_time,modify_user_id,
- modify_time,is_deleted,share,video_address,osgb_address,
- xml_address,xodr_address,json_address,video_preview
- from simulation.scene_standards_regulations
- <where>
- is_deleted = '0'
- <if test="sceneName != null and sceneName != ''">
- and scene_name like CONCAT('%',#{sceneName,jdbcType=VARCHAR},'%')
- </if>
- <if test="regulationType != null and regulationType.length != 0">
- and regulation_type in
- <foreach collection="regulationType" item="item" index="index"
- separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- <if test="standardType != null and standardType != ''">
- and standard_type like CONCAT('%',#{standardType,jdbcType=VARCHAR},'%')
- </if>
- order by create_time desc
- </where>
- </select>
- <update id="deleteStandardsRegulations" parameterType="api.common.pojo.po.scene.StandardsRegulationsPO">
- update simulation.scene_standards_regulations
- <set>
- <if test="isDeleted != null and isDeleted!=''">
- is_deleted = #{isDeleted,jdbcType=VARCHAR},
- </if>
- <if test="modifyUserId != null and modifyUserId!=''">
- modify_user_id = #{modifyUserId,jdbcType=VARCHAR},
- </if>
- <if test="modifyTime != null">
- modify_time = #{modifyTime},
- </if>
- </set>
- where regulations_id = #{regulationsId,jdbcType=VARCHAR}
- </update>
- <select id="queryStandardsRegulationsByName" parameterType="api.common.pojo.param.scene.StandardsRegulationsParam" resultType="api.common.pojo.po.scene.StandardsRegulationsPO">
- select
- regulations_id,scene_name
- from simulation.scene_standards_regulations
- <where>
- is_deleted = '0'
- <if test="sceneName != null and sceneName != ''">
- and scene_name =#{sceneName,jdbcType=VARCHAR}
- </if>
- </where>
- </select>
- </mapper>
|