StandardsRegulationsMapper.xml 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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_preview,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},#{videoPreview,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,video_preview
  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.length != 0">
  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. <update id="deleteStandardsRegulations" parameterType="api.common.pojo.po.scene.StandardsRegulationsPO">
  41. update simulation.scene_standards_regulations
  42. <set>
  43. <if test="isDeleted != null and isDeleted!=''">
  44. is_deleted = #{isDeleted,jdbcType=VARCHAR},
  45. </if>
  46. <if test="modifyUserId != null and modifyUserId!=''">
  47. modify_user_id = #{modifyUserId,jdbcType=VARCHAR},
  48. </if>
  49. <if test="modifyTime != null">
  50. modify_time = #{modifyTime},
  51. </if>
  52. </set>
  53. where regulations_id = #{regulationsId,jdbcType=VARCHAR}
  54. </update>
  55. <select id="queryStandardsRegulationsByName" parameterType="api.common.pojo.param.scene.StandardsRegulationsParam" resultType="api.common.pojo.po.scene.StandardsRegulationsPO">
  56. select
  57. regulations_id,scene_name
  58. from simulation.scene_standards_regulations
  59. <where>
  60. is_deleted = '0'
  61. <if test="sceneName != null and sceneName != ''">
  62. and scene_name =#{sceneName,jdbcType=VARCHAR}
  63. </if>
  64. </where>
  65. </select>
  66. </mapper>