StandardsRegulationsMapper.xml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3. <mapper namespace="com.css.simulation.resource.scene.mapper.StandardsRegulationsMapper" >
  4. <insert id="saveStandardsRegulations" parameterType="api.common.pojo.po.scene.StandardsRegulationsPO">
  5. insert into simulation.scene_standards_regulations
  6. (regulations_id,scene_name,regulation_type,standard_type,
  7. create_user_id,create_time,modify_user_id,modify_time,
  8. is_deleted,share,video_address,osgb_address,xml_address,xodr_address,
  9. json_address)
  10. values (#{regulationsId,jdbcType=VARCHAR},#{sceneName,jdbcType=VARCHAR},#{regulationType,jdbcType=VARCHAR}, #{standardType,jdbcType=VARCHAR},
  11. #{createUserId,jdbcType=VARCHAR},#{createTime},#{modifyUserId,jdbcType=VARCHAR},#{modifyTime},
  12. #{isDeleted,jdbcType=VARCHAR}, #{share,jdbcType=VARCHAR},#{videoAddress,jdbcType=VARCHAR},#{osgbAddress,jdbcType=VARCHAR},
  13. #{xmlAddress,jdbcType=VARCHAR}, #{xodrAddress,jdbcType=VARCHAR},#{jsonAddress,jdbcType=VARCHAR})
  14. </insert>
  15. <select id="queryStandardsRegulationsList" parameterType="api.common.pojo.param.scene.StandardsRegulationsParam" resultType="api.common.pojo.po.scene.StandardsRegulationsPO">
  16. select
  17. regulations_id,scene_name,regulation_type,standard_type,
  18. create_user_id,create_time,modify_user_id,
  19. modify_time,is_deleted,share,video_address,osgb_address,
  20. xml_address,xodr_address,json_address
  21. from simulation.scene_standards_regulations
  22. <where>
  23. is_deleted = '0'
  24. <if test="sceneName != null and sceneName != ''">
  25. and scene_name like CONCAT('%',#{sceneName,jdbcType=VARCHAR},'%')
  26. </if>
  27. <if test="regulationType != null and regulationType != ''">
  28. and regulation_type in
  29. <foreach collection="regulationType" item="item" index="index"
  30. separator="," open="(" close=")">
  31. #{item}
  32. </foreach>
  33. </if>
  34. <if test="standardType != null and standardType != ''">
  35. and standard_type like CONCAT('%',#{standardType,jdbcType=VARCHAR},'%')
  36. </if>
  37. order by create_time desc
  38. </where>
  39. </select>
  40. </mapper>